gobj_incr_stat()

gobj_incr_stat()#

Increments the specified statistic attribute of the given hgobj by a given value and returns the new value.

Prototype

json_int_t gobj_incr_stat(
    hgobj gobj,
    const char *path,
    json_int_t value
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance whose statistic attribute is to be incremented.

path

const char *

The path to the statistic attribute to be incremented.

value

json_int_t

The amount by which to increment the statistic attribute.


Return Value

The new value of the statistic attribute after incrementing.

Notes

If the statistic attribute does not exist, it is initialized to zero before incrementing.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples