Dummy module should also show how to define constants

This commit is contained in:
2018-07-21 08:32:10 +02:00
parent b7caeefded
commit 9313276e09
2 changed files with 18 additions and 0 deletions

View File

@@ -10,9 +10,16 @@
/* Forward reference & declaration */
PH7_PRIVATE sxi32 initializeModule(ph7_vm *pVm, ph7_real *ver, SyString *desc);
/* Constants provided by DUMMY module */
static void PSHARP_DUMMY_CONSTANT_Const(ph7_value *pVal, void *pUserData);
/* Functions provided by DUMMY module */
int psharp_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg);
static const ph7_builtin_constant dummyConstList[] = {
{"DUMMY_CONSTANT", PSHARP_DUMMY_CONSTANT_Const},
};
static const ph7_builtin_func dummyFuncList[] = {
{"dummy_function", psharp_dummy_function },
};