diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index 3d590883f4943ee75646fe016a965ecc0da1abda..9ca2b0c00b871c2b7dea7e820b24a1a71b6745f3 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -829,7 +829,7 @@ extern "C" { #ifdef JAVASCRIPT typedef struct { - const char *name; + const char* name; JSNative call; uint8 nargs; const char* type; /* return type */ @@ -838,10 +838,21 @@ extern "C" { const char** alias; /* aliases */ } jsMethodSpec; - const char* jstype_void = "void"; - const char* jstype_bool = "boolean"; - const char* jstype_str = "string"; - const char* jstype_num = "number"; + #ifdef __cplusplus + + const char* jstype_void = "void"; + 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 */ DLLEXPORT int DLLCALL js_MethodsToFunctions(jsMethodSpec meth[], JSFunctionSpec func[]);