clementfarabet / graphicsmagick

A simple Lua wrapper to graphicsmagick.
126 stars 41 forks source link

cannot convert 'const char *' to 'void *' #41

Closed byliu closed 8 years ago

byliu commented 8 years ago
in Image.lua

-- Description:
function Image:info()
   -- Get information
   local str = ffi.gc(clib.MagickDescribeImage(self.wand), ffi.C.free)
   return ffi.string(str)
end

clib.MagickDescribeImage(self.wand) returns const char * and it can't be freed by ffi.C.free get err: cannot convert 'const char ' to 'void ' see here MagickDescribeImage()

byliu commented 8 years ago

well, i fixed it #42 clib.MagickDescribeImage(self.wand) should returns char * instead of const char *