Patch for Vala Binding
Posted: 2013-01-12T04:19:15-07:00
Now, we are developing a binding of MagickWand for programming language Vala (live.gnome.org/Vala/) a relative promised language. Vala-compiler compiles Vala code into C code and we can further use C code. For the compilation from C code to object file, it need a memory size of any struct for memory allocation. However the type MagickWand does not have any structure to give the size of memory allocation. Hence, an error occurs by using MagickWand without pointer. E.g., Vala generates C-code like :
MagickWand _tmp2_;
To solve this problem, it is really simple and works out of the box. We edit MagickWand.h from :
typedef struct _MagickWand
MagickWand;
to :
typedef struct _MagickWand{}
MagickWand;
and everything is done.
Now, we are using this code for our internal patch. And it would be very nice, if the patch is added to the trunk of ImageMagick.
MagickWand _tmp2_;
To solve this problem, it is really simple and works out of the box. We edit MagickWand.h from :
typedef struct _MagickWand
MagickWand;
to :
typedef struct _MagickWand{}
MagickWand;
and everything is done.
Now, we are using this code for our internal patch. And it would be very nice, if the patch is added to the trunk of ImageMagick.