ext/RMagick/rminfo.c in rmagick-2.13.3 vs ext/RMagick/rminfo.c in rmagick-2.13.4

- old
+ new

@@ -91,25 +91,25 @@ static VALUE set_color_option(VALUE self, const char *option, VALUE color) { Info *info; char *name; PixelPacket pp; - ExceptionInfo exception; + ExceptionInfo *exception; MagickBooleanType okay; Data_Get_Struct(self, Info, info); if (NIL_P(color)) { (void) RemoveImageOption(info, option); } else { - GetExceptionInfo(&exception); + exception = AcquireExceptionInfo(); name = StringValuePtr(color); - okay = QueryColorDatabase(name, &pp, &exception); - (void) DestroyExceptionInfo(&exception); + okay = QueryColorDatabase(name, &pp, exception); + (void) DestroyExceptionInfo(exception); if (!okay) { rb_raise(rb_eArgError, "invalid color name `%s'", name); } @@ -958,15 +958,15 @@ Data_Get_Struct(self, Info, info); d = NUM2ULONG(depth); switch (d) { case 8: // always okay -#if QuantumDepth == 16 || QuantumDepth == 32 || QuantumDepth == 64 +#if MAGICKCORE_QUANTUM_DEPTH == 16 || MAGICKCORE_QUANTUM_DEPTH == 32 || MAGICKCORE_QUANTUM_DEPTH == 64 case 16: -#if QuantumDepth == 32 || QuantumDepth == 64 +#if MAGICKCORE_QUANTUM_DEPTH == 32 || MAGICKCORE_QUANTUM_DEPTH == 64 case 32: -#if QuantumDepth == 64 +#if MAGICKCORE_QUANTUM_DEPTH == 64 case 64: #endif #endif #endif break; @@ -1357,18 +1357,18 @@ */ VALUE Info_format(VALUE self) { Info *info; const MagickInfo *magick_info ; - ExceptionInfo exception; + ExceptionInfo *exception; Data_Get_Struct(self, Info, info); if (*info->magick) { - GetExceptionInfo(&exception); - magick_info = GetMagickInfo(info->magick, &exception); - (void) DestroyExceptionInfo(&exception); + exception = AcquireExceptionInfo(); + magick_info = GetMagickInfo(info->magick, exception); + (void) DestroyExceptionInfo(exception); return magick_info ? rb_str_new2(magick_info->name) : Qnil; } return Qnil; @@ -1388,19 +1388,19 @@ Info_format_eq(VALUE self, VALUE magick) { Info *info; const MagickInfo *m; char *mgk; - ExceptionInfo exception; + ExceptionInfo *exception; Data_Get_Struct(self, Info, info); - GetExceptionInfo(&exception); + exception = AcquireExceptionInfo(); mgk = StringValuePtr(magick); - m = GetMagickInfo(mgk, &exception); + m = GetMagickInfo(mgk, exception); CHECK_EXCEPTION() - (void) DestroyExceptionInfo(&exception); + (void) DestroyExceptionInfo(exception); if (!m) { rb_raise(rb_eArgError, "unknown format: %s", mgk); }