rmagick 2.2.2 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (55) hide show
  1. data/ChangeLog +17 -0
  2. data/README.html +21 -46
  3. data/README.txt +18 -40
  4. data/build_tarball.rake +11 -2
  5. data/doc/comtasks.html +5 -5
  6. data/doc/constants.html +272 -241
  7. data/doc/draw.html +5 -5
  8. data/doc/ex/mask.rb +2 -2
  9. data/doc/ilist.html +9 -9
  10. data/doc/image1.html +164 -16
  11. data/doc/image2.html +105 -8
  12. data/doc/image3.html +8 -8
  13. data/doc/imageattrs.html +4 -137
  14. data/doc/imusage.html +3 -3
  15. data/doc/index.html +9 -9
  16. data/doc/info.html +5 -5
  17. data/doc/magick.html +30 -70
  18. data/doc/optequiv.html +19 -39
  19. data/doc/rvg.html +5 -5
  20. data/doc/rvgclip.html +2 -2
  21. data/doc/rvggroup.html +2 -2
  22. data/doc/rvgimage.html +3 -3
  23. data/doc/rvgpattern.html +3 -3
  24. data/doc/rvgshape.html +2 -2
  25. data/doc/rvgstyle.html +2 -2
  26. data/doc/rvgtext.html +6 -6
  27. data/doc/rvgtspan.html +4 -4
  28. data/doc/rvgtut.html +9 -9
  29. data/doc/rvguse.html +3 -3
  30. data/doc/rvgxform.html +2 -2
  31. data/doc/struct.html +54 -19
  32. data/doc/usage.html +11 -3
  33. data/ext/RMagick/MANIFEST +1 -1
  34. data/ext/RMagick/extconf.rb +8 -23
  35. data/ext/RMagick/rmagick.h +10 -5
  36. data/ext/RMagick/rmdraw.c +7 -8
  37. data/ext/RMagick/rmimage.c +186 -20
  38. data/ext/RMagick/rmmain.c +32 -12
  39. data/ext/RMagick/rmutil.c +171 -28
  40. data/lib/RMagick.rb +7 -7
  41. data/lib/rvg/clippath.rb +2 -2
  42. data/lib/rvg/container.rb +2 -2
  43. data/lib/rvg/describable.rb +2 -2
  44. data/lib/rvg/embellishable.rb +2 -2
  45. data/lib/rvg/misc.rb +2 -2
  46. data/lib/rvg/paint.rb +7 -2
  47. data/lib/rvg/pathdata.rb +2 -2
  48. data/lib/rvg/rvg.rb +3 -3
  49. data/lib/rvg/stretchable.rb +15 -3
  50. data/lib/rvg/stylable.rb +2 -2
  51. data/lib/rvg/text.rb +2 -2
  52. data/lib/rvg/transformable.rb +2 -2
  53. data/lib/rvg/units.rb +2 -2
  54. data/rmagick.gemspec +1 -1
  55. metadata +3 -3
@@ -1,4 +1,4 @@
1
- /* $Id: rmimage.c,v 1.279 2008/01/28 22:31:50 rmagick Exp $ */
1
+ /* $Id: rmimage.c,v 1.288 2008/03/23 15:15:46 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmimage.c
@@ -396,29 +396,45 @@ Image_add_profile(VALUE self, VALUE name)
396
396
  }
397
397
 
398
398
 
399
+
399
400
  /*
400
- Method: Image#alpha=(alpha)
401
- Purpose: Equivalent to -alpha option
402
- Notes: see mogrify.c
401
+ Method: Image#alpha(type)
402
+ Purpose: Calls SetImageAlphaChannel
403
+ Notes: Replaces matte=, alpha=
404
+ Originally there was an alpha attribute getter and setter.
405
+ These are replaced with alpha? and alpha(type). We
406
+ still define (but don't document) alpha=. For backward
407
+ compatibility, if this method is called without an argument,
408
+ make it act like the old alpha getter and return true if the
409
+ matte channel is active, false otherwise.
403
410
  */
404
411
  VALUE
