Use the correct JS lib for Debug/Release.
Errors are now also reported through debug_out to reduce the chance of missing them. This was SVN commit r640.
This commit is contained in:
parent
f55e9a72bd
commit
eb530b7d94
@ -14,7 +14,11 @@
|
||||
# define finite __finite // PT: Need to use _finite in MSVC, __finite in gcc
|
||||
#endif
|
||||
|
||||
#pragma comment (lib, "js32.lib")
|
||||
#ifdef NDEBUG
|
||||
# pragma comment (lib, "js32.lib")
|
||||
#else
|
||||
# pragma comment (lib, "js32d.lib")
|
||||
#endif
|
||||
|
||||
extern CConsole* g_Console;
|
||||
|
||||
@ -310,6 +314,8 @@ double ScriptingHost::ValueToDouble(const jsval value)
|
||||
|
||||
void ScriptingHost::ErrorReporter(JSContext * context, const char * message, JSErrorReport * report)
|
||||
{
|
||||
debug_out("%s(%d) : %s\n", report->filename, report->lineno, message);
|
||||
|
||||
if (g_Console)
|
||||
{
|
||||
g_Console->InsertMessage( L"%S ( %d )", report->filename, report->lineno );
|
||||
|
@ -3,7 +3,7 @@
|
||||
#define _SCRIPTINGHOST_H_
|
||||
|
||||
#ifdef _WIN32
|
||||
#define XP_WIN
|
||||
# define XP_WIN
|
||||
#endif
|
||||
|
||||
#include <jsapi.h>
|
||||
@ -69,8 +69,8 @@ public:
|
||||
|
||||
JSObject * CreateCustomObject(const std::string & typeName);
|
||||
|
||||
void SetObjectProperty(JSObject * object, const std::string & propertyName, jsval value);
|
||||
jsval GetObjectProperty( JSObject* object, const std::string& propertyName );
|
||||
void SetObjectProperty(JSObject * object, const std::string & propertyName, jsval value);
|
||||
jsval GetObjectProperty(JSObject * object, const std::string & propertyName);
|
||||
|
||||
void SetGlobal(const std::string& globalName, jsval value);
|
||||
jsval GetGlobal(const std::string& globalName);
|
||||
|
Loading…
Reference in New Issue
Block a user