Remove unused code from PHP backend
These are leftovers from the work on wrapping using only PHP's C API.
This commit is contained in:
parent
4467c94fe9
commit
bf68b377e6
1 changed files with 0 additions and 47 deletions
|
|
@ -494,7 +494,6 @@ public:
|
||||||
* things are being called in the wrong order
|
* things are being called in the wrong order
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Printv(s_init,s_resourcetypes,NIL);
|
|
||||||
Printf(s_oinit, " /* end oinit subsection */\n");
|
Printf(s_oinit, " /* end oinit subsection */\n");
|
||||||
Printf(s_init, "%s\n", s_oinit);
|
Printf(s_init, "%s\n", s_oinit);
|
||||||
|
|
||||||
|
|
@ -831,31 +830,6 @@ public:
|
||||||
* functionWrapper()
|
* functionWrapper()
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
|
|
||||||
/* Helper method for PHP::functionWrapper */
|
|
||||||
bool is_class(SwigType *t) {
|
|
||||||
Node *n = classLookup(t);
|
|
||||||
if (n) {
|
|
||||||
String *r = Getattr(n, "php:proxy"); // Set by classDeclaration()
|
|
||||||
if (!r)
|
|
||||||
r = Getattr(n, "sym:name"); // Not seen by classDeclaration yet, but this is the name
|
|
||||||
if (r)
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Helper method for PHP::functionWrapper to get class name for parameter*/
|
|
||||||
String *get_class_name(SwigType *t) {
|
|
||||||
Node *n = classLookup(t);
|
|
||||||
String *r = NULL;
|
|
||||||
if (n) {
|
|
||||||
r = Getattr(n, "php:proxy"); // Set by classDeclaration()
|
|
||||||
if (!r)
|
|
||||||
r = Getattr(n, "sym:name"); // Not seen by classDeclaration yet, but this is the name
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Helper function to check if class is wrapped */
|
/* Helper function to check if class is wrapped */
|
||||||
bool is_class_wrapped(String *className) {
|
bool is_class_wrapped(String *className) {
|
||||||
if (!className)
|
if (!className)
|
||||||
|
|
@ -864,18 +838,6 @@ public:
|
||||||
return n && Getattr(n, "classtype") != NULL;
|
return n && Getattr(n, "classtype") != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is special return type */
|
|
||||||
bool is_param_type_pointer(SwigType *t) {
|
|
||||||
|
|
||||||
if (SwigType_ispointer(t) ||
|
|
||||||
SwigType_ismemberpointer(t) ||
|
|
||||||
SwigType_isreference(t) ||
|
|
||||||
SwigType_isarray(t))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void generate_magic_property_methods(Node *class_node, String *base_class) {
|
void generate_magic_property_methods(Node *class_node, String *base_class) {
|
||||||
if (Equal(base_class, "Exception") || !is_class_wrapped(base_class)) {
|
if (Equal(base_class, "Exception") || !is_class_wrapped(base_class)) {
|
||||||
base_class = NULL;
|
base_class = NULL;
|
||||||
|
|
@ -1254,7 +1216,6 @@ public:
|
||||||
String *source;
|
String *source;
|
||||||
|
|
||||||
/* Skip ignored arguments */
|
/* Skip ignored arguments */
|
||||||
//while (Getattr(p,"tmap:ignore")) { p = Getattr(p,"tmap:ignore:next");}
|
|
||||||
while (checkAttribute(p, "tmap:in:numinputs", "0")) {
|
while (checkAttribute(p, "tmap:in:numinputs", "0")) {
|
||||||
p = Getattr(p, "tmap:in:next");
|
p = Getattr(p, "tmap:in:next");
|
||||||
}
|
}
|
||||||
|
|
@ -1268,14 +1229,6 @@ public:
|
||||||
Printf(f->code, "\tif(arg_count > %d) {\n", i);
|
Printf(f->code, "\tif(arg_count > %d) {\n", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
String *paramType_class = NULL;
|
|
||||||
bool paramType_valid = is_class(pt);
|
|
||||||
|
|
||||||
if (paramType_valid) {
|
|
||||||
paramType_class = get_class_name(pt);
|
|
||||||
Chop(paramType_class);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((tm = Getattr(p, "tmap:in"))) {
|
if ((tm = Getattr(p, "tmap:in"))) {
|
||||||
Replaceall(tm, "$input", source);
|
Replaceall(tm, "$input", source);
|
||||||
Setattr(p, "emit:input", source);
|
Setattr(p, "emit:input", source);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue