Skip to content

Commit

Permalink
fix comment about memory for key
Browse files Browse the repository at this point in the history
  • Loading branch information
kroggen committed Feb 1, 2024
1 parent cad317b commit cc8ccfb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/binn.h
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ void * APIENTRY binn_object_read(const void *obj, const char *key, int *ptype, i

// on stack
BOOL APIENTRY binn_map_get_pair(const void *map, int pos, int *pid, binn *value);
BOOL APIENTRY binn_object_get_pair(const void *obj, int pos, char *pkey, binn *value); // must free the memory returned in the pkey
BOOL APIENTRY binn_object_get_pair(const void *obj, int pos, char *pkey, binn *value); // the key must be declared as: char key[256];

// allocated
binn * APIENTRY binn_map_pair(const void *map, int pos, int *pid);
binn * APIENTRY binn_object_pair(const void *obj, int pos, char *pkey); // must free the memory returned in the pkey
binn * APIENTRY binn_object_pair(const void *obj, int pos, char *pkey); // the key must be declared as: char key[256];

// these 2 functions return a pointer to the value and the data type
// they are thread-safe on big-endian devices
Expand Down

0 comments on commit cc8ccfb

Please sign in to comment.