405
- Image_alpha_eq(VALUE self, VALUE type)
412
+ Image_alpha(int argc, VALUE *argv, VALUE self)
406
413
  {
407
414
  #if defined(HAVE_TYPE_ALPHACHANNELTYPE)
408
415
  Image *image;
409
416
  AlphaChannelType alpha;
410
417
 
411
- image = rm_check_frozen(self);
412
418
 
413
- VALUE_TO_ENUM(type, alpha, AlphaChannelType);
419
+ // For backward compatibility, make alpha() act like alpha?
420
+ if (argc == 0)
421
+ {
422
+ return Image_alpha_q(self);
423
+ }
424
+ else if (argc > 1)
425
+ {
426
+ rb_raise(rb_eArgError, "wrong number of arguments (%d for 1)", argc);
427
+ }
428
+
429
+
430
+ image = rm_check_frozen(self);
431
+ VALUE_TO_ENUM(argv[0], alpha, AlphaChannelType);
414
432
 
415
433
  #if defined(HAVE_SETIMAGEALPHACHANNEL)
416
434
  // Added in 6.3.6-9
417
435
  (void) SetImageAlphaChannel(image, alpha);
418
436
  rm_check_image_exception(image, RetainOnError);
419
-
420
437
  #else
421
-
422
438
  switch (alpha)
423
439
  {
424
440
  case ActivateAlphaChannel:
@@ -443,10 +459,55 @@ Image_alpha_eq(VALUE self, VALUE type)
443
459
  break;
444
460
 
445
461
  default:
462
+ rb_raise(rb_eArgError, "unknown AlphaChannelType value");
446
463
  break;
447
464
  }
448
465
  #endif
449
466
 
467
+ return argv[0];
468
+
469
+ #else // HAVE_ALPHACHANNELTYPE
470
+ argc = argc;
471
+ argv =argv;
472
+ self = self;
473
+ rm_not_implemented();
474
+ return(VALUE)0;
475
+ #endif
476
+ }
477
+
478
+
479
+
480
+ /*
481
+ Method: Image#alpha?
482
+ Returns: true if the image's alpha channel is activated
483
+ Notes: Replaces Image#matte
484
+ */
485
+ VALUE
486
+ Image_alpha_q(VALUE self)
487
+ {
488
+ Image *image = rm_check_destroyed(self);
489
+ #if defined(HAVE_GETIMAGEALPHACHANNEL)
490
+ return GetImageAlphaChannel(image) ? Qtrue : Qfalse;
491
+ #else
492
+ return image->matte ? Qtrue : Qfalse;
493
+ #endif
494
+ }
495
+
496
+
497
+ /*
498
+ Method: Image#alpha=(alpha)
499
+ Purpose: Equivalent to -alpha option
500
+ Returns: alpha
501
+ Notes: see mogrify.c
502
+ Notes: Deprecated. See Image_alpha.
503
+ */
504
+ VALUE
505
+ Image_alpha_eq(VALUE self, VALUE type)
506
+ {
507
+ #if defined(HAVE_TYPE_ALPHACHANNELTYPE)
508
+ VALUE argv[1];
509
+ argv[0] = type;
510
+ Image_alpha(1, argv, self);
450
511
  return type;
451
512
  #else
452
513
  self = self;
@@ -3178,6 +3239,45 @@ Image_depth(VALUE self)
3178
3239
  }
3179
3240
 
3180
3241
 
3242
+ /*
3243
+ Method: Image#decipher(passphrase)
3244
+ Purpose: call DecipherImage
3245
+ */
3246
+ VALUE
3247
+ Image_decipher(VALUE self, VALUE passphrase)
3248
+ {
3249
+ #if defined(HAVE_ENCIPHERIMAGE)
3250
+ Image *image, *new_image;
3251
+ char *pf;
3252
+ ExceptionInfo exception;
3253
+ MagickBooleanType okay;
3254
+
3255
+ image = rm_check_destroyed(self);
3256
+ pf = StringValuePtr(passphrase); // ensure passphrase is a string
3257
+ GetExceptionInfo(&exception);
3258
+
3259
+ new_image = rm_clone_image(image);
3260
+
3261
+ okay = DecipherImage(new_image, pf, &exception);
3262
+ rm_check_exception(&exception, new_image, DestroyOnError);
3263
+ if (!okay)
3264
+ {
3265
+ new_image = DestroyImage(new_image);
3266
+ rb_raise(rb_eRuntimeError, "DecipherImage failed for unknown reason.");
3267
+ }
3268
+
3269
+ DestroyExceptionInfo(&exception);
3270
+
3271
+ return rm_image_new(new_image);
3272
+ #else
3273
+ self = self;
3274
+ passphrase = passphrase;
3275
+ rm_not_implemented();
3276
+ return (VALUE)0;
3277
+ #endif
3278
+ }
3279
+
3280
+
3181
3281
  DEF_ATTR_ACCESSOR(Image, delay, ulong)
