Clean up the old disabled "script accessible destructor" code. I don't think

we'll want it again, but if we do we can retrieve it from CVS.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9417 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2006-10-06 10:30:44 +00:00
commit 110a537445

View file

@ -982,20 +982,11 @@ public:
int overloaded = 0; int overloaded = 0;
String *overname = 0; String *overname = 0;
int destructor = ( Cmp(nodeType, "destructor") == 0 ); if (Cmp(nodeType, "destructor") == 0) {
if ( destructor ) { // We just generate the Zend List Destructor and let Zend manage the
// We only generate the Zend List Destructor. Have // reference counting. There's no explicit destructor, but the user can
// Zend manage the reference counting. // just do `$obj = null;' to remove a reference to an object.
return CreateZendListDestructor(n); return CreateZendListDestructor(n);
#if 0
//If a script accessible destructor is desired/required, this code needs to be
//put back into play.
// Then we modify the wrap_action so it nulls out the self variable.
String *del = Getattr(n,"wrap:action");
Printf(del,"\nRETVAL_NULL();\n");
Setattr(n,"wrap:action",del);
#endif
} }
// Test for overloading; // Test for overloading;
@ -1041,12 +1032,8 @@ public:
} }
} else { } else {
// regular header // regular header
// We don't issue these for overloaded functions. // Not issued for overloaded functions or static member variables.
// destructors when using shadows. if (!overloaded && wrapperType != staticmembervar ) {
// And for static member variables
if (!overloaded &&
!(destructor && shadow && php_version == 4) &&
wrapperType != staticmembervar ) {
create_command(iname, wname); create_command(iname, wname);
} }
Printv(f->def, "ZEND_NAMED_FUNCTION(" , wname, ") {\n", NIL); Printv(f->def, "ZEND_NAMED_FUNCTION(" , wname, ") {\n", NIL);