Browse Source

AerScript on the read

pull/44/head
Rafal Kupiec 3 years ago
parent
commit
7afe2c7c41
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
2 changed files with 6 additions and 6 deletions
  1. +2
    -2
      modules/dummy/dummy.c
  2. +4
    -4
      modules/dummy/dummy.h

+ 2
- 2
modules/dummy/dummy.c View File

@ -1,11 +1,11 @@
#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 */
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;
const char *text = "Hello world from dummy module!";
SyStringInitFromBuf(&dummy, text, SyStrlen(text));


+ 4
- 4
modules/dummy/dummy.h View File

@ -11,17 +11,17 @@
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);
static void AER_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);
int aer_dummy_function(ph7_context *pCtx, int nArg, ph7_value **apArg);
static const ph7_builtin_constant dummyConstList[] = {
{"DUMMY_CONSTANT", PSHARP_DUMMY_CONSTANT_Const},
{"DUMMY_CONSTANT", AER_DUMMY_CONSTANT_Const},
};
static const ph7_builtin_func dummyFuncList[] = {
{"dummy_function", psharp_dummy_function },
{"dummy_function", aer_dummy_function },
};
#endif

Loading…
Cancel
Save