AerScript on the read
This commit is contained in:
parent
b0cbf5c0f6
commit
7afe2c7c41
@ -1,11 +1,11 @@
|
|||||||
#include "dummy.h"
|
#include "dummy.h"
|
||||||
|
|
||||||
static void PSHARP_DUMMY_CONSTANT_Const(ph7_value *pVal, void *pUserData) {
|
static void AER_DUMMY_CONSTANT_Const(ph7_value *pVal, void *pUserData) {
|
||||||
SXUNUSED(pUserData); /* cc warning */
|
SXUNUSED(pUserData); /* cc warning */
|
||||||
ph7_value_bool(pVal, 1);
|
ph7_value_bool(pVal, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int psharp_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg) {
|
int aer_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg) {
|
||||||
SyString dummy;
|
SyString dummy;
|
||||||
const char *text = "Hello world from dummy module!";
|
const char *text = "Hello world from dummy module!";
|
||||||
SyStringInitFromBuf(&dummy, text, SyStrlen(text));
|
SyStringInitFromBuf(&dummy, text, SyStrlen(text));
|
||||||
|
@ -11,17 +11,17 @@
|
|||||||
PH7_PRIVATE sxi32 initializeModule(ph7_vm *pVm, ph7_real *ver, SyString *desc);
|
PH7_PRIVATE sxi32 initializeModule(ph7_vm *pVm, ph7_real *ver, SyString *desc);
|
||||||
|
|
||||||
/* Constants provided by DUMMY module */
|
/* Constants provided by DUMMY module */
|
||||||
static void PSHARP_DUMMY_CONSTANT_Const(ph7_value *pVal, void *pUserData);
|
static void AER_DUMMY_CONSTANT_Const(ph7_value *pVal, void *pUserData);
|
||||||
|
|
||||||
/* Functions provided by DUMMY module */
|
/* Functions provided by DUMMY module */
|
||||||
int psharp_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg);
|
int aer_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg);
|
||||||
|
|
||||||
static const ph7_builtin_constant dummyConstList[] = {
|
static const ph7_builtin_constant dummyConstList[] = {
|
||||||
{"DUMMY_CONSTANT", PSHARP_DUMMY_CONSTANT_Const},
|
{"DUMMY_CONSTANT", AER_DUMMY_CONSTANT_Const},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const ph7_builtin_func dummyFuncList[] = {
|
static const ph7_builtin_func dummyFuncList[] = {
|
||||||
{"dummy_function", psharp_dummy_function },
|
{"dummy_function", aer_dummy_function },
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user