ext/RMagick/rmmain.c in rmagick-1.11.0 vs ext/RMagick/rmmain.c in rmagick-1.11.1
- old
+ new
@@ -1,6 +1,6 @@
-/* $Id: rmmain.c,v 1.118 2006/05/07 21:41:12 rmagick Exp $ */
+/* $Id: rmmain.c,v 1.119 2006/05/27 21:05:59 rmagick Exp $ */
/*============================================================================\
| Copyright (C) 2006 by Timothy P. Hunter
| Name: rmmain.c
| Author: Tim Hunter
| Purpose: Contains all module, class, method declarations.
@@ -42,11 +42,13 @@
GetExceptionInfo(&exception);
color_ary = GetColorInfoArray(&exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
+
if (rb_block_given_p())
{
x = 0;
while(color_ary[x])
{
@@ -85,10 +87,11 @@
GetExceptionInfo(&exception);
color_info_list = GetColorInfoList("*", &number_colors, &exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
#endif
if (rb_block_given_p())
@@ -174,10 +177,11 @@
ExceptionInfo exception;
GetExceptionInfo(&exception);
type_info = GetTypeInfoList("*", &number_types, &exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
#endif
if (rb_block_given_p())
{
@@ -208,10 +212,11 @@
GetExceptionInfo(&exception);
type_list = GetTypeInfo("*", &exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
// If block, iterate over fonts
if (rb_block_given_p())
{
for (type = (TypeInfo *)type_list; type; type = next)
@@ -280,10 +285,13 @@
formats = rb_hash_new();
GetExceptionInfo(&exception);
magick_info = (MagickInfo *)GetMagickInfoArray(&exception);
+ CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
+
for(m = magick_info; m != NULL; m = m->next)
{
rb_hash_aset(formats, rb_str_new2(m->name), MagickInfo_to_format(m));
}
@@ -308,10 +316,12 @@
#else
// IM 6.1.3 added an exception argument to GetMagickInfoList
GetExceptionInfo(&exception);
magick_info = GetMagickInfoList("*", &number_formats, &exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
+
#endif
for(x = 0; x < number_formats; x++)
{
rb_hash_aset(formats
@@ -331,10 +341,11 @@
formats = rb_hash_new();
GetExceptionInfo(&exception);
m = (MagickInfo *)GetMagickInfo("*", &exception);
CHECK_EXCEPTION()
+ DestroyExceptionInfo(&exception);
for ( ; m != NULL; m = m->next)
{
rb_hash_aset(formats, rb_str_new2(m->name), MagickInfo_to_format(m));
}
@@ -1773,10 +1784,10 @@
str = rb_str_new2(PACKAGE_STRING);
rb_obj_freeze(str);
rb_define_const(Module_Magick, "Version", str);
sprintf(long_version,
- "This is %s ($Date: 2006/05/07 21:41:12 $) Copyright (C) 2006 by Timothy P. Hunter\n"
+ "This is %s ($Date: 2006/05/27 21:05:59 $) Copyright (C) 2006 by Timothy P. Hunter\n"
"Built with %s\n"
"Built for %s\n"
"Web page: http://rmagick.rubyforge.org\n"
"Email: rmagick@rubyforge.org\n",
PACKAGE_STRING, mgk_version, RUBY_VERSION_STRING);