JavaScript: Added missing static modifiers to avoid duplicate symbol problems with multiple SWIG modules.
This commit is contained in:
parent
95f09b49d2
commit
aa55154ccf
3 changed files with 32 additions and 32 deletions
|
|
@ -8,7 +8,7 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_ctor", "templates")
|
||||
%{
|
||||
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
if(argc != $jsargcount) SWIG_exception_fail(SWIG_ERROR, "Illegal number of arguments for $jswrapper.");
|
||||
|
|
@ -28,7 +28,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_veto_ctor", "templates")
|
||||
%{
|
||||
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
||||
static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
||||
size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
SWIG_exception(SWIG_ERROR, "Class $jsname can not be instantiated");
|
||||
|
|
@ -44,7 +44,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_ctor_dispatcher", "templates")
|
||||
%{
|
||||
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
||||
static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
||||
size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
JSObjectRef thisObject = NULL;
|
||||
|
|
@ -70,7 +70,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef ctorObject,
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_overloaded_ctor", "templates")
|
||||
%{
|
||||
JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
static JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
$jscode
|
||||
|
|
@ -105,7 +105,7 @@ JSObjectRef $jswrapper(JSContextRef context, JSObjectRef thisObject, size_t argc
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_dtor", "templates")
|
||||
%{
|
||||
void $jswrapper(JSObjectRef thisObject)
|
||||
static void $jswrapper(JSObjectRef thisObject)
|
||||
{
|
||||
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
|
||||
if(t && t->swigCMemOwn) free (($jstype)t->swigCObject);
|
||||
|
|
@ -121,7 +121,7 @@ void $jswrapper(JSObjectRef thisObject)
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_dtoroverride", "templates")
|
||||
%{
|
||||
void $jswrapper(JSObjectRef thisObject)
|
||||
static void $jswrapper(JSObjectRef thisObject)
|
||||
{
|
||||
SwigPrivData* t = (SwigPrivData*) JSObjectGetPrivate(thisObject);
|
||||
if(t && t->swigCMemOwn) {
|
||||
|
|
@ -140,7 +140,7 @@ void $jswrapper(JSObjectRef thisObject)
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_getter", "templates")
|
||||
%{
|
||||
JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
|
||||
static JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
JSValueRef jsresult;
|
||||
|
|
@ -162,7 +162,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_setter", "templates")
|
||||
%{
|
||||
bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
|
||||
static bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef propertyName, JSValueRef value, JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
$jscode
|
||||
|
|
@ -183,7 +183,7 @@ bool $jswrapper(JSContextRef context, JSObjectRef thisObject, JSStringRef proper
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_function", "templates")
|
||||
%{
|
||||
JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
static JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
JSValueRef jsresult;
|
||||
|
|
@ -208,7 +208,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef th
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_function_dispatcher", "templates")
|
||||
%{
|
||||
JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
static JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception)
|
||||
{
|
||||
$jslocals
|
||||
JSValueRef jsresult;
|
||||
|
|
@ -232,7 +232,7 @@ JSValueRef $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef th
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("js_overloaded_function", "templates")
|
||||
%{
|
||||
int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result)
|
||||
static int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argc, const JSValueRef argv[], JSValueRef* exception, JSValueRef* p_result)
|
||||
{
|
||||
$jslocals
|
||||
JSValueRef jsresult;
|
||||
|
|
@ -291,11 +291,11 @@ int $jswrapper(JSContextRef context, JSObjectRef function, JSObjectRef thisObjec
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("jsc_class_declaration", "templates")
|
||||
%{
|
||||
JSClassDefinition $jsmangledname_classDefinition;
|
||||
static JSClassDefinition $jsmangledname_classDefinition;
|
||||
|
||||
JSClassDefinition $jsmangledname_objectDefinition;
|
||||
static JSClassDefinition $jsmangledname_objectDefinition;
|
||||
|
||||
JSClassRef $jsmangledname_classRef;
|
||||
static JSClassRef $jsmangledname_classRef;
|
||||
%}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
@ -308,22 +308,22 @@ JSClassRef $jsmangledname_classRef;
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("jsc_class_tables", "templates")
|
||||
%{
|
||||
JSStaticValue $jsmangledname_staticValues[] = {
|
||||
static JSStaticValue $jsmangledname_staticValues[] = {
|
||||
$jsstaticclassvariables
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
JSStaticFunction $jsmangledname_staticFunctions[] = {
|
||||
static JSStaticFunction $jsmangledname_staticFunctions[] = {
|
||||
$jsstaticclassfunctions
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
JSStaticValue $jsmangledname_values[] = {
|
||||
static JSStaticValue $jsmangledname_values[] = {
|
||||
$jsclassvariables
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
JSStaticFunction $jsmangledname_functions[] = {
|
||||
static JSStaticFunction $jsmangledname_functions[] = {
|
||||
$jsclassfunctions
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
|
@ -382,17 +382,17 @@ JSStaticFunction $jsmangledname_functions[] = {
|
|||
* ----------------------------------------------------------------------------- */
|
||||
%fragment ("jsc_nspace_declaration", "templates")
|
||||
%{
|
||||
JSStaticValue $jsnspace_values[] = {
|
||||
static JSStaticValue $jsnspace_values[] = {
|
||||
$jsglobalvariables
|
||||
{ 0, 0, 0, 0 }
|
||||
};
|
||||
|
||||
JSStaticFunction $jsnspace_functions[] = {
|
||||
static JSStaticFunction $jsnspace_functions[] = {
|
||||
$jsglobalfunctions
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
|
||||
JSClassDefinition $jsnspace_classDefinition;
|
||||
static JSClassDefinition $jsnspace_classDefinition;
|
||||
%}
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue