]> granicus.if.org Git - imagemagick/blobdiff - wand/magick-wand.c
(no commit message)
[imagemagick] / wand / magick-wand.c
index 8f8e5164e872d4a703211aaba696fff9cbe7c279..1e8c71565434034a1dc76df6164386e20c52e22f 100644 (file)
@@ -23,7 +23,7 @@
 %                                 August 2003                                 %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -129,14 +129,14 @@ WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  clone_wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*clone_wand));
+  clone_wand=(MagickWand *) AcquireMagickMemory(sizeof(*clone_wand));
   if (clone_wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       wand->name);
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%lu",
-    MagickWandId,clone_wand->id);
+  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+    MagickWandId,(double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
   clone_wand->image_info=CloneImageInfo(wand->image_info);
@@ -1028,14 +1028,14 @@ WandExport MagickWand *NewMagickWand(void)
   quantum=GetMagickQuantumDepth(&depth);
   if (depth != MAGICKCORE_QUANTUM_DEPTH)
     ThrowWandFatalException(WandError,"QuantumDepthMismatch",quantum);
-  wand=(MagickWand *) AcquireAlignedMemory(1,sizeof(*wand));
+  wand=(MagickWand *) AcquireMagickMemory(sizeof(*wand));
   if (wand == (MagickWand *) NULL)
     ThrowWandFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand,0,sizeof(*wand));
   wand->id=AcquireWandId();
-  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%lu",MagickWandId,
-    wand->id);
+  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",MagickWandId,
+    (double) wand->id);
   wand->exception=AcquireExceptionInfo();
   wand->image_info=AcquireImageInfo();
   wand->quantize_info=CloneQuantizeInfo((QuantizeInfo *) NULL);