From 33c9a7623c5f249e2954f16b80f9a212c0347530 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Thu, 5 Sep 2002 02:45:29 +0000 Subject: [PATCH] Created a macro JSDOCSTR() which is used to eliminate static strings, used only for JS documentation generation, from release (non-debug) builds. --- src/sbbs3/sbbs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index c87323f174..1e8b8f8eaa 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -840,9 +840,17 @@ extern "C" { #define JSTYPE_ARRAY JSTYPE_LIMIT + #ifdef _DEBUG /* String compiled into debug build only, for JS documentation generation */ + #define JSDOCSTR(s) s + #else + #define JSDOCSTR(s) "" + #endif + /* main.cpp */ DLLEXPORT int DLLCALL js_MethodsToFunctions(jsMethodSpec meth[], JSFunctionSpec func[]); DLLEXPORT JSBool DLLCALL js_DefineMethods(JSContext* cx, JSObject* obj, jsMethodSpec *fs); + DLLEXPORT JSBool DLLCALL js_CreateArrayOfStrings(JSContext* cx, JSObject* parent + ,const char* name, char* str[], uintN flags); /* js_global.c */ DLLEXPORT JSObject* DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg); -- GitLab