Changeset View
Changeset View
Standalone View
Standalone View
source/scriptinterface/ScriptInterface.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | |||||
// (This should be as small as possible (for compiler efficiency), | // (This should be as small as possible (for compiler efficiency), | ||||
// but as large as necessary for all wrapped functions) | // but as large as necessary for all wrapped functions) | ||||
#define SCRIPT_INTERFACE_MAX_ARGS 8 | #define SCRIPT_INTERFACE_MAX_ARGS 8 | ||||
class ScriptInterface; | class ScriptInterface; | ||||
struct ScriptInterface_impl; | struct ScriptInterface_impl; | ||||
class ScriptContext; | class ScriptContext; | ||||
// Using a global object for the context is a workaround until Simulation, AI, etc, | // Using a global object for the context is a workaround until Simulation, AI, etc, | ||||
// use their own threads and also their own contexts. | // use their own threads and also their own contexts. | ||||
extern thread_local shared_ptr<ScriptContext> g_ScriptContext; | extern thread_local shared_ptr<ScriptContext> g_ScriptContext; | ||||
/** | /** | ||||
* RAII structure which encapsulates an access to the context and compartment of a ScriptInterface. | * RAII structure which encapsulates an access to the context and compartment of a ScriptInterface. | ||||
* This struct provides: | * This struct provides: | ||||
* - a pointer to the context, while acting like JSAutoRequest | * - a pointer to the context, while acting like JSAutoRequest | ||||
▲ Show 20 Lines • Show All 551 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator