ext/RMagick/rmagick.c in rmagick-2.13.3 vs ext/RMagick/rmagick.c in rmagick-2.13.4
- old
+ new
@@ -31,19 +31,19 @@
*/
VALUE
Magick_colors(VALUE class)
{
const ColorInfo **color_info_list;
- unsigned long number_colors, x;
+ size_t number_colors, x;
volatile VALUE ary;
- ExceptionInfo exception;
+ ExceptionInfo *exception;
- GetExceptionInfo(&exception);
+ exception = AcquireExceptionInfo();
- color_info_list = GetColorInfoList("*", &number_colors, &exception);
+ color_info_list = GetColorInfoList("*", &number_colors, exception);
CHECK_EXCEPTION()
- (void) DestroyExceptionInfo(&exception);
+ (void) DestroyExceptionInfo(exception);
if (rb_block_given_p())
{
for (x = 0; x < number_colors; x++)
@@ -80,18 +80,18 @@
*/
VALUE
Magick_fonts(VALUE class)
{
const TypeInfo **type_info;
- unsigned long number_types, x;
+ size_t number_types, x;
volatile VALUE ary;
- ExceptionInfo exception;
+ ExceptionInfo *exception;
- GetExceptionInfo(&exception);
- type_info = GetTypeInfoList("*", &number_types, &exception);
+ exception = AcquireExceptionInfo();
+ type_info = GetTypeInfoList("*", &number_types, exception);
CHECK_EXCEPTION()
- (void) DestroyExceptionInfo(&exception);
+ (void) DestroyExceptionInfo(exception);
if (rb_block_given_p())
{
for (x = 0; x < number_types; x++)
{
@@ -164,21 +164,21 @@
*/
VALUE
Magick_init_formats(VALUE class)
{
const MagickInfo **magick_info;
- unsigned long number_formats, x;
+ size_t number_formats, x;
volatile VALUE formats;
- ExceptionInfo exception;
+ ExceptionInfo *exception;
class = class; // defeat "never referenced" message from icc
formats = rb_hash_new();
// IM 6.1.3 added an exception argument to GetMagickInfoList
- GetExceptionInfo(&exception);
- magick_info = GetMagickInfoList("*", &number_formats, &exception);
+ exception = AcquireExceptionInfo();
+ magick_info = GetMagickInfoList("*", &number_formats, exception);
CHECK_EXCEPTION()
- (void) DestroyExceptionInfo(&exception);
+ (void) DestroyExceptionInfo(exception);
for (x = 0; x < number_formats; x++)
{
(void) rb_hash_aset(formats