Fix display of pointers on 64 bit systems, only 32 bit values were being shown.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-07-21 22:52:30 +00:00
parent 594fd2b410
commit 7b58300cbd
15 changed files with 85 additions and 82 deletions

View File

@ -4,6 +4,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.8 (in progress)
===========================
2012-06-27: wsfulton
Fix display of pointers in various places on 64 bit systems - only 32 bits were being shown.
2012-06-27: wsfulton
Fix gdb debugger functions 'swigprint' and 'locswigprint' to display to the gdb output window
rather than stdout. This fixes display problems in gdbtui and the ensures the output

View File

@ -2988,7 +2988,7 @@ template_directive: SWIGTEMPLATE LPAREN idstringopt RPAREN idcolonnt LESSTHAN va
if (am) {
Symtab *st = Swig_symbol_current();
Swig_symbol_setscope(Getattr(templnode,"symtab"));
/* Printf(stdout,"%s: %s %x %x\n", Getattr(templnode,"name"), clsname, Swig_symbol_current(), Getattr(templnode,"symtab")); */
/* Printf(stdout,"%s: %s %p %p\n", Getattr(templnode,"name"), clsname, Swig_symbol_current(), Getattr(templnode,"symtab")); */
merge_extensions(templnode,am);
Swig_symbol_setscope(st);
append_previous_extension(templnode,am);

View File

@ -415,12 +415,12 @@ static DOH *Hash_str(DOH *ho) {
s = NewStringEmpty();
if (ObjGetMark(ho)) {
Printf(s, "Hash(0x%x)", ho);
Printf(s, "Hash(%p)", ho);
return s;
}
if (expanded >= max_expand) {
/* replace each hash attribute with a '.' */
Printf(s, "Hash(0x%x) {", ho);
Printf(s, "Hash(%p) {", ho);
for (i = 0; i < h->hashsize; i++) {
n = h->hashtable[i];
while (n) {
@ -432,7 +432,7 @@ static DOH *Hash_str(DOH *ho) {
return s;
}
ObjSetMark(ho, 1);
Printf(s, "Hash(0x%x) {\n", ho);
Printf(s, "Hash(%p) {\n", ho);
for (i = 0; i < h->hashsize; i++) {
n = h->hashtable[i];
while (n) {

View File

@ -242,7 +242,7 @@ static DOH *List_str(DOH *lo) {
List *l = (List *) ObjData(lo);
s = NewStringEmpty();
if (ObjGetMark(lo)) {
Printf(s, "List(%x)", lo);
Printf(s, "List(%p)", lo);
return s;
}
ObjSetMark(lo, 1);

View File

@ -206,7 +206,7 @@ static String *namespace_of(String *str) {
void add_linked_type(Node *n) {
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "Adding linked node of type: %s(%s) %s(%x)\n\n", nodeType(n), Getattr(n, "storage"), Getattr(n, "name"), n);
Printf(stderr, "Adding linked node of type: %s(%s) %s(%p)\n\n", nodeType(n), Getattr(n, "storage"), Getattr(n, "name"), n);
// Swig_print_node(n);
#endif
if (!first_linked_type) {
@ -300,13 +300,13 @@ Node *get_primary_synonym_of(Node *n) {
Node *p = Getattr(n, "allegrocl:synonym-of");
Node *prim = n;
// Printf(stderr, "getting primary synonym of %x\n", n);
// Printf(stderr, "getting primary synonym of %p\n", n);
while (p) {
// Printf(stderr, " found one! %x\n", p);
// Printf(stderr, " found one! %p\n", p);
prim = p;
p = Getattr(p, "allegrocl:synonym-of");
}
// Printf(stderr,"get_primary_syn: DONE. returning %s(%x)\n", Getattr(prim,"name"),prim);
// Printf(stderr,"get_primary_syn: DONE. returning %s(%p)\n", Getattr(prim,"name"),prim);
return prim;
}
@ -331,7 +331,7 @@ void add_forward_referenced_type(Node *n, int overwrite = 0) {
// , name);
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "Linking forward reference type = %s(%x)\n", k, n);
Printf(stderr, "Linking forward reference type = %s(%p)\n", k, n);
#endif
add_linked_type(n);
}
@ -346,8 +346,8 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
String *cDeclName = n ? Getattr(n, "name") : 0;
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "IN A-D-F-T. (n=%x, ow=%d, k=%s, name=%s, ns=%s\n", n, overwrite, k, name, ns);
Printf(stderr, " templated = '%x', classDecl = '%x'\n", templated, cDeclName);
Printf(stderr, "IN A-D-F-T. (n=%p, ow=%d, k=%s, name=%s, ns=%s\n", n, overwrite, k, name, ns);
Printf(stderr, " templated = '%p', classDecl = '%p'\n", templated, cDeclName);
#endif
if (n) {
if (!name)
@ -456,7 +456,7 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
}
}
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "looking to add %s/%s(%x) to linked_type_list...\n", k, name, n);
Printf(stderr, "looking to add %s/%s(%p) to linked_type_list...\n", k, name, n);
#endif
if (is_fwd_ref) {
// Printf(stderr,"*** 1\n");
@ -509,7 +509,7 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
Setattr(new_node, "allegrocl:synonym:is-primary", "1");
} else {
// a synonym type was found (held in variable 'match')
// Printf(stderr, "setting primary synonym of %x to %x\n", new_node, match);
// Printf(stderr, "setting primary synonym of %p to %p\n", new_node, match);
if (new_node == match)
Printf(stderr, "Hey-4 * - '%s' is a synonym of iteself!\n", Getattr(new_node, "name"));
Setattr(new_node, "allegrocl:synonym-of", match);
@ -556,8 +556,8 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
Setattr(n, "allegrocl:synonym-of", match);
Setattr(n, "real-name", Copy(lookup_type));
// Printf(stderr, "*** pre-5: found match of '%s'(%x)\n", Getattr(match,"name"),match);
// if(n == match) Printf(stderr, "Hey-5 *** setting synonym of %x to %x\n", n, match);
// Printf(stderr, "*** pre-5: found match of '%s'(%p)\n", Getattr(match,"name"),match);
// if(n == match) Printf(stderr, "Hey-5 *** setting synonym of %p to %p\n", n, match);
// Printf(stderr,"*** 5\n");
add_linked_type(n);
} else {
@ -615,7 +615,7 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
match = find_linked_type_by_name(resolved);
if (!match) {
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "found no implicit instantiation of %%template node %s(%x)\n", Getattr(n, "name"), n);
Printf(stderr, "found no implicit instantiation of %%template node %s(%p)\n", Getattr(n, "name"), n);
#endif
add_linked_type(n);
} else {
@ -624,14 +624,14 @@ void add_defined_foreign_type(Node *n, int overwrite = 0, String *k = 0,
Setattr(n, "allegrocl:synonym:is-primary", "1");
Delattr(primary, "allegrocl:synonym:is-primary");
if (n == match)
Printf(stderr, "Hey-7 * setting synonym of %x to %x\n (match = %x)", primary, n, match);
Printf(stderr, "Hey-7 * setting synonym of %p to %p\n (match = %p)", primary, n, match);
Setattr(primary, "allegrocl:synonym-of", n);
// Printf(stderr,"*** 7\n");
add_linked_type(n);
}
} else {
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "linking type '%s'(%x)\n", k, n);
Printf(stderr, "linking type '%s'(%p)\n", k, n);
#endif
// Printf(stderr,"*** 8\n");
add_linked_type(n);
@ -821,7 +821,7 @@ String *compose_foreign_type(Node *n, SwigType *ty, String * /*id*/ = 0) {
Printf(stderr, "compose_foreign_type: ENTER (%s)...\n ", ty);
// Printf(stderr, "compose_foreign_type: ENTER (%s)(%s)...\n ", ty, (id ? id : 0));
/* String *id_ref = SwigType_str(ty, id);
Printf(stderr, "looking up typemap for %s, found '%s'(%x)\n",
Printf(stderr, "looking up typemap for %s, found '%s'(%p)\n",
id_ref, lookup_res ? Getattr(lookup_res, "code") : 0, lookup_res);
if (lookup_res) Swig_print_node(lookup_res);
*/
@ -860,7 +860,7 @@ void update_package_if_needed(Node *n, File *f = f_clwrap) {
Printf(stderr, "update_package: ENTER... \n");
Printf(stderr, " current_package = '%s'\n", current_package);
Printf(stderr, " node_package = '%s'\n", Getattr(n, "allegrocl:package"));
Printf(stderr, " node(%x) = '%s'\n", n, Getattr(n, "name"));
Printf(stderr, " node(%p) = '%s'\n", n, Getattr(n, "name"));
#endif
String *node_package = Getattr(n, "allegrocl:package");
if (Strcmp(current_package, node_package)) {
@ -1119,7 +1119,7 @@ String *convert_literal(String *literal, String *type, bool try_to_split) {
void emit_stub_class(Node *n) {
#ifdef ALLEGROCL_WRAP_DEBUG
Printf(stderr, "emit_stub_class: ENTER... '%s'(%x)\n", Getattr(n, "sym:name"), n);
Printf(stderr, "emit_stub_class: ENTER... '%s'(%p)\n", Getattr(n, "sym:name"), n);
Swig_print_node(n);
#endif
@ -1157,7 +1157,7 @@ void emit_synonym(Node *synonym) {
Printf(stderr, "emit_synonym: ENTER... \n");
#endif
// Printf(stderr,"in emit_synonym for %s(%x)\n", Getattr(synonym,"name"),synonym);
// Printf(stderr,"in emit_synonym for %s(%p)\n", Getattr(synonym,"name"),synonym);
int is_tempInst = !Strcmp(nodeType(synonym), "templateInst");
String *synonym_type;
@ -1214,7 +1214,7 @@ void emit_full_class(Node *n) {
String *name = Getattr(n, "sym:name");
String *kind = Getattr(n, "kind");
// Printf(stderr,"in emit_full_class: '%s'(%x).", Getattr(n,"name"),n);
// Printf(stderr,"in emit_full_class: '%s'(%p).", Getattr(n,"name"),n);
if (Getattr(n, "allegrocl:synonym-of")) {
// Printf(stderr,"but it's a synonym of something.\n");
update_package_if_needed(n, f_clhead);
@ -1314,7 +1314,7 @@ void emit_full_class(Node *n) {
void emit_class(Node *n) {
#ifdef ALLEGROCL_WRAP_DEBUG
Printf(stderr, "emit_class: ENTER... '%s'(%x)\n", Getattr(n, "sym:name"), n);
Printf(stderr, "emit_class: ENTER... '%s'(%p)\n", Getattr(n, "sym:name"), n);
#endif
int is_tempInst = !Strcmp(nodeType(n), "templateInst");
@ -1373,7 +1373,7 @@ void emit_typedef(Node *n) {
Delete(type);
Node *in_class = Getattr(n, "allegrocl:typedef:in-class");
// Printf(stderr,"in emit_typedef: '%s'(%x).",Getattr(n,"name"),n);
// Printf(stderr,"in emit_typedef: '%s'(%p).",Getattr(n,"name"),n);
if (Getattr(n, "allegrocl:synonym-of")) {
// Printf(stderr," but it's a synonym of something.\n");
emit_synonym(n);
@ -1536,11 +1536,11 @@ void dump_linked_types(File *f) {
Node *n = first_linked_type;
int i = 0;
while (n) {
Printf(f, "%d: (%x) node '%s' name '%s'\n", i++, n, nodeType(n), Getattr(n, "sym:name"));
Printf(f, "%d: (%p) node '%s' name '%s'\n", i++, n, nodeType(n), Getattr(n, "sym:name"));
Node *t = Getattr(n, "allegrocl:synonym-of");
if (t)
Printf(f, " synonym-of %s(%x)\n", Getattr(t, "name"), t);
Printf(f, " synonym-of %s(%p)\n", Getattr(t, "name"), t);
n = Getattr(n, "allegrocl:next_linked_type");
}
}
@ -1556,7 +1556,7 @@ void emit_linked_types() {
while (n) {
String *node_type = nodeType(n);
// Printf(stderr,"emitting node %s(%x) of type %s.", Getattr(n,"name"),n, nodeType(n));
// Printf(stderr,"emitting node %s(%p) of type %s.", Getattr(n,"name"),n, nodeType(n));
if (!Strcmp(node_type, "class") || !Strcmp(node_type, "templateInst")) {
// may need to emit a stub, so it will update the package itself.
// Printf(stderr," Passing to emit_class.");
@ -2049,7 +2049,7 @@ int emit_num_lin_arguments(ParmList *parms) {
int nargs = 0;
while (p) {
// Printf(stderr,"enla: '%s' lin='%x' numinputs='%s'\n", Getattr(p,"name"), Getattr(p,"tmap:lin"), Getattr(p,"tmap:lin:numinputs"));
// Printf(stderr,"enla: '%s' lin='%p' numinputs='%s'\n", Getattr(p,"name"), Getattr(p,"tmap:lin"), Getattr(p,"tmap:lin:numinputs"));
if (Getattr(p, "tmap:lin")) {
nargs += GetInt(p, "tmap:lin:numinputs");
p = Getattr(p, "tmap:lin:next");
@ -2283,7 +2283,7 @@ IDargs *id_converter_arguments(Node *n) {
result->arity = NewStringf("%d",
// emit_num_arguments(Getattr(n, "wrap:parms")));
emit_num_lin_arguments(Getattr(n, "wrap:parms")));
// Printf(stderr, "got arity of '%s' node '%s' '%x'\n", result->arity, Getattr(n,"name"), Getattr(n,"wrap:parms"));
// Printf(stderr, "got arity of '%s' node '%s' '%p'\n", result->arity, Getattr(n,"name"), Getattr(n,"wrap:parms"));
}
SetVoid(n, "allegrocl:id-converter-args", result);
@ -2361,7 +2361,7 @@ int ALLEGROCL::emit_dispatch_defun(Node *n) {
#endif
List *overloads = Swig_overload_rank(n, true);
// Printf(stderr,"\ndispatch node=%x\n\n", n);
// Printf(stderr,"\ndispatch node=%p\n\n", n);
// Swig_print_node(n);
Node *overloaded_from = Getattr(n,"sym:overloaded");
@ -2669,7 +2669,7 @@ int ALLEGROCL::functionWrapper(Node *n) {
if (Getattr(n, "overload:ignore")) {
// if we're the last overload, make sure to force the emit
// of the rest of the overloads before we leave.
// Printf(stderr, "ignored overload %s(%x)\n", name, Getattr(n, "sym:nextSibling"));
// Printf(stderr, "ignored overload %s(%p)\n", name, Getattr(n, "sym:nextSibling"));
if (!Getattr(n, "sym:nextSibling")) {
update_package_if_needed(n);
emit_buffered_defuns(n);
@ -2798,7 +2798,7 @@ int ALLEGROCL::functionWrapper(Node *n) {
int ALLEGROCL::namespaceDeclaration(Node *n) {
#ifdef ALLEGROCL_DEBUG
Printf(stderr, "namespaceDecl: '%s'(0x%x) (fc=0x%x)\n", Getattr(n, "sym:name"), n, firstChild(n));
Printf(stderr, "namespaceDecl: '%s'(%p) (fc=%p)\n", Getattr(n, "sym:name"), n, firstChild(n));
#endif
/* don't wrap a namespace with no contents. package bloat.
@ -3018,7 +3018,7 @@ int ALLEGROCL::typedefHandler(Node *n) {
if (in_class) {
#ifdef ALLEGROCL_TYPE_DEBUG
Printf(stderr, " typedef in class '%s'(%x)\n", Getattr(in_class, "sym:name"), in_class);
Printf(stderr, " typedef in class '%s'(%p)\n", Getattr(in_class, "sym:name"), in_class);
#endif
Setattr(n, "allegrocl:typedef:in-class", in_class);
@ -3036,7 +3036,7 @@ int ALLEGROCL::typedefHandler(Node *n) {
String *lookup = lookup_defined_foreign_type(typedef_type);
#ifdef ALLEGROCL_TYPE_DEBUG
Printf(stderr, "** lookup='%s'(%x), typedef_type='%s', strcmp = '%d' strstr = '%d'\n", lookup, lookup, typedef_type, Strcmp(typedef_type,"void"), Strstr(ff_type,"__SWIGACL_FwdReference"));
Printf(stderr, "** lookup='%s'(%p), typedef_type='%s', strcmp = '%d' strstr = '%d'\n", lookup, lookup, typedef_type, Strcmp(typedef_type,"void"), Strstr(ff_type,"__SWIGACL_FwdReference"));
#endif
if(lookup || (!lookup && Strcmp(typedef_type,"void")) ||
@ -3162,7 +3162,7 @@ int ALLEGROCL::cppClassHandler(Node *n) {
SwigType *childType = NewStringf("%s%s", Getattr(c, "decl"),
Getattr(c, "type"));
#ifdef ALLEGROCL_CLASS_DEBUG
Printf(stderr, "looking at child '%x' of type '%s' '%d'\n", c, childType, SwigType_isfunction(childType));
Printf(stderr, "looking at child '%p' of type '%s' '%d'\n", c, childType, SwigType_isfunction(childType));
// Swig_print_node(c);
#endif
if (!SwigType_isfunction(childType))

View File

@ -29,9 +29,9 @@ class Browser:public Dispatcher {
v = 1;
}
if (v) {
Printf(out, "<a name=\"n%x\"></a>[<a href=\"hide.html?node=0x%x&hn=0x%x#n%x\">-</a>] ", n, t, n, n);
Printf(out, "<a name=\"n%p\"></a>[<a href=\"hide.html?node=%p&hn=%p#n%p\">-</a>] ", n, t, n, n);
} else {
Printf(out, "<a name=\"n%x\"></a>[<a href=\"show.html?node=0x%x&hn=0x%x#n%x\">+</a>] ", n, t, n, n);
Printf(out, "<a name=\"n%p\"></a>[<a href=\"show.html?node=%p&hn=%p#n%p\">+</a>] ", n, t, n, n);
}
}
void show_attributes(Node *obj) {
@ -52,7 +52,7 @@ class Browser:public Dispatcher {
Replaceall(o, "&", "&amp;");
Replaceall(o, "<", "&lt;");
Replaceall(o, ">", "&gt;");
Printf(os, "<a href=\"data.html?n=0x%x\">?</a> %-12s - %s\n", Getattr(obj, k), k, o);
Printf(os, "<a href=\"data.html?n=%p\">?</a> %-12s - %s\n", Getattr(obj, k), k, o);
Delete(o);
} else {
DOH *o;
@ -64,10 +64,10 @@ class Browser:public Dispatcher {
}
Replaceall(o, "&", "&amp;");
Replaceall(o, "<", "&lt;");
Printf(os, "<a href=\"data.html?n=0x%x\">?</a> %-12s - \"%(escape)-0.70s%s\"\n", Getattr(obj, k), k, o, trunc);
Printf(os, "<a href=\"data.html?n=%p\">?</a> %-12s - \"%(escape)-0.70s%s\"\n", Getattr(obj, k), k, o, trunc);
Delete(o);
} else {
Printf(os, "<a href=\"data.html?n=0x%x\">?</a> %-12s - 0x%x\n", Getattr(obj, k), k, Getattr(obj, k));
Printf(os, "<a href=\"data.html?n=%p\">?</a> %-12s - %p\n", Getattr(obj, k), k, Getattr(obj, k));
}
}
ki = Next(ki);
@ -84,7 +84,7 @@ public:
char *name = GetChar(n, "name");
show_checkbox(view_top, n);
Printf(out, "<b><a href=\"index.html?node=0x%x\">%s</a></b>", n, tag);
Printf(out, "<b><a href=\"index.html?node=%p\">%s</a></b>", n, tag);
if (name) {
Printf(out, " (%s)", name);
}
@ -184,9 +184,9 @@ static void display(FILE *f, Node *n) {
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
Printf(f, " [ <a href=\"index.html?node=%p\">Top</a> ]", tree_top);
if (n != tree_top) {
Printf(f, " [ <a href=\"index.html?node=0x%x\">Up</a> ]", parentNode(n));
Printf(f, " [ <a href=\"index.html?node=%p\">Up</a> ]", parentNode(n));
}
Printf(f, " [ <a href=\"symbol.html\">Symbols</a> ]");
Printf(f, "<br><hr><p>\n");
@ -255,10 +255,10 @@ void raw_data(FILE *out, Node *obj) {
trunc = "...";
}
Replaceall(o, "<", "&lt;");
Printf(os, " <a href=\"data.html?n=0x%x\">?</a> %-12s - \"%(escape)-0.70s%s\"\n", Getattr(obj, k), k, o, trunc);
Printf(os, " <a href=\"data.html?n=%p\">?</a> %-12s - \"%(escape)-0.70s%s\"\n", Getattr(obj, k), k, o, trunc);
Delete(o);
} else {
Printf(os, " <a href=\"data.html?n=0x%x\">?</a> %-12s - 0x%x\n", Getattr(obj, k), k, Getattr(obj, k));
Printf(os, " <a href=\"data.html?n=%p\">?</a> %-12s - %p\n", Getattr(obj, k), k, Getattr(obj, k));
}
ki = Next(ki);
}
@ -283,10 +283,10 @@ void raw_data(FILE *out, Node *obj) {
trunc = "...";
}
Replaceall(o, "<", "&lt;");
Printf(os, " <a href=\"data.html?n=0x%x\">?</a> [%d] - \"%(escape)-0.70s%s\"\n", o, i, s, trunc);
Printf(os, " <a href=\"data.html?n=%p\">?</a> [%d] - \"%(escape)-0.70s%s\"\n", o, i, s, trunc);
Delete(s);
} else {
Printf(os, " <a href=\"data.html?n=0x%x\">?</a> [%d] - 0x%x\n", o, i, o);
Printf(os, " <a href=\"data.html?n=%p\">?</a> [%d] - %p\n", o, i, o);
}
}
Printf(os, "\n]\n");
@ -303,7 +303,7 @@ void data_handler(FILE *f) {
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
Printf(f, " [ <a href=\"index.html?node=%p\">Top</a> ]", tree_top);
Printf(f, "<br><hr><p>\n");
if (n) {
raw_data(f, n);
@ -319,7 +319,7 @@ void symbol_handler(FILE *f) {
Printf(f, "<HTML><HEAD><TITLE>SWIG-%s</TITLE></HEAD><BODY BGCOLOR=\"#ffffff\">\n", Swig_package_version());
Printf(f, "<b>SWIG-%s</b><br>\n", Swig_package_version());
Printf(f, "[ <a href=\"exit.html\">Exit</a> ]");
Printf(f, " [ <a href=\"index.html?node=0x%x\">Top</a> ]", tree_top);
Printf(f, " [ <a href=\"index.html?node=%p\">Top</a> ]", tree_top);
Printf(f, " [ <a href=\"symbol.html\">Symbols</a> ]");
Printf(f, "<br><hr><p>\n");
@ -343,7 +343,7 @@ void symbol_handler(FILE *f) {
fprintf(f, "<p><form action=\"symbol.html\" method=GET>\n");
fprintf(f, "Symbol lookup: <input type=text name=name size=40></input><br>\n");
fprintf(f, "<input type=hidden name=sym value=\"0x%x\">\n", sym);
fprintf(f, "<input type=hidden name=sym value=\"%p\">\n", sym);
fprintf(f, "Submit : <input type=submit></input>\n");
fprintf(f, "</form>");
@ -365,7 +365,7 @@ void symbol_handler(FILE *f) {
Hash *h;
h = firstChild(sym);
while (h) {
Printf(f, "<a href=\"symbol.html?sym=0x%x\">%s</a>\n", h, Getattr(h, "name"));
Printf(f, "<a href=\"symbol.html?sym=%p\">%s</a>\n", h, Getattr(h, "name"));
h = nextSibling(h);
}
}

View File

@ -671,7 +671,7 @@ int CFFI::enumDeclaration(Node *n) {
void CFFI::emit_class(Node *n) {
#ifdef CFFI_WRAP_DEBUG
Printf(stderr, "emit_class: ENTER... '%s'(%x)\n", Getattr(n, "sym:name"), n);
Printf(stderr, "emit_class: ENTER... '%s'(%p)\n", Getattr(n, "sym:name"), n);
#endif
String *name = Getattr(n, "sym:name");

View File

@ -2030,7 +2030,7 @@ MODULA3():
if (oldname != NIL) {
Swig_warning(WARN_MODULA3_BAD_ENUMERATION, input_file, line_number, "The value <%s> is already assigned to <%s>.\n", value, oldname);
}
//printf("items %lx, set %s = %s\n", (long) items, Char(newvalue), Char(m3name));
//printf("items %p, set %s = %s\n", items, Char(newvalue), Char(m3name));
Setattr(items, newvalue, m3name);
if (max < numvalue) {
max = numvalue;

View File

@ -132,7 +132,7 @@ public:
Node *is_shadow(SwigType *t) {
Node *n;
n = classLookup(t);
/* Printf(stdout,"'%s' --> '%x'\n", t, n); */
/* Printf(stdout,"'%s' --> '%p'\n", t, n); */
if (n) {
if (!Getattr(n, "perl5:proxy")) {
setclassname(n);

View File

@ -3809,7 +3809,7 @@ public:
if (new_repr) {
Printv(f_shadow_file, tab4, "__repr__ = _swig_repr\n", NIL);
} else {
Printv(f_shadow_file, tab4, "def __repr__(self):\n", tab8, "return \"<C ", rname, " instance at 0x%x>\" % (self.this,)\n", NIL);
Printv(f_shadow_file, tab4, "def __repr__(self):\n", tab8, "return \"<C ", rname, " instance at %p>\" % (self.this,)\n", NIL);
}
Delete(rname);
}

View File

@ -310,7 +310,7 @@ public:
close_paren();
} else {
// What is it?
Printf(out, "#<DOH %s %x>", ObjType(obj)->objname, obj);
Printf(out, "#<DOH %s %p>", ObjType(obj)->objname, obj);
}
}
}

View File

@ -118,7 +118,7 @@ public:
String *k;
indent_level += 4;
print_indent(0);
Printf(out, "<attributelist id=\"%ld\" addr=\"%x\" >\n", ++id, obj);
Printf(out, "<attributelist id=\"%ld\" addr=\"%p\" >\n", ++id, obj);
indent_level += 4;
Iterator ki;
ki = First(obj);
@ -160,14 +160,14 @@ public:
Replaceall(o, "\"", "&quot;");
Replaceall(o, "\\", "\\\\");
Replaceall(o, "\n", "&#10;");
Printf(out, "<attribute name=\"%s\" value=\"%s\" id=\"%ld\" addr=\"%x\" />\n", ck, o, ++id, o);
Printf(out, "<attribute name=\"%s\" value=\"%s\" id=\"%ld\" addr=\"%p\" />\n", ck, o, ++id, o);
Delete(o);
Delete(ck);
} else {
o = Getattr(obj, k);
String *ck = NewString(k);
Replaceall(ck, ":", "_");
Printf(out, "<attribute name=\"%s\" value=\"%x\" id=\"%ld\" addr=\"%x\" />\n", ck, o, ++id, o);
Printf(out, "<attribute name=\"%s\" value=\"%p\" id=\"%ld\" addr=\"%p\" />\n", ck, o, ++id, o);
Delete(ck);
}
}
@ -183,7 +183,7 @@ public:
Node *cobj;
print_indent(0);
Printf(out, "<%s id=\"%ld\" addr=\"%x\" >\n", nodeType(obj), ++id, obj);
Printf(out, "<%s id=\"%ld\" addr=\"%p\" >\n", nodeType(obj), ++id, obj);
Xml_print_attributes(obj);
cobj = firstChild(obj);
if (cobj) {
@ -203,7 +203,7 @@ public:
void Xml_print_parmlist(ParmList *p, const char* markup = "parmlist") {
print_indent(0);
Printf(out, "<%s id=\"%ld\" addr=\"%x\" >\n", markup, ++id, p);
Printf(out, "<%s id=\"%ld\" addr=\"%p\" >\n", markup, ++id, p);
indent_level += 4;
while (p) {
print_indent(0);
@ -221,13 +221,13 @@ public:
void Xml_print_baselist(List *p) {
print_indent(0);
Printf(out, "<baselist id=\"%ld\" addr=\"%x\" >\n", ++id, p);
Printf(out, "<baselist id=\"%ld\" addr=\"%p\" >\n", ++id, p);
indent_level += 4;
Iterator s;
for (s = First(p); s.item; s = Next(s)) {
print_indent(0);
String *item_name = Xml_escape_string(s.item);
Printf(out, "<base name=\"%s\" id=\"%ld\" addr=\"%x\" />\n", item_name, ++id, s.item);
Printf(out, "<base name=\"%s\" id=\"%ld\" addr=\"%p\" />\n", item_name, ++id, s.item);
Delete(item_name);
}
indent_level -= 4;
@ -251,7 +251,7 @@ public:
void Xml_print_module(Node *p) {
print_indent(0);
Printf(out, "<attribute name=\"module\" value=\"%s\" id=\"%ld\" addr=\"%x\" />\n", Getattr(p, "name"), ++id, p);
Printf(out, "<attribute name=\"module\" value=\"%s\" id=\"%ld\" addr=\"%p\" />\n", Getattr(p, "name"), ++id, p);
}
void Xml_print_kwargs(Hash *p) {
@ -272,13 +272,13 @@ public:
void Xml_print_hash(Hash *p, const char *markup) {
print_indent(0);
Printf(out, "<%s id=\"%ld\" addr=\"%x\" >\n", markup, ++id, p);
Printf(out, "<%s id=\"%ld\" addr=\"%p\" >\n", markup, ++id, p);
Xml_print_attributes(p);
indent_level += 4;
Iterator n = First(p);
while (n.key) {
print_indent(0);
Printf(out, "<%ssitem id=\"%ld\" addr=\"%x\" >\n", markup, ++id, n.item);
Printf(out, "<%ssitem id=\"%ld\" addr=\"%p\" >\n", markup, ++id, n.item);
Xml_print_attributes(n.item);
print_indent(0);
Printf(out, "</%ssitem >\n", markup);

View File

@ -549,7 +549,7 @@ void Swig_symbol_cadd(const_String_or_char_ptr name, Node *n) {
Delete(cname);
}
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_cadd %s %x\n", name, n);
Printf(stderr, "symbol_cadd %s %p\n", name, n);
#endif
cn = Getattr(ccurrent, name);
@ -934,7 +934,7 @@ static Node *_symbol_lookup(const String *name, Symtab *symtab, int (*check) (No
n = Getattr(sym, name);
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_look %s %x %x %s\n", name, n, symtab, Getattr(symtab, "name"));
Printf(stderr, "symbol_look %s %p %p %s\n", name, n, symtab, Getattr(symtab, "name"));
#endif
if (n) {
@ -1437,7 +1437,7 @@ String *Swig_symbol_qualified(Node *n) {
if (!symtab)
return NewStringEmpty();
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_qscope %s %x %s\n", Getattr(n, "name"), symtab, Getattr(symtab, "name"));
Printf(stderr, "symbol_qscope %s %p %s\n", Getattr(n, "name"), symtab, Getattr(symtab, "name"));
#endif
return Swig_symbol_qualifiedscopename(symtab);
}
@ -1557,7 +1557,7 @@ SwigType *Swig_symbol_type_qualify(const SwigType *t, Symtab *st) {
Clear(e);
Append(e, name);
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_qual_ei %d %s %s %x\n", i, name, e, st);
Printf(stderr, "symbol_qual_ei %d %s %s %p\n", i, name, e, st);
#endif
if (!Swig_scopename_check(name)) {
String *qname = Swig_symbol_qualified(n);
@ -1566,7 +1566,7 @@ SwigType *Swig_symbol_type_qualify(const SwigType *t, Symtab *st) {
Insert(e, 0, qname);
}
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_qual_sc %d %s %s %x\n", i, qname, e, st);
Printf(stderr, "symbol_qual_sc %d %s %s %p\n", i, qname, e, st);
#endif
Delete(qname);
}
@ -1604,7 +1604,7 @@ SwigType *Swig_symbol_type_qualify(const SwigType *t, Symtab *st) {
}
Delete(elements);
#ifdef SWIG_DEBUG
Printf(stderr, "symbol_qualify %s %s %x %s\n", t, result, st, st ? Getattr(st, "name") : 0);
Printf(stderr, "symbol_qualify %s %s %p %s\n", t, result, st, st ? Getattr(st, "name") : 0);
#endif
return result;

View File

@ -92,7 +92,7 @@ void Swig_print_node(Node *obj) {
Printf(stdout, "%-12s - \"%(escape)-0.80s%s\"\n", k, o, trunc);
Delete(o);
} else {
Printf(stdout, "%-12s - 0x%x\n", k, Getattr(obj, k));
Printf(stdout, "%-12s - %p\n", k, Getattr(obj, k));
}
}
ki = Next(ki);

View File

@ -297,7 +297,7 @@ void SwigType_inherit_scope(Typetab *scope) {
void SwigType_scope_alias(String *aliasname, Typetab *ttab) {
String *q;
/* Printf(stdout,"alias: '%s' '%x'\n", aliasname, ttab); */
/* Printf(stdout,"alias: '%s' '%p'\n", aliasname, ttab); */
q = SwigType_scope_name(current_scope);
if (Len(q)) {
Append(q, "::");
@ -398,13 +398,13 @@ void SwigType_print_scope(void) {
Printf(stdout, "-------------------------------------------------------------\n");
ttab = Getattr(i.item, "typetab");
Printf(stdout, "Type scope '%s' (%x)\n", i.key, i.item);
Printf(stdout, "Type scope '%s' (%p)\n", i.key, i.item);
{
List *inherit = Getattr(i.item, "inherit");
if (inherit) {
Iterator j;
for (j = First(inherit); j.item; j = Next(j)) {
Printf(stdout, " Inherits from '%s' (%x)\n", Getattr(j.item, "qname"), j.item);
Printf(stdout, " Inherits from '%s' (%p)\n", Getattr(j.item, "qname"), j.item);
}
}
}
@ -1114,14 +1114,14 @@ int SwigType_typedef_using(const_String_or_char_ptr name) {
/* See if the using name is a scope */
/* tt = SwigType_find_scope(current_scope,name);
Printf(stdout,"tt = %x, name = '%s'\n", tt, name); */
Printf(stdout,"tt = %p, name = '%s'\n", tt, name); */
/* We set up a typedef B --> A::B */
Setattr(current_typetab, base, name);
/* Find the scope name where the symbol is defined */
td = SwigType_typedef_resolve(name);
/* Printf(stdout,"td = '%s' %x\n", td, resolved_scope); */
/* Printf(stdout,"td = '%s' %p\n", td, resolved_scope); */
if (resolved_scope) {
defined_name = Getattr(resolved_scope, "qname");
if (defined_name) {
@ -1803,13 +1803,13 @@ void SwigType_inherit_equiv(File *out) {
Append(rlist, ck.key);
}
/* Printf(stdout,"rk.key = '%s'\n", rk.key);
Printf(stdout,"rh = %x '%s'\n", rh,rh); */
Printf(stdout,"rh = %p '%s'\n", rh,rh); */
bk = First(sub);
while (bk.key) {
prefix = SwigType_prefix(rk.key);
Append(prefix, bk.key);
/* Printf(stdout,"set %x = '%s' : '%s'\n", rh, SwigType_manglestr(prefix),prefix); */
/* Printf(stdout,"set %p = '%s' : '%s'\n", rh, SwigType_manglestr(prefix),prefix); */
mprefix = SwigType_manglestr(prefix);
Setattr(rh, mprefix, prefix);
mkey = SwigType_manglestr(rk.key);