3182
3282
 
3183
3283
 
@@ -3838,6 +3938,45 @@ Image_emboss(int argc, VALUE *argv, VALUE self)
3838
3938
  }
3839
3939
 
3840
3940
 
3941
+ /*
3942
+ Method: Image#encipher(passphrase)
3943
+ Purpose: call EncipherImage
3944
+ */
3945
+ VALUE
3946
+ Image_encipher(VALUE self, VALUE passphrase)
3947
+ {
3948
+ #if defined(HAVE_ENCIPHERIMAGE)
3949
+ Image *image, *new_image;
3950
+ char *pf;
3951
+ ExceptionInfo exception;
3952
+ MagickBooleanType okay;
3953
+
3954
+ image = rm_check_destroyed(self);
3955
+ pf = StringValuePtr(passphrase); // ensure passphrase is a string
3956
+ GetExceptionInfo(&exception);
3957
+
3958
+ new_image = rm_clone_image(image);
3959
+
3960
+ okay = EncipherImage(new_image, pf, &exception);
3961
+ rm_check_exception(&exception, new_image, DestroyOnError);
3962
+ if (!okay)
3963
+ {
3964
+ new_image = DestroyImage(new_image);
3965
+ rb_raise(rb_eRuntimeError, "EncipherImage failed for unknown reason.");
3966
+ }
3967
+
3968
+ DestroyExceptionInfo(&exception);
3969
+
3970
+ return rm_image_new(new_image);
3971
+ #else
3972
+ self = self;
3973
+ passphrase = passphrase;
3974
+ rm_not_implemented();
3975
+ return (VALUE)0;
3976
+ #endif
3977
+ }
3978
+
3979
+
3841
3980
 
3842
3981
  /*
3843
3982
  Method: Image#endian
@@ -5664,18 +5803,17 @@ Image_map(int argc, VALUE *argv, VALUE self)
5664
5803
 
5665
5804
 
5666
5805
  /*
5667
- Method: Image#mask
5806
+ Static: get_image_mask
5668
5807
  Purpose: Return the image's clip mask, or nil if it doesn't have a clip
5669
5808
  mask.
5670
5809
  Notes: Distinguish from Image#clip_mask
5671
5810
  */
