Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 9c6915c7 authored by rswindell's avatar rswindell

Need to use preprocessor definitions for jstype string constants in C.

parent 9d806f37
...@@ -829,7 +829,7 @@ extern "C" { ...@@ -829,7 +829,7 @@ extern "C" {
#ifdef JAVASCRIPT #ifdef JAVASCRIPT
typedef struct { typedef struct {
const char *name; const char* name;
JSNative call; JSNative call;
uint8 nargs; uint8 nargs;
const char* type; /* return type */ const char* type; /* return type */
...@@ -838,10 +838,21 @@ extern "C" { ...@@ -838,10 +838,21 @@ extern "C" {
const char** alias; /* aliases */ const char** alias; /* aliases */
} jsMethodSpec; } jsMethodSpec;
const char* jstype_void = "void"; #ifdef __cplusplus
const char* jstype_bool = "boolean";
const char* jstype_str = "string"; const char* jstype_void = "void";
const char* jstype_num = "number"; const char* jstype_bool = "boolean";
const char* jstype_str = "string";
const char* jstype_num = "number";
#else
#define jstype_void "void"
#define jstype_bool "boolean"
#define jstype_str "string"
#define jstype_num "number"
#endif
/* main.cpp */ /* main.cpp */
DLLEXPORT int DLLCALL js_MethodsToFunctions(jsMethodSpec meth[], JSFunctionSpec func[]); DLLEXPORT int DLLCALL js_MethodsToFunctions(jsMethodSpec meth[], JSFunctionSpec func[]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment