Changeset 6829afc for perlconfig.c


Ignore:
Timestamp:
Jun 25, 2011, 3:26:15 AM (10 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
12294d2
Parents:
95b52d1
git-author:
David Benjamin <davidben@mit.edu> (06/24/11 22:56:15)
git-committer:
David Benjamin <davidben@mit.edu> (06/25/11 03:26:15)
Message:
Define CALLER_OWN macro

Replace our exising uses of G_GNUC_WARN_UNUSED_RESULT with it. The
old macro is just way too long. This also more clearly specifies the
intent.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlconfig.c

    rd427f08 r6829afc  
    2323
    2424
    25 G_GNUC_WARN_UNUSED_RESULT SV *owl_new_sv(const char * str)
     25CALLER_OWN SV *owl_new_sv(const char * str)
    2626{
    2727  SV *ret = newSVpv(str, 0);
     
    3636}
    3737
    38 G_GNUC_WARN_UNUSED_RESULT AV *owl_new_av(const owl_list *l, SV *(*to_sv)(const void *))
     38CALLER_OWN AV *owl_new_av(const owl_list *l, SV *(*to_sv)(const void *))
    3939{
    4040  AV *ret;
     
    5252}
    5353
    54 G_GNUC_WARN_UNUSED_RESULT HV *owl_new_hv(const owl_dict *d, SV *(*to_sv)(const void *))
     54CALLER_OWN HV *owl_new_hv(const owl_dict *d, SV *(*to_sv)(const void *))
    5555{
    5656  HV *ret;
     
    7575}
    7676
    77 G_GNUC_WARN_UNUSED_RESULT SV *owl_perlconfig_message2hashref(const owl_message *m)
     77CALLER_OWN SV *owl_perlconfig_message2hashref(const owl_message *m)
    7878{
    7979  HV *h, *stash;
     
    165165}
    166166
    167 G_GNUC_WARN_UNUSED_RESULT SV *owl_perlconfig_curmessage2hashref(void)
     167CALLER_OWN SV *owl_perlconfig_curmessage2hashref(void)
    168168{
    169169  int curmsg;
     
    183183   This has been somewhat addressed, but is still not lossless.
    184184 */
    185 G_GNUC_WARN_UNUSED_RESULT owl_message *owl_perlconfig_hashref2message(SV *msg)
     185CALLER_OWN owl_message *owl_perlconfig_hashref2message(SV *msg)
    186186{
    187187  owl_message * m;
     
    251251/* Calls in a scalar context, passing it a hash reference.
    252252   If return value is non-null, caller must free. */
    253 G_GNUC_WARN_UNUSED_RESULT char *owl_perlconfig_call_with_message(const char *subname, const owl_message *m)
     253CALLER_OWN char *owl_perlconfig_call_with_message(const char *subname, const owl_message *m)
    254254{
    255255  dSP ;
     
    300300   If the return value is non-null, the caller must free it.
    301301 */
    302 G_GNUC_WARN_UNUSED_RESULT char *owl_perlconfig_message_call_method(const owl_message *m, const char *method, int argc, const char **argv)
     302CALLER_OWN char *owl_perlconfig_message_call_method(const owl_message *m, const char *method, int argc, const char **argv)
    303303{
    304304  dSP;
     
    350350
    351351/* caller must free result, if not NULL */
    352 G_GNUC_WARN_UNUSED_RESULT char *owl_perlconfig_initperl(const char *file, int *Pargc, char ***Pargv, char ***Penv)
     352CALLER_OWN char *owl_perlconfig_initperl(const char *file, int *Pargc, char ***Pargv, char ***Penv)
    353353{
    354354  int ret;
     
    436436
    437437/* caller is responsible for freeing returned string */
    438 G_GNUC_WARN_UNUSED_RESULT char *owl_perlconfig_execute(const char *line)
     438CALLER_OWN char *owl_perlconfig_execute(const char *line)
    439439{
    440440  STRLEN len;
     
    506506
    507507/* caller must free the result */
    508 G_GNUC_WARN_UNUSED_RESULT char *owl_perlconfig_perlcmd(const owl_cmd *cmd, int argc, const char *const *argv)
     508CALLER_OWN char *owl_perlconfig_perlcmd(const owl_cmd *cmd, int argc, const char *const *argv)
    509509{
    510510  int i, count;
Note: See TracChangeset for help on using the changeset viewer.