![]() |
Phasor 2.2.0
Stack VM based Programming Language
|
#include <stdint.h>#include <stddef.h>#include <stdbool.h>Go to the source code of this file.
Classes | |
| struct | PhasorValue |
| struct | PhasorAPI |
Macros | |
| #define | PHASOR_FFI_EXPORT |
Typedefs | |
| typedef struct PhasorVM | PhasorVM |
| typedef struct PhasorValue | PhasorValue |
| typedef PhasorValue(* | PhasorNativeFunction) (PhasorVM *vm, int argc, const PhasorValue *argv) |
| typedef void(* | PhasorRegisterFunction) (PhasorVM *vm, const char *name, PhasorNativeFunction func) |
Enumerations | |
| enum | PhasorValueType { PHASOR_TYPE_NULL , PHASOR_TYPE_BOOL , PHASOR_TYPE_INT , PHASOR_TYPE_FLOAT , PHASOR_TYPE_STRING , PHASOR_TYPE_ARRAY } |
Functions | |
| static PhasorValue | phasor_make_null () |
| static PhasorValue | phasor_make_bool (bool b) |
| static PhasorValue | phasor_make_int (int64_t i) |
| static PhasorValue | phasor_make_float (double f) |
| static PhasorValue | phasor_make_string (const char *s) |
| static PhasorValue | phasor_make_array (const PhasorValue *elements, size_t count) |
| static bool | phasor_is_null (PhasorValue val) |
| static bool | phasor_is_bool (PhasorValue val) |
| static bool | phasor_is_int (PhasorValue val) |
| static bool | phasor_is_float (PhasorValue val) |
| static bool | phasor_is_string (PhasorValue val) |
| static bool | phasor_is_array (PhasorValue val) |
| static bool | phasor_is_number (PhasorValue val) |
| static bool | phasor_to_bool (PhasorValue val) |
| static int64_t | phasor_to_int (PhasorValue val) |
| static double | phasor_to_float (PhasorValue val) |
| static const char * | phasor_to_string (PhasorValue val) |
| PHASOR_FFI_EXPORT void | phasor_plugin_entry (const PhasorAPI *api, PhasorVM *vm) |
| The one and only entry point for a Phasor plugin. | |
| #define PHASOR_FFI_EXPORT |
Definition at line 34 of file PhasorFFI.h.
| typedef PhasorValue(* PhasorNativeFunction) (PhasorVM *vm, int argc, const PhasorValue *argv) |
Definition at line 148 of file PhasorFFI.h.
| typedef void(* PhasorRegisterFunction) (PhasorVM *vm, const char *name, PhasorNativeFunction func) |
Definition at line 151 of file PhasorFFI.h.
| typedef struct PhasorValue PhasorValue |
Definition at line 57 of file PhasorFFI.h.
Definition at line 42 of file PhasorFFI.h.
| enum PhasorValueType |
| Enumerator | |
|---|---|
| PHASOR_TYPE_NULL | |
| PHASOR_TYPE_BOOL | |
| PHASOR_TYPE_INT | |
| PHASOR_TYPE_FLOAT | |
| PHASOR_TYPE_STRING | |
| PHASOR_TYPE_ARRAY | |
Definition at line 45 of file PhasorFFI.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 125 of file PhasorFFI.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Definition at line 124 of file PhasorFFI.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
| PHASOR_FFI_EXPORT void phasor_plugin_entry | ( | const PhasorAPI * | api, |
| PhasorVM * | vm ) |
The one and only entry point for a Phasor plugin.
A Phasor-compatible shared library MUST export a C function with this exact signature. The Phasor host will call this function when the plugin is loaded, providing the plugin with a pointer to the host's API functions and the current VM instance.
| api | A pointer to a struct containing function pointers that the plugin can use to interact with the host (e.g., register functions). |
| vm | An opaque pointer to the VM instance. This should be passed back to any API functions that require it. |
Definition at line 150 of file posix_bindings.c.
|
inlinestatic |
Definition at line 134 of file PhasorFFI.h.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |