[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,

      <method name="samplestream"
c:identifier="g_tweet_object_samplestream">
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <parameter name="func"
                     transfer-ownership="none"
                     scope="async"
                     closure="1">
            <doc xml:whitespace="preserve">a callback function to invoke
for every tweet</doc>
            <type name="TweetObjectStreamFunc"
                  c:type="GTweetObjectStreamFunc"/>
          </parameter>
          <parameter name="user_data" transfer-ownership="none">
            <doc xml:whitespace="preserve">data to be sent to the
callback.</doc>
            <type name="gpointer" c:type="gpointer"/>
          </parameter>
        </parameters>
      </method>

Thanks,
Mohan R



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]