Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing registerClass. No more wrap: unnecessary attributes

  • Loading branch information...
commit c6dd6b0726342b32579a0b6467128804581b9f92 1 parent fadc9c8
@v-for-vandal v-for-vandal authored
Showing with 3 additions and 6 deletions.
  1. +3 −6 Source/Modules/lua.cxx
View
9 Source/Modules/lua.cxx
@@ -1014,7 +1014,6 @@ class LUA:public Language {
/* ------------------------------------------------------------
* variableWrapper()
* ------------------------------------------------------------ */
-
virtual int variableWrapper(Node *n) {
/* NEW LANGUAGE NOTE:***********************************************
Language::variableWrapper(n) will generate two wrapper fns
@@ -1239,8 +1238,7 @@ class LUA:public Language {
* Helper function that adds record to appropriate
* C arrays
* ------------------------------------------------------------ */
- void registerClass(String *scope, Node *n) {
- String *wrap_class = Getattr(n,"wrap:class_name");
+ void registerClass(String *scope, String *wrap_class) {
assert(wrap_class);
Hash *nspaceHash = getCArraysHash(scope);
String *ns_classes = Getattr(nspaceHash, "classes");
@@ -1354,16 +1352,15 @@ class LUA:public Language {
SwigType_add_pointer(t);
// Catch all: eg. a class with only static functions and/or variables will not have 'remembered'
- String *wrap_class_name = NewStringf("_wrap_class_%s", mangled_full_proxy_class_name);
+ String *wrap_class_name = Swig_name_wrapper(NewStringf("class_%s", mangled_full_proxy_class_name));
String *wrap_class = NewStringf("&%s", wrap_class_name);
- Setattr(n, "wrap:class_name", wrap_class_name);
SwigType_remember_clientdata(t, wrap_class);
String *rt = Copy(getClassType());
SwigType_add_pointer(rt);
// Adding class to apropriate namespace
- registerClass(nspace, n);
+ registerClass(nspace, wrap_class_name);
Hash *nspaceHash = getCArraysHash(nspace);
// Register the class structure with the type checker
Please sign in to comment.
Something went wrong with that request. Please try again.