Merge from trunk

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-sploving@13053 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Vincent Couvert 2012-05-09 14:28:04 +00:00
commit 7444913fda
59 changed files with 955 additions and 692 deletions

View file

@ -259,7 +259,7 @@ int DohEqual(const DOH *obj1, const DOH *obj2) {
if (!b1info) {
return obj1 == obj2;
} else if ((b1info == b2info)) {
} else if (b1info == b2info) {
return b1info->doh_equal ? (b1info->doh_equal) (b1, b2) : (b1info->doh_cmp ? (b1info->doh_cmp) (b1, b2) == 0 : (b1 == b2));
} else {
return 0;

View file

@ -4602,7 +4602,7 @@ private:
co = c + Len(nspace);
while (*c && (c != co)) {
if ((*c == '.')) {
if (*c == '.') {
break;
}
c++;

View file

@ -144,6 +144,8 @@ public:
Xml_print_kwargs(Getattr(obj, k));
} else if (Cmp(k, "parms") == 0 || Cmp(k, "pattern") == 0) {
Xml_print_parmlist(Getattr(obj, k));
} else if (Cmp(k, "catchlist") == 0) {
Xml_print_parmlist(Getattr(obj, k), "catchlist");
} else {
DOH *o;
print_indent(0);
@ -198,10 +200,10 @@ public:
}
void Xml_print_parmlist(ParmList *p) {
void Xml_print_parmlist(ParmList *p, const char* markup = "parmlist") {
print_indent(0);
Printf(out, "<parmlist id=\"%ld\" addr=\"%x\" >\n", ++id, p);
Printf(out, "<%s id=\"%ld\" addr=\"%x\" >\n", markup, ++id, p);
indent_level += 4;
while (p) {
print_indent(0);
@ -213,7 +215,7 @@ public:
}
indent_level -= 4;
print_indent(0);
Printf(out, "</parmlist >\n");
Printf(out, "</%s >\n", markup);
}
void Xml_print_baselist(List *p) {

View file

@ -298,16 +298,16 @@ int Preprocessor_expr(DOH *s, int *error) {
stack[sp++].op = EXPR_OP;
stack[sp].op = EXPR_TOP;
stack[sp].svalue = 0;
} else if ((token == SWIG_TOKEN_LPAREN)) {
} else if (token == SWIG_TOKEN_LPAREN) {
stack[sp++].op = EXPR_GROUP;
stack[sp].op = EXPR_TOP;
stack[sp].value = 0;
stack[sp].svalue = 0;
} else if (token == SWIG_TOKEN_ENDLINE) {
} else if ((token == SWIG_TOKEN_STRING)) {
} else if (token == SWIG_TOKEN_STRING) {
stack[sp].svalue = NewString(Scanner_text(scan));
stack[sp].op = EXPR_VALUE;
} else if ((token == SWIG_TOKEN_ID)) {
} else if (token == SWIG_TOKEN_ID) {
stack[sp].value = 0;
stack[sp].svalue = 0;
stack[sp].op = EXPR_VALUE;