Changeset d8e2f07 for owl.h


Ignore:
Timestamp:
Jun 25, 2011, 4:11:19 AM (13 years ago)
Author:
GitHub Merge Button <merge-button@github.com>
Parents:
95b52d1 (diff), 2560529 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge 2560529186e398f85a038e8683d29058857eb7b7 into 95b52d17a566adefc77f07749218fe0cb33a66b2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.h

    r95b52d1 r2560529  
    199199#define OWL_ENABLE_ZCRYPT 1
    200200#endif
     201
     202/* Annotate functions in which the caller owns the return value and is
     203 * responsible for ensuring it is freed. */
     204#define CALLER_OWN G_GNUC_WARN_UNUSED_RESULT
    201205
    202206#define OWL_META(key) ((key)|010000)
     
    251255                                 * WARNING:  this approach is hard to make
    252256                                 * thread-safe... */
    253   char G_GNUC_WARN_UNUSED_RESULT *(*get_tostring_fn)(const struct _owl_variable *v, const void *val);
     257  CALLER_OWN char *(*get_tostring_fn)(const struct _owl_variable *v, const void *val);
    254258                                /* converts val to a string;
    255259                                 * caller must free the result */
     
    266270  GString *buff;
    267271} owl_fmtext;
    268 
    269 typedef struct _owl_list {
    270   int size;
    271   int avail;
    272   void **list;
    273 } owl_list;
    274272
    275273typedef struct _owl_dict_el {
     
    313311 
    314312  /* These don't take any context */
    315   char G_GNUC_WARN_UNUSED_RESULT *(*cmd_args_fn)(int argc, const char *const *argv, const char *buff);
     313  CALLER_OWN char *(*cmd_args_fn)(int argc, const char *const *argv, const char *buff);
    316314                                /* takes argv and the full command as buff.
    317315                                 * caller must free return value if !NULL */
     
    320318
    321319  /* The following also take the active context if it's valid */
    322   char G_GNUC_WARN_UNUSED_RESULT *(*cmd_ctxargs_fn)(void *ctx, int argc, const char *const *argv, const char *buff);
     320  CALLER_OWN char *(*cmd_ctxargs_fn)(void *ctx, int argc, const char *const *argv, const char *buff);
    323321                                /* takes argv and the full command as buff.
    324322                                 * caller must free return value if !NULL */
     
    338336  char *zsig;
    339337  char *message;
    340   owl_list recips;
     338  GPtrArray *recips;
    341339  int cc;
    342340  int noping;
     
    359357  int delete;
    360358  const char *hostname;
    361   owl_list attributes;            /* this is a list of pairs */
     359  GPtrArray *attributes;          /* this is a list of pairs */
    362360  char *timestr;
    363361  time_t time;
     
    418416
    419417typedef struct _owl_messagelist {
    420   owl_list list;
     418  GPtrArray *list;
    421419} owl_messagelist;
    422420
     
    481479  char     *name;               /* name of keymap */
    482480  char     *desc;               /* description */
    483   owl_list  bindings;           /* key bindings */
     481  GPtrArray *bindings;          /* key bindings */
    484482  const struct _owl_keymap *parent;     /* parent */
    485483  void (*default_fn)(owl_input j);      /* default action (takes a keypress) */
     
    504502
    505503typedef struct _owl_buddylist {
    506   owl_list buddies;
     504  GPtrArray *buddies;
    507505} owl_buddylist;
    508506
    509507typedef struct _owl_zbuddylist {
    510   owl_list zusers;
     508  GPtrArray *zusers;
    511509} owl_zbuddylist;
    512510
    513511typedef struct _owl_errqueue {
    514   owl_list errlist;
     512  GPtrArray *errlist;
    515513} owl_errqueue;
    516514
     
    538536  owl_dict filters;
    539537  GList *filterlist;
    540   owl_list puntlist;
     538  GPtrArray *puntlist;
    541539  owl_vardict vars;
    542540  owl_cmddict cmds;
Note: See TracChangeset for help on using the changeset viewer.