Re: [Solved] Re: [gobject-introspection] callback without GDestroyNotify
On Wed, 2012-10-24 at 10:42 +0100, Emmanuele Bassi wrote: > you should not be using the g_*/G* namespace unless you're > contributing code to GLib (glib, gobject, gio) — not GNOME. > > using the g_* namespace from other components may very well lead to > symbol collision. Sorry, I was confused. So, I have to change g_tweet_ to gtweet_ and use 'gtweet' as my namespace instead of 'g'. Actually, while creating GTweetObject class, I did just what you said (using gtweet_object_get_type() instead of g_tweet_object_get_type()). but somehow ended-up doing g_tweet while fixing issues thrown by g-ir-scanner. It started working after I changed by namespace to 'g' instead of 'gtweet'. May be because I was wrong in annotations and unfamiliarity with g-ir-scanner. I'll fix it. Thanks you for pointing out. Thanks, Mohan R ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [Solved] Re: [gobject-introspection] callback without GDestroyNotify
hi; On 24 October 2012 07:04, Mohan R wrote: > On Tue, 2012-10-23 at 19:43 +0100, Emmanuele Bassi wrote: >> hi; >> >> don't use the G namespace for you code unless you plan on submitting >> it for inclusion in GLib. >> >> If you're writing a gtweet library, then the namespace ought to be >> Gtweet. >> >> ciao, >> Emmanuele. > > Of course I'm going to submit to gnome. that's not what I wrote, but I apologize if I came across as a bit too terse. you should not be using the g_*/G* namespace unless you're contributing code to GLib (glib, gobject, gio) — not GNOME. using the g_* namespace from other components may very well lead to symbol collision. ciao, Emmanuele. -- W: http://www.emmanuelebassi.name B: http://blogs.gnome.org/ebassi/ ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [Solved] Re: [gobject-introspection] callback without GDestroyNotify
On ons, 2012-10-24 at 11:34 +0530, Mohan R wrote: > On Tue, 2012-10-23 at 19:43 +0100, Emmanuele Bassi wrote: > > hi; > > > > don't use the G namespace for you code unless you plan on submitting > > it for inclusion in GLib. > > > > If you're writing a gtweet library, then the namespace ought to be > > Gtweet. > > > > ciao, > > Emmanuele. > > Of course I'm going to submit to gnome. But I'm trying to get it > introspection ready and create a small application before submitting. > Without introspection writing a webapi library is useless. Writing a library is one thing, but using a prefix like "g_" in g_tweet_object_samplestream implies that this is part of glib. You need to use a different prefix, like "gtweet_" or you risk conflicts with later symbols added to glib. ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [Solved] Re: [gobject-introspection] callback without GDestroyNotify
On Tue, 2012-10-23 at 19:43 +0100, Emmanuele Bassi wrote: > hi; > > don't use the G namespace for you code unless you plan on submitting > it for inclusion in GLib. > > If you're writing a gtweet library, then the namespace ought to be > Gtweet. > > ciao, > Emmanuele. Of course I'm going to submit to gnome. But I'm trying to get it introspection ready and create a small application before submitting. Without introspection writing a webapi library is useless. Introspection solves one of the biggest pain which is converting json to a c struct. Now I can directly export json responses from twitter to gjs/seed. Reason for another twitter library? (1) for my learning purpose (2) twitter-glib is not compatible with current twitter-api, (3) I didn't dig more about libsocialweb, but in my point of view, one-thing-fit-all is not the right way for twitter because twitter-api is not stable, they change things whenever they like. Code is in github (https://github.com/mohan43u/tweetpts/tree/gtweet) but its not ready. I don't know gnome will accept this one when I submit. But, I'm doing this for my personal learning. Introspection is very exciting. Thanks, Mohan R ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Re: [Solved] Re: [gobject-introspection] callback without GDestroyNotify
hi; don't use the G namespace for you code unless you plan on submitting it for inclusion in GLib. If you're writing a gtweet library, then the namespace ought to be Gtweet. ciao, Emmanuele. On Oct 23, 2012 7:15 PM, "Mohan R" wrote: > Fixed it, > > My mistake, annotations are wrong, because the name of the function is > 'g_tweet_object_samplestream', but the anotation says > 'tweet_object_samplestream'. Sorry to distrub you all. > > On Tue, 2012-10-23 at 21:11 +0530, Mohan R wrote: > > > /** > > * tweet_object_samplestream: > > * @tweetObject: a #TweetObject > > * @func: (closure userdata) (scope async): a callback function to > > invoke for every tweet > > * @userdata: (closure) (allow-none): data to be sent to the callback. > > */ > > void g_tweet_object_samplestream(GTweetObject *tweetObject, > > GTweetObjectStreamFunc func, > > gpointer userdata); > > > > Here is the fixed one, > > /** > * g_tweet_object_samplestream: > * @tweetObject: a #TweetObject > * @func: (closure user_data) (scope async): a callback function to > invoke for every tweet > * @user_data: (closure): data to be sent to the callback. > */ > void g_tweet_object_samplestream(GTweetObject *tweetObject, > GTweetObjectStreamFunc func, > gpointer user_data); > > g-ir-scanner writes this function like this, > >c:identifier="g_tweet_object_samplestream"> > > > > > transfer-ownership="none" > scope="async" > closure="1"> > a callback function to invoke > for every tweet >c:type="GTweetObjectStreamFunc"/> > > > data to be sent to the > callback. > > > > > > Thanks, > Mohan R > > ___ > gtk-devel-list mailing list > gtk-devel-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-devel-list > ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list
[Solved] Re: [gobject-introspection] callback without GDestroyNotify
Fixed it, My mistake, annotations are wrong, because the name of the function is 'g_tweet_object_samplestream', but the anotation says 'tweet_object_samplestream'. Sorry to distrub you all. On Tue, 2012-10-23 at 21:11 +0530, Mohan R wrote: > /** > * tweet_object_samplestream: > * @tweetObject: a #TweetObject > * @func: (closure userdata) (scope async): a callback function to > invoke for every tweet > * @userdata: (closure) (allow-none): data to be sent to the callback. > */ > void g_tweet_object_samplestream(GTweetObject *tweetObject, > GTweetObjectStreamFunc func, > gpointer userdata); > Here is the fixed one, /** * g_tweet_object_samplestream: * @tweetObject: a #TweetObject * @func: (closure user_data) (scope async): a callback function to invoke for every tweet * @user_data: (closure): data to be sent to the callback. */ void g_tweet_object_samplestream(GTweetObject *tweetObject, GTweetObjectStreamFunc func, gpointer user_data); g-ir-scanner writes this function like this, a callback function to invoke for every tweet data to be sent to the callback. Thanks, Mohan R ___ gtk-devel-list mailing list gtk-devel-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-devel-list