src/stringpair.h
changeset 786 cd0c6d03e539
parent 281 9f7691853773
child 832 8a54e3a6b155
     1.1 --- a/src/stringpair.h	Fri Jul 01 08:55:04 2016 +0200
     1.2 +++ b/src/stringpair.h	Fri Jul 01 10:59:53 2016 +0200
     1.3 @@ -8,16 +8,16 @@
     1.4  
     1.5  
     1.6  typedef struct _stringpair_t {
     1.7 -    char * key;
     1.8 -    char * value;
     1.9 +    char * key;   // may point to "" but must not be NULL!
    1.10 +    char * value; // may point to "" but must not be NULL!
    1.11  } stringpair_t;
    1.12  
    1.13  
    1.14  // new_stringpair() - allocate new stringpair_t
    1.15  //
    1.16  //  parameters:
    1.17 -//      key (in)        utf-8 string used as key
    1.18 -//      value (in)      utf-8 string containing the value
    1.19 +//      key (in)        utf-8 string used as key; may point to "" but must not be NULL!
    1.20 +//      value (in)      utf-8 string containing the value; may point to "" but must not be NULL!
    1.21  //
    1.22  //  return value:
    1.23  //      pointer to stringpair_t or NULL on failure
    1.24 @@ -91,7 +91,7 @@
    1.25  //      pointer to last element in stringpair_list or NULL if out of memory
    1.26  //
    1.27  //  caveat:
    1.28 -//      the ownership of the value goes to the stringpair_list
    1.29 +//      the ownership of the value goes to the stringpair_list if add is successful
    1.30  
    1.31  DYNAMIC_API stringpair_list_t *stringpair_list_add(
    1.32          stringpair_list_t *stringpair_list,