gobj_local_method()

gobj_local_method()#

Executes a local method (lmethod) on the given hgobj instance, passing the provided keyword arguments (kw) and source object (src).

Prototype

json_t *gobj_local_method(
    hgobj gobj,
    const char *lmethod,
    json_t *kw,
    hgobj src
);

Parameters

Key

Type

Description

gobj

hgobj

The hgobj instance on which the local method is executed.

lmethod

const char *

The name of the local method to execute.

kw

json_t *

A JSON object containing the keyword arguments for the method. The ownership of this parameter is transferred to the function.

src

hgobj

The source hgobj instance invoking the method.


Return Value

Returns a JSON object containing the result of the executed method, or NULL if the method is not found or an error occurs.

Notes

If the specified lmethod is not found in the local method table (lmt), an error is logged, and NULL is returned.

Prototype

// Not applicable in JS

Prototype

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