Changeset 6829afc for cmd.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
  • cmd.c

    rd427f08 r6829afc  
    5656
    5757/* caller must free the return */
    58 G_GNUC_WARN_UNUSED_RESULT char *_owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc, const char *buff)
     58CALLER_OWN char *_owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc, const char *buff)
    5959{
    6060  char *retval = NULL;
     
    7373
    7474/* caller must free the return */
    75 G_GNUC_WARN_UNUSED_RESULT char *owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *cmdbuff)
     75CALLER_OWN char *owl_cmddict_execute(const owl_cmddict *cd, const owl_context *ctx, const char *cmdbuff)
    7676{
    7777  char **argv;
     
    9797
    9898/* caller must free the return */
    99 G_GNUC_WARN_UNUSED_RESULT char *owl_cmddict_execute_argv(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc)
     99CALLER_OWN char *owl_cmddict_execute_argv(const owl_cmddict *cd, const owl_context *ctx, const char *const *argv, int argc)
    100100{
    101101  char *buff;
     
    154154
    155155/* caller must free the result */
    156 G_GNUC_WARN_UNUSED_RESULT char *owl_cmd_execute(const owl_cmd *cmd, const owl_cmddict *cd, const owl_context *ctx, int argc, const char *const *argv, const char *cmdbuff)
     156CALLER_OWN char *owl_cmd_execute(const owl_cmd *cmd, const owl_cmddict *cd, const owl_context *ctx, int argc, const char *const *argv, const char *cmdbuff)
    157157{
    158158  static int alias_recurse_depth = 0;
     
    228228
    229229/* returns a summary line describing this keymap.  the caller must free. */
    230 G_GNUC_WARN_UNUSED_RESULT char *owl_cmd_describe(const owl_cmd *cmd)
     230CALLER_OWN char *owl_cmd_describe(const owl_cmd *cmd)
    231231{
    232232  if (!cmd || !cmd->name || !cmd->summary) return NULL;
Note: See TracChangeset for help on using the changeset viewer.