After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 612136 - Cannot cast a char* to a void*
Cannot cast a char* to a void*
Status: RESOLVED FIXED
Product: seed
Classification: Bindings
Component: libseed
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: seed-maint
seed-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-07 22:06 UTC by Alberto Ruiz
Modified: 2015-06-23 14:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use case of Soup.Buffer.data being used as a void* data parameter for a Gio.MemoryInputStream consctructor (1.15 KB, application/javascript)
2010-03-07 22:06 UTC, Alberto Ruiz
Details

Description Alberto Ruiz 2010-03-07 22:06:08 UTC
Created attachment 155501 [details]
Use case of Soup.Buffer.data being used as a void* data parameter for a Gio.MemoryInputStream consctructor

While trying to fetch image data from libsoup and feed it into a GMemoryInputStream constructor so that I can construct a Pixbuf object (see file attached) with it I'm getting this error:

(seed:3988): GLib-GIO-CRITICAL **: g_memory_input_stream_add_data: assertion `data != NULL' failed

(seed:3988): GLib-GIO-CRITICAL **: g_memory_input_stream_add_data: assertion `data != NULL' failed

(seed:3988): GLib-GIO-CRITICAL **: g_memory_input_stream_add_data: assertion `data != NULL' failed

My guess is that while casting it's just setting the casted value to null because seed doesn't support this?

Any suggestions for workarounds would be welcome :-)
Comment 1 Alan Knowles 2010-03-10 03:59:34 UTC
This should be fixed in git -  the type is void*, previously it did not try and use the string version of the data.. 

http://git.gnome.org/browse/seed/commit/?id=fb55efd88b03fd51510232e505233c309a16146e
Comment 2 Alan Knowles 2010-04-15 23:31:10 UTC
Technically this is a gobject instrospection issue, data should be of type binary array. Which they have yet to implement a solution for.
Comment 3 Alberto Ruiz 2013-07-17 21:36:49 UTC
Ping?
Comment 4 Alan Knowles 2013-07-22 06:38:47 UTC
yes, just tested the example code with the latest version - seems to work - except twitter broke the api ;)