Changeset b308cf9 for set.h


Ignore:
Timestamp:
2010-06-05T23:21:02Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
1fdb0a4
Parents:
3ab1d31 (diff), e774815 (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:

Merging libpurple branch into killerbee. It's fairly usable already, and
Debian packaging is now properly separated. This also picks up a load of
stuff from mainline it seems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • set.h

    r3ab1d31 rb308cf9  
    6969           set_setstr() should be able to free() the returned string! */
    7070        set_eval eval;
     71        void *eval_data;
    7172        struct set *next;
    7273} set_t;
    7374
    7475/* Should be pretty clear. */
    75 set_t *set_add( set_t **head, char *key, char *def, set_eval eval, void *data );
     76set_t *set_add( set_t **head, const char *key, const char *def, set_eval eval, void *data );
    7677
    7778/* Returns the raw set_t. Might be useful sometimes. */
    78 set_t *set_find( set_t **head, char *key );
     79set_t *set_find( set_t **head, const char *key );
    7980
    8081/* Returns a pointer to the string value of this setting. Don't modify the
    8182   returned string, and don't free() it! */
    82 G_MODULE_EXPORT char *set_getstr( set_t **head, char *key );
     83G_MODULE_EXPORT char *set_getstr( set_t **head, const char *key );
    8384
    8485/* Get an integer. In previous versions set_getint() was also used to read
    8586   boolean values, but this SHOULD be done with set_getbool() now! */
    86 G_MODULE_EXPORT int set_getint( set_t **head, char *key );
    87 G_MODULE_EXPORT int set_getbool( set_t **head, char *key );
     87G_MODULE_EXPORT int set_getint( set_t **head, const char *key );
     88G_MODULE_EXPORT int set_getbool( set_t **head, const char *key );
    8889
    8990/* set_setstr() strdup()s the given value, so after using this function
    9091   you can free() it, if you want. */
    91 int set_setstr( set_t **head, char *key, char *value );
    92 int set_setint( set_t **head, char *key, int value );
    93 void set_del( set_t **head, char *key );
    94 int set_reset( set_t **head, char *key );
     92int set_setstr( set_t **head, const char *key, char *value );
     93int set_setint( set_t **head, const char *key, int value );
     94void set_del( set_t **head, const char *key );
     95int set_reset( set_t **head, const char *key );
    9596
    9697/* Two very useful generic evaluators. */
    9798char *set_eval_int( set_t *set, char *value );
    9899char *set_eval_bool( set_t *set, char *value );
     100
     101/* Another more complicated one. */
     102char *set_eval_list( set_t *set, char *value );
    99103
    100104/* Some not very generic evaluators that really shouldn't be here... */
Note: See TracChangeset for help on using the changeset viewer.