31#define PHASOR_API __declspec(dllexport)
33#define PHASOR_API __declspec(dllimport)
35#elif defined(__GNUC__) || defined(__clang__)
37#define PHASOR_API __attribute__((visibility("default")))
68 PHASOR_API int exec(
void *state,
const unsigned char *bytecode,
size_t bytecodeSize,
const char *moduleName,
69 int argc,
const char **argv);
84 PHASOR_API int execFuncInt(
void *state,
const unsigned char *bytecode,
size_t bytecodeSize,
const char *moduleName,
85 int argc,
const char **argv,
const char *functionName);
103 const char *moduleName,
int argc,
const char **argv,
104 const char *functionName);
117 PHASOR_API int evaluatePHS(
void *state,
const char *script,
const char *moduleName,
const char *modulePath,
149 unsigned char *buffer,
size_t bufferSize,
size_t *outSize);
166 PHASOR_API bool compilePUL(
const char *script,
const char *moduleName,
unsigned char *buffer,
size_t bufferSize,
PHASOR_API bool compilePHS(const char *script, const char *moduleName, const char *modulePath, unsigned char *buffer, size_t bufferSize, size_t *outSize)
Compiles a Phasor Programming Language script into Phasor VM bytecode.
PHASOR_API const char * execFuncString(void *state, const unsigned char *bytecode, size_t bytecodeSize, const char *moduleName, int argc, const char **argv, const char *functionName)
Executes a function from pre-compiled Phasor bytecode, and casts return to an string.
PHASOR_API int evaluatePUL(void *state, const char *script, const char *moduleName)
Executes a Pulsar Scripting Language script.
PHASOR_API int exec(void *state, const unsigned char *bytecode, size_t bytecodeSize, const char *moduleName, int argc, const char **argv)
Executes pre-compiled Phasor bytecode.
PHASOR_API bool compilePUL(const char *script, const char *moduleName, unsigned char *buffer, size_t bufferSize, size_t *outSize)
Compiles a Pulsar Scripting Language script into Phasor VM bytecode.
PHASOR_API const char * getVersion()
Get the version string for Phasor VM.
PHASOR_API bool resetState(void *state, bool resetFunctions, bool resetVariables)
Resets the state.
PHASOR_API void * createState()
Creates a new state instance.
PHASOR_API void initStdLib(void *state)
Register standard library to state instance.
PHASOR_API bool freeState(void *state)
Frees an existing state instance.
PHASOR_API int evaluatePHS(void *state, const char *script, const char *moduleName, const char *modulePath, bool verbose)
Executes a Phasor Programming Language script.
PHASOR_API int execFuncInt(void *state, const unsigned char *bytecode, size_t bytecodeSize, const char *moduleName, int argc, const char **argv, const char *functionName)
Executes a function from pre-compiled Phasor bytecode, and casts return to an integer.