More fixes for double generation of methods.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9385 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Olly Betts 2006-10-02 19:05:55 +00:00
commit 199d860862

View file

@ -887,15 +887,14 @@ public:
*/ */
void create_command(String *cname, String *iname) { void create_command(String *cname, String *iname) {
// This is for the single main function_entry record
if (wrapperType == standard) { if (wrapperType == standard) {
Printf(f_h, "ZEND_NAMED_FUNCTION(%s);\n", iname); Printf(f_h, "ZEND_NAMED_FUNCTION(%s);\n", iname);
} if (cs_entry) {
Printf(cs_entry," ZEND_NAMED_FE(%(lower)s,%s,NULL)\n", cname, iname);
// This is for the single main function_entry record } else {
if (cs_entry && wrapperType == standard) { Printf(s_entry," ZEND_NAMED_FE(%(lower)s,%s,NULL)\n", cname, iname);
Printf(cs_entry," ZEND_NAMED_FE(%(lower)s,%s,NULL)\n", cname, iname); }
} else {
Printf(s_entry," ZEND_NAMED_FE(%(lower)s,%s,NULL)\n", cname, iname);
} }
} }
/* ------------------------------------------------------------ /* ------------------------------------------------------------
@ -1546,7 +1545,7 @@ public:
const char *value = GetChar(p,"value"); const char *value = GetChar(p,"value");
if (value) { if (value) {
/* Check that value is a valid constant in PHP (and adjust it if /* Check that value is a valid constant in PHP (and adjust it if
* necessary, or replace it with "?" is it's just not valid). */ * necessary, or replace it with "?" if it's just not valid). */
SwigType *type = Getattr(p,"type"); SwigType *type = Getattr(p,"type");
switch (SwigType_type(type)) { switch (SwigType_type(type)) {
case T_BOOL: { case T_BOOL: {
@ -2298,16 +2297,15 @@ public:
// Write the enum initialisation code in a static block // Write the enum initialisation code in a static block
// These are all the enums defined within the C++ class. // These are all the enums defined within the C++ class.
free(shadow_classname); free(shadow_classname);
shadow_classname = NULL; shadow_classname = NULL;
Delete(shadow_set_vars); shadow_set_vars = NULL; Delete(shadow_set_vars); shadow_set_vars = NULL;
Delete(shadow_get_vars); shadow_get_vars = NULL; Delete(shadow_get_vars); shadow_get_vars = NULL;
Printf(all_cs_entry,"%s { NULL, NULL, NULL}\n};\n",cs_entry); Printv(all_cs_entry, cs_entry, " { NULL, NULL, NULL}\n};\n", NIL);
//??delete cs_entry; Delete(cs_entry);
cs_entry=NULL; cs_entry = NULL;
} else if (shadow && php_version == 5) { } else if (shadow && php_version == 5) {
DOH *key; DOH *key;
List *baselist = Getattr(n, "bases"); List *baselist = Getattr(n, "bases");