gobj_write_str_attr()
#
Sets the value of a string attribute in the given hgobj
object. If the attribute does not exist, a warning is logged.
Prototype
int gobj_write_str_attr(
hgobj gobj, /* Object whose attribute is being modified */
const char *name, /* Name of the attribute */
const char *value /* New string value to set */
);
Parameters
Key |
Type |
Description |
---|---|---|
|
|
The |
|
|
The name of the attribute to modify. |
|
|
The new string value to set. If |
Return Value
Returns 0
on success, or -1
if the attribute does not exist.
Notes
If the attribute does not exist in the hgobj
, a warning is logged. If the hgobj
has a mt_writing
method, 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