infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
Dynamic Library & Globals API

Functions for interacting with shared libraries and their global variables. More...

Collaboration diagram for Dynamic Library & Globals API:

Functions

infix_status infix_read_global (infix_library_t *, const char *, const char *, void *)
 Reads the value of a global variable from a loaded library.
 
infix_status infix_write_global (infix_library_t *, const char *, const char *, void *)
 Writes a value to a global variable in a loaded library.
 

Detailed Description

Functions for interacting with shared libraries and their global variables.

Function Documentation

◆ infix_read_global()

infix_status infix_read_global ( infix_library_t lib,
const char *  symbol_name,
const char *  type_signature,
void *  buffer 
)

Reads the value of a global variable from a loaded library.

Parameters
libA handle to a loaded dynamic library.
symbol_nameThe name of the global variable.
type_signatureA signature string describing the variable's type.
bufferA pointer to a buffer to store the value.
Returns
INFIX_SUCCESS on success.

◆ infix_write_global()

infix_status infix_write_global ( infix_library_t lib,
const char *  symbol_name,
const char *  type_signature,
void *  buffer 
)

Writes a value to a global variable in a loaded library.

Parameters
libA handle to a loaded dynamic library.
symbol_nameThe name of the global variable.
type_signatureA signature string describing the variable's type.
bufferA pointer to the new value.
Returns
INFIX_SUCCESS on success.