5672
- VALUE
5673
- Image_mask(VALUE self)
5811
+ static VALUE
5812
+ get_image_mask(Image *image)
5674
5813
  {
5675
- Image *image, *mask;
5814
+ Image *mask;
5676
5815
  ExceptionInfo exception;
5677
5816
 
5678
- image = rm_check_destroyed(self);
5679
5817
  GetExceptionInfo(&exception);
5680
5818
 
5681
5819
  // The returned clip mask is a clone, ours to keep.
@@ -5690,22 +5828,49 @@ Image_mask(VALUE self)
5690
5828
 
5691
5829
  /*
5692
5830
  Method: Image#mask=(mask-image)
5831
+ Notes: Deprecated in favor of Image#mask(mask-image). See below.
5832
+ */
5833
+ VALUE
5834
+ Image_mask_eq(VALUE self, VALUE mask)
5835
+ {
5836
+ VALUE v[1];
5837
+ v[0] = mask;
5838
+ return Image_mask(1, v, self);
5839
+ }
5840
+
5841
+
5842
+ /*
5843
+ Method: Image#mask([mask-image])
5693
5844
  Purpose: associates a clip mask with the image
5845
+ Returns: Copy of the current clip-mask
5846
+ Notes: Omit the argument to get a copy of the current clip mask.
5694
5847
  Notes: pass "nil" for the mask-image to remove the current clip mask.
5695
5848
  If the clip mask is not the same size as the target image,
5696
5849
  resizes the clip mask to match the target.
5697
5850
  Notes: Distinguish from Image#clip_mask=
5698
5851
  */
5699
5852
  VALUE
5700
- Image_mask_eq(VALUE self, VALUE mask)
5853
+ Image_mask(int argc, VALUE *argv, VALUE self)
5701
5854
  {
5855
+ volatile VALUE mask;
5702
5856
  Image *image, *mask_image, *resized_image;
5703
5857
  Image *clip_mask;
5704
5858
  long x, y;
5705
5859
  PixelPacket *q;
5706
5860
  ExceptionInfo exception;
5707
5861
 
5708
- image = rm_check_frozen(self);
5862
+ image = rm_check_destroyed(self);
5863
+ if (argc == 0)
5864
+ {
5865
+ return get_image_mask(image);
5866
+ }
5867
+ if (argc > 1)
5868
+ {
5869
+ rb_raise(rb_eArgError, "wrong number of arguments (expected 0 or 1, got %d)", argc);
5870
+ }
5871
+
5872
+ rb_check_frozen(self);
5873
+ mask = argv[0];
5709
5874
 
5710
5875
  if (mask != Qnil)
5711
5876
  {
@@ -5771,14 +5936,15 @@ Image_mask_eq(VALUE self, VALUE mask)
5771
5936
  (void) SetImageClipMask(image, NULL);
5772
5937
  }
5773
5938
 
5774
- return self;
5939
+ // Always return a copy of the mask!
5940
+ return get_image_mask(image);
5775
5941
  }
5776
5942
 
5777
5943
 
5778
5944
  /*
5779
5945
  Method: Image#matte
5780
5946
  Purpose: Get matte attribute
5781
- Notes: Deprecated as of ImageMagick 6.3.6
5947
+ Notes: Deprecated as of ImageMagick 6.3.6. See Image#alpha
5782
5948
  */
5783
5949
  VALUE
5784
5950
  Image_matte(VALUE self)
@@ -5793,7 +5959,7 @@ Image_matte(VALUE self)
5793
5959
  /*
5794
5960
  Method: Image#matte=
5795
5961
  Purpose: Set matte attribute
5796
- Notes: Deprecated as of ImageMagick 6.3.6. Calls Image_matte_eq.
5962
+ Notes: Deprecated as of ImageMagick 6.3.6. See Image#alpha
5797
5963
  */
5798
5964
  VALUE
5799
5965
  Image_matte_eq(VALUE self, VALUE matte)
@@ -6479,7 +6645,7 @@ Image_opaque_channel(int argc, VALUE *argv, VALUE self)
6479
6645
  fuzz = NUM2DBL(argv[3]);
6480
6646
  if (fuzz < 0.0)
6481
6647
  {
6482
- rb_raise(rb_eArgError, "fuzz must be >= 0.0", fuzz);
6648
+ rb_raise(rb_eArgError, "fuzz must be >= 0.0 (%g given)", fuzz);
6483
6649
  }
6484
6650
  case 3:
6485
6651
  invert = RTEST(argv[2]);
data/ext/RMagick/rmmain.c CHANGED
@@ -1,4 +1,4 @@
1
- /* $Id: rmmain.c,v 1.236 2008/01/28 22:31:50 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.247 2008/03/29 15:23:12 rmagick Exp $ */
2
2
  /*============================================================================\
3
3
  | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmmain.c
@@ -167,7 +167,6 @@ Magick_init_formats(VALUE class)
167
167
  Method: Magick.limit_resource(resource[, limit])
168
168
  Purpose: Get/set resource limits. If a limit is specified the old limit
169
169
  is set to the new value. Either way the current/new limit is returned.
170
- Notes: Don't support "AreaLimit" because GraphicsMagick doesn't support it.
171
170
  */
172
171
  static VALUE
173
172
  Magick_limit_resource(int argc, VALUE *argv, VALUE class)
@@ -187,7 +186,11 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
187
186
 
188
187
  case T_SYMBOL:
189
188
  id = (ID)SYM2ID(resource);
190
- if (id == rb_intern("memory"))
189
+ if (id == rb_intern("area"))
190
+ {
191
+ res = AreaResource;
192
+ }
193
+ else if (id == rb_intern("memory"))
191
194
  {
192
195
  res = MemoryResource;
193
196
  }
@@ -215,6 +218,10 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
215
218
  {
216
219
  return class;
217
220
  }
221
+ else if (rm_strcasecmp("area", str) == 0)
222
+ {
223
+ res = AreaResource;
224
+ }
218
225
  else if (rm_strcasecmp("memory", str) == 0)
219
226
  {
220
227
  res = MemoryResource;
@@ -339,12 +346,10 @@ Init_RMagick2(void)
339
346
  /*-----------------------------------------------------------------------*/
340
347
 
341
348
  rm_ID_trace_proc = rb_intern("@trace_proc");
342
- rm_ID__dummy_img_ = rb_intern("_dummy_img_");
343
349
  rm_ID_call = rb_intern("call");
344
350
  rm_ID_changed = rb_intern("changed");
345
351
  rm_ID_cur_image = rb_intern("cur_image");
346
352
  rm_ID_dup = rb_intern("dup");
347
- rm_ID_enumerators = rb_intern("enumerators");
348
353
  rm_ID_fill = rb_intern("fill");
349
354
  rm_ID_flag = rb_intern("flag");
350
355
  rm_ID_from_s = rb_intern("from_s");
@@ -357,7 +362,6 @@ Init_RMagick2(void)
357
362
  rm_ID_new = rb_intern("new");
358
363
  rm_ID_push = rb_intern("push");
359
364
  rm_ID_spaceship = rb_intern("<=>");
360
- rm_ID__tmpnam_ = rb_intern("_tmpnam_");
361
365
  rm_ID_to_i = rb_intern("to_i");
362
366
  rm_ID_to_s = rb_intern("to_s");
363
367
  rm_ID_values = rb_intern("values");
@@ -434,7 +438,7 @@ Init_RMagick2(void)
434
438
  DCL_ATTR_ACCESSOR(Image, interlace)
435
439
  DCL_ATTR_ACCESSOR(Image, iptc_profile)
436
440
  DCL_ATTR_ACCESSOR(Image, iterations) // do not document! Only used by Image#iterations=
437
- DCL_ATTR_ACCESSOR(Image, mask)
441
+ DCL_ATTR_WRITER(Image, mask)
438
442
  DCL_ATTR_ACCESSOR(Image, matte)
439
443
  DCL_ATTR_ACCESSOR(Image, matte_color)
440
444
  DCL_ATTR_READER(Image, mean_error_per_pixel)
@@ -474,6 +478,8 @@ Init_RMagick2(void)
474
478
  rb_define_method(Class_Image, "add_noise_channel", Image_add_noise_channel, -1);
475
479
  rb_define_method(Class_Image, "add_profile", Image_add_profile, 1);
476
480
  rb_define_method(Class_Image, "affine_transform", Image_affine_transform, 1);
481
+ rb_define_method(Class_Image, "alpha", Image_alpha, -1);
482
+ rb_define_method(Class_Image, "alpha?", Image_alpha_q, 0);
477
483
  rb_define_method(Class_Image, "[]", Image_aref, 1);
478
484
  rb_define_method(Class_Image, "[]=", Image_aset, 2);
479
485
  rb_define_method(Class_Image, "auto_orient", Image_auto_orient, 0);
@@ -519,6 +525,7 @@ Init_RMagick2(void)
519
525
  rb_define_method(Class_Image, "crop", Image_crop, -1);
520
526
  rb_define_method(Class_Image, "crop!", Image_crop_bang, -1);
521
527
  rb_define_method(Class_Image, "cycle_colormap", Image_cycle_colormap, 1);
528
+ rb_define_method(Class_Image, "decipher", Image_decipher, 1);
522
529
  rb_define_method(Class_Image, "delete_profile", Image_delete_profile, 1);
523
530
  rb_define_method(Class_Image, "despeckle", Image_despeckle, 0);
524
531
  rb_define_method(Class_Image, "destroy!", Image_destroy_bang, 0);
@@ -535,6 +542,7 @@ Init_RMagick2(void)
535
542
  rb_define_method(Class_Image, "each_profile", Image_each_profile, 0);
536
543
  rb_define_method(Class_Image, "edge", Image_edge, -1);
537
544
  rb_define_method(Class_Image, "emboss", Image_emboss, -1);
545
+ rb_define_method(Class_Image, "encipher", Image_encipher, 1);
538
546
  rb_define_method(Class_Image, "enhance", Image_enhance, 0);
539
547
  rb_define_method(Class_Image, "equalize", Image_equalize, 0);
540
548
  rb_define_method(Class_Image, "equalize_channel", Image_equalize_channel, -1);
@@ -569,6 +577,7 @@ Init_RMagick2(void)
569
577
  rb_define_method(Class_Image, "magnify", Image_magnify, 0);
570
578
  rb_define_method(Class_Image, "magnify!", Image_magnify_bang, 0);
571
579
  rb_define_method(Class_Image, "map", Image_map, -1);
580
+ rb_define_method(Class_Image, "mask", Image_mask, -1);
572
581
  rb_define_method(Class_Image, "matte_flood_fill", Image_matte_flood_fill, 5);
573
582
  rb_define_method(Class_Image, "median_filter", Image_median_filter, -1);
574
583
  rb_define_method(Class_Image, "minify", Image_minify, 0);
@@ -777,6 +786,7 @@ Init_RMagick2(void)
777
786
  rb_define_alloc_func(Class_Pixel, Pixel_alloc);
778
787
  rb_define_singleton_method(Class_Pixel, "from_color", Pixel_from_color, 1);
779
788
  rb_define_singleton_method(Class_Pixel, "from_HSL", Pixel_from_HSL, 1);
789
+ rb_define_singleton_method(Class_Pixel, "from_hsla", Pixel_from_hsla, -1);
780
790
 
781
791
  // Define the RGBA attributes
782
792
  DCL_ATTR_ACCESSOR(Pixel, red)
@@ -804,6 +814,7 @@ Init_RMagick2(void)
804
814
  rb_define_method(Class_Pixel, "intensity", Pixel_intensity, 0);
805
815
  rb_define_method(Class_Pixel, "to_color", Pixel_to_color, -1);
806
816
  rb_define_method(Class_Pixel, "to_HSL", Pixel_to_HSL, 0);
817
+ rb_define_method(Class_Pixel, "to_hsla", Pixel_to_hsla, 0);
807
818
  rb_define_method(Class_Pixel, "to_s", Pixel_to_s, 0);
808
819
 
809
820
  /*-----------------------------------------------------------------------*/
@@ -1105,7 +1116,7 @@ Init_RMagick2(void)
1105
1116
 
1106
1117
  // AllCompliance is 0xffff, not too useful for us!
1107
1118
  rb_define_const(Module_Magick, "AllCompliance"
1108
- , rm_enum_new(Class_AnchorType
1119
+ , rm_enum_new(Class_ComplianceType
1109
1120
  , ID2SYM(rb_intern("AllCompliance"))
1110
1121
  , INT2FIX(SVGCompliance|X11Compliance|XPMCompliance)));
1111
1122
 
@@ -1186,6 +1197,15 @@ Init_RMagick2(void)
1186
1197
  ENUMERATOR(UndefinedCompression)
1187
1198
  ENUMERATOR(NoCompression)
1188
1199
  ENUMERATOR(BZipCompression)
1200
+ #if defined(HAVE_ENUM_DXT1COMPRESSION)
1201
+ ENUMERATOR(DXT1Compression)
1202
+ #endif
1203
+ #if defined(HAVE_ENUM_DXT3COMPRESSION)
1204
+ ENUMERATOR(DXT3Compression)
1205
+ #endif
1206
+ #if defined(HAVE_ENUM_DXT5COMPRESSION)
1207
+ ENUMERATOR(DXT5Compression)
1208
+ #endif
1189
1209
  ENUMERATOR(FaxCompression)
1190
1210
  ENUMERATOR(Group4Compression)
1191
1211
  ENUMERATOR(JPEGCompression)
@@ -1679,15 +1699,15 @@ static void version_constants(void)
1679
1699
  mgk_version = GetMagickVersion(NULL);
1680
1700
 
1681
1701
  str = rb_str_new2(mgk_version);
1682
- OBJ_FREEZE(str);
1702
+ rb_obj_freeze(str);
1683
1703
  rb_define_const(Module_Magick, "Magick_version", str);
1684
1704
 
1685
1705
  str = rb_str_new2(Q(RMAGICK_VERSION_STRING));
1686
- OBJ_FREEZE(str);
1706
+ rb_obj_freeze(str);
1687
1707
  rb_define_const(Module_Magick, "Version", str);
1688
1708
 
1689
1709
  sprintf(long_version,
1690
- "This is %s ($Date: 2008/01/28 22:31:50 $) Copyright (C) 2008 by Timothy P. Hunter\n"
1710
+ "This is %s ($Date: 2008/03/29 15:23:12 $) Copyright (C) 2008 by Timothy P. Hunter\n"
1691
1711
  "Built with %s\n"
1692
1712
  "Built for %s\n"
1693
1713
  "Web page: http://rmagick.rubyforge.org\n"
@@ -1695,7 +1715,7 @@ static void version_constants(void)
1695
1715
  Q(RMAGICK_VERSION_STRING), mgk_version, Q(RUBY_VERSION_STRING));
1696
1716
 
1697
1717
  str = rb_str_new2(long_version);
1698
- OBJ_FREEZE(str);
1718
+ rb_obj_freeze(str);
1699
1719
  rb_define_const(Module_Magick, "Long_version", str);
1700
1720
 
1701
1721
  }