mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
37 lines
676 B
C++
37 lines
676 B
C++
// engine_spidermonkey.h
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "engine.h"
|
|
|
|
#ifdef _WIN32
|
|
#define XP_WIN
|
|
#else
|
|
#define XP_UNIX
|
|
#endif
|
|
|
|
#ifdef MOZJS
|
|
#include "mozjs/jsapi.h"
|
|
#else
|
|
#include "js/jsapi.h"
|
|
#endif
|
|
|
|
namespace mongo {
|
|
|
|
class SMScope;
|
|
|
|
// internal things
|
|
void dontDeleteScope( SMScope * s ){}
|
|
void errorReporter( JSContext *cx, const char *message, JSErrorReport *report );
|
|
extern boost::thread_specific_ptr<SMScope> currentScope;
|
|
|
|
// bson
|
|
JSBool resolveBSONField( JSContext *cx, JSObject *obj, jsval id, uintN flags, JSObject **objp );
|
|
|
|
|
|
// mongo
|
|
void initMongoJS( SMScope * scope , JSContext * cx , JSObject * global , bool local );
|
|
|
|
}
|