Print Doh List objects readably.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5096 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
5422ba430d
commit
d4570b2907
1 changed files with 11 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ S-Exp Options (available with -sexp)\n\
|
||||||
-typemaplang <lang> - Typemap language\n\n";
|
-typemaplang <lang> - Typemap language\n\n";
|
||||||
|
|
||||||
#include "swigmod.h"
|
#include "swigmod.h"
|
||||||
|
#include "dohint.h"
|
||||||
|
|
||||||
//static Node *view_top = 0;
|
//static Node *view_top = 0;
|
||||||
static File *out = 0;
|
static File *out = 0;
|
||||||
|
|
@ -309,9 +310,18 @@ public:
|
||||||
}
|
}
|
||||||
close_paren();
|
close_paren();
|
||||||
}
|
}
|
||||||
|
else if (strcmp(ObjType(obj)->objname, "List") == 0) {
|
||||||
|
int i;
|
||||||
|
open_paren(NIL);
|
||||||
|
for (i = 0; i<Len(obj); i++) {
|
||||||
|
DOH *item = Getitem(obj, i);
|
||||||
|
Sexp_print_doh(item);
|
||||||
|
}
|
||||||
|
close_paren();
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
// What is it?
|
// What is it?
|
||||||
Printf(out,"#<DOH %x>", obj);
|
Printf(out,"#<DOH %s %x>", ObjType(obj)->objname, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue