Revert introduction of python:defaultargs feature

See issue #294
This commit is contained in:
William S Fulton 2015-01-12 21:35:47 +00:00
commit 9d87b9f099
7 changed files with 29 additions and 55 deletions

View file

@ -1975,33 +1975,29 @@ public:
bool is_representable = true;
if (Getattr(n, "sym:overloaded")) {
if (GetFlag(n, "feature:python:defaultargs")) {
ParmList *plist = CopyParmList(Getattr(n, "parms"));
Parm *p;
Parm *pnext;
ParmList *plist = CopyParmList(Getattr(n, "parms"));
Parm *p;
Parm *pnext;
for (p = plist; p; p = pnext) {
pnext = NIL;
String *tm = Getattr(p, "tmap:in");
if (tm) {
pnext = Getattr(p, "tmap:in:next");
if (checkAttribute(p, "tmap:in:numinputs", "0")) {
continue;
}
}
if (!pnext) {
pnext = nextSibling(p);
}
if (String *value = Getattr(p, "value")) {
String *type = Getattr(p, "type");
if (!convertValue(value, type)) {
is_representable = false;
break;
}
for (p = plist; p; p = pnext) {
pnext = NIL;
String *tm = Getattr(p, "tmap:in");
if (tm) {
pnext = Getattr(p, "tmap:in:next");
if (checkAttribute(p, "tmap:in:numinputs", "0")) {
continue;
}
}
if (!pnext) {
pnext = nextSibling(p);
}
if (String *value = Getattr(p, "value")) {
String *type = Getattr(p, "type");
if (!convertValue(value, type)) {
is_representable = false;
break;
}
}
} else {
is_representable = false;
}
}
return is_representable;