PHP: Optimize the previous commit a bit.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11594 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b5c49c20fd
commit
8da18d336e
1 changed files with 1 additions and 1 deletions
|
|
@ -1684,7 +1684,7 @@ public:
|
||||||
Printf(output, "\t\t\t$c='%s'.substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));\n", prefix);
|
Printf(output, "\t\t\t$c='%s'.substr(get_resource_type($r), (strpos(get_resource_type($r), '__') ? strpos(get_resource_type($r), '__') + 2 : 3));\n", prefix);
|
||||||
}
|
}
|
||||||
Printf(output, "\t\t\tif (!class_exists($c)) {\n");
|
Printf(output, "\t\t\tif (!class_exists($c)) {\n");
|
||||||
Printf(output, "\t\t\t\t$c = '%s';\n", Getattr(classLookup(d), "sym:name"));
|
Printf(output, "\t\t\t\treturn new %s($r);\n", Getattr(classLookup(d), "sym:name"));
|
||||||
Printf(output, "\t\t\t}\n");
|
Printf(output, "\t\t\t}\n");
|
||||||
Printf(output, "\t\t\treturn new $c($r);\n");
|
Printf(output, "\t\t\treturn new $c($r);\n");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue