hashtable_set

Add/modify value in hashtable

package nothrow @trusted @nogc
int
hashtable_set
(,
scope const char* key
,
size_t key_len
,)

Parameters

hashtable_ .hashtable_t*

The hashtable object

key char*

The key

key_len size_t

The length of key

value jansson_d.jansson.json_t*

The value

If a value with the given key already exists, its value is replaced with the new value. Value is "stealed" in the sense that hashtable doesn't increment its refcount but decreases the refcount when the value is no longer needed.

Return Value

Type: int

0 on success, -1 on failure (out of memory).

Meta