gobj_save_persistent_attrs()
#
The function gobj_save_persistent_attrs()
saves the persistent attributes of a given hgobj
object. It ensures that only named gobjs (services) can store persistent attributes.
Prototype
int gobj_save_persistent_attrs(
hgobj gobj,
json_t *jn_attrs // owned
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
A JSON object containing the attributes to be saved. It can be a string, a list of keys, or a dictionary with the keys to be saved. |
Return Value
Returns 0 on success, or -1 if the operation fails.
Notes
This function requires that the hgobj
is a named gobj (service). If the global save function is not set, the function will return -1.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples