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
|
# define finite __finite // PT: Need to use _finite in MSVC, __finite in gcc
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma comment (lib, "js32.lib")
|
#ifdef NDEBUG
|
||||||
|
# pragma comment (lib, "js32.lib")
|
||||||
|
#else
|
||||||
|
# pragma comment (lib, "js32d.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
extern CConsole* g_Console;
|
extern CConsole* g_Console;
|
||||||
|
|
||||||
@ -310,6 +314,8 @@ double ScriptingHost::ValueToDouble(const jsval value)
|
|||||||
|
|
||||||
void ScriptingHost::ErrorReporter(JSContext * context, const char * message, JSErrorReport * report)
|
void ScriptingHost::ErrorReporter(JSContext * context, const char * message, JSErrorReport * report)
|
||||||
{
|
{
|
||||||
|
debug_out("%s(%d) : %s\n", report->filename, report->lineno, message);
|
||||||
|
|
||||||
if (g_Console)
|
if (g_Console)
|
||||||
{
|
{
|
||||||
g_Console->InsertMessage( L"%S ( %d )", report->filename, report->lineno );
|
g_Console->InsertMessage( L"%S ( %d )", report->filename, report->lineno );
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#define _SCRIPTINGHOST_H_
|
#define _SCRIPTINGHOST_H_
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define XP_WIN
|
# define XP_WIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <jsapi.h>
|
#include <jsapi.h>
|
||||||
@ -69,8 +69,8 @@ public:
|
|||||||
|
|
||||||
JSObject * CreateCustomObject(const std::string & typeName);
|
JSObject * CreateCustomObject(const std::string & typeName);
|
||||||
|
|
||||||
void SetObjectProperty(JSObject * object, const std::string & propertyName, jsval value);
|
void SetObjectProperty(JSObject * object, const std::string & propertyName, jsval value);
|
||||||
jsval GetObjectProperty( JSObject* object, const std::string& propertyName );
|
jsval GetObjectProperty(JSObject * object, const std::string & propertyName);
|
||||||
|
|
||||||
void SetGlobal(const std::string& globalName, jsval value);
|
void SetGlobal(const std::string& globalName, jsval value);
|
||||||
jsval GetGlobal(const std::string& globalName);
|
jsval GetGlobal(const std::string& globalName);
|
||||||
|
Loading…
Reference in New Issue
Block a user