Compare commits

..

No commits in common. "develop" and "v3.8.2-7" have entirely different histories.

10 changed files with 25 additions and 44 deletions

Binary file not shown.

View File

@ -22,10 +22,3 @@
#define %module_macro(m) %feature("module_macro","m") #define %module_macro(m) %feature("module_macro","m")
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method #define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
%define %virtual_inherit(klass)
%feature("virtual_inherit", "1") klass;
%typemap(in) klass *self
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
if (nullptr == $1) return true;%}
%enddef

View File

@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
$js_check_arg_count $js_check_arg_count
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%} SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
CC_UNUSED bool ok = true; CC_UNUSED bool ok = true;
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
%} %}
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
%fragment ("js_dtor", "templates") %fragment ("js_dtor", "templates")
%{ %{
static bool $jswrapper(se::State& s) { static bool $jswrapper(se::State& s) {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* - ${destructor_action}: The custom destructor action to invoke. * - ${destructor_action}: The custom destructor action to invoke.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
%{ %{
static bool $jswrapper(se::State& s) static bool $jswrapper(se::State& s)
{ {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}

Binary file not shown.

View File

@ -22,10 +22,3 @@
#define %module_macro(m) %feature("module_macro","m") #define %module_macro(m) %feature("module_macro","m")
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method #define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
%define %virtual_inherit(klass)
%feature("virtual_inherit", "1") klass;
%typemap(in) klass *self
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
if (nullptr == $1) return true;%}
%enddef

View File

@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
$js_check_arg_count $js_check_arg_count
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%} SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
CC_UNUSED bool ok = true; CC_UNUSED bool ok = true;
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
%} %}
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
%fragment ("js_dtor", "templates") %fragment ("js_dtor", "templates")
%{ %{
static bool $jswrapper(se::State& s) { static bool $jswrapper(se::State& s) {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* - ${destructor_action}: The custom destructor action to invoke. * - ${destructor_action}: The custom destructor action to invoke.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
%{ %{
static bool $jswrapper(se::State& s) static bool $jswrapper(se::State& s)
{ {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}

View File

@ -139,5 +139,7 @@ glslang (Built using https://github.com/YunHsiao/glslang/tree/build)
linux: 11.5.0 linux: 11.5.0
openharmony:11.5.0 (commit: 1978c76) openharmony:11.5.0 (commit: 1978c76)
swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.7 ) swig ( Built using https://github.com/cocos/swig/tree/cocos-se, executable files are downloaded from https://github.com/cocos/swig/releases/tag/cocos-v1.1.6 )
all: cocos-v1.1.7 (commit: 7969da2) win64: cocos-v1.1.6 (commit: f52be17)
mac: cocos-v1.1.6 (commit: f52be17)
linux: cocos-v1.1.6 (commit: f52be17)

Binary file not shown.

View File

@ -22,10 +22,3 @@
#define %module_macro(m) %feature("module_macro","m") #define %module_macro(m) %feature("module_macro","m")
#define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method #define %release_returned_cpp_object_in_gc(method) %feature("release_returned_cpp_object_in_gc", "1") method
%define %virtual_inherit(klass)
%feature("virtual_inherit", "1") klass;
%typemap(in) klass *self
%{ $1 = SE_THIS_OBJECT_VIRTUAL<$*ltype, cc::VirtualInheritBase>(s);
if (nullptr == $1) return true;%}
%enddef

View File

@ -22,7 +22,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
$js_check_arg_count $js_check_arg_count
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%} SE_BIND_CTOR($jswrapper, __jsb_$jsmangledname_class, js_delete_$jsdtor)%}
@ -61,7 +62,8 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
CC_UNUSED bool ok = true; CC_UNUSED bool ok = true;
$jslocals $jslocals
$jscode $jscode
$js_set_private_object auto *ptr = JSB_MAKE_PRIVATE_OBJECT_WITH_INSTANCE(result);
s.thisObject()->setPrivateObject(ptr);
return true; return true;
} }
%} %}
@ -84,20 +86,19 @@ static bool $jswrapper(se::State& s) // NOLINT(readability-identifier-naming)
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
%fragment ("js_dtor", "templates") %fragment ("js_dtor", "templates")
%{ %{
static bool $jswrapper(se::State& s) { static bool $jswrapper(se::State& s) {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* js_dtor: template for a destructor wrapper * js_dtor: template for a destructor wrapper
* - $classname_mangled: mangled class name * - $jsmangledname: mangled class name
* - $jstype: class type * - $jstype: class type
* - ${destructor_action}: The custom destructor action to invoke. * - ${destructor_action}: The custom destructor action to invoke.
* ----------------------------------------------------------------------------- */ * ----------------------------------------------------------------------------- */
@ -105,7 +106,6 @@ SE_BIND_FINALIZE_FUNC($jswrapper) %}
%{ %{
static bool $jswrapper(se::State& s) static bool $jswrapper(se::State& s)
{ {
cc::invokeOnGarbageCollectMethod<$jsclass_type>(s);
return true; return true;
} }
SE_BIND_FINALIZE_FUNC($jswrapper) %} SE_BIND_FINALIZE_FUNC($jswrapper) %}