gobj_write_integer_attr()
#
The function gobj_write_integer_attr()
sets the value of an integer attribute in the given hgobj
object. It updates the attribute if it exists and triggers the mt_writing
method if defined.
Prototype
int gobj_write_integer_attr(
hgobj gobj,
const char *name,
json_int_t value
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
The name of the attribute to be updated. |
|
|
The new integer value to be assigned to the attribute. |
Return Value
Returns 0 on success, or -1 if the attribute is not found.
Notes
If the mt_writing
method is defined in the object’s gclass, it is called after updating the attribute.
Prototype
// Not applicable in JS
Prototype
# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples