forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqu-prolog-9.1-cerr-ptr.patch
40 lines (39 loc) · 1.35 KB
/
qu-prolog-9.1-cerr-ptr.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
diff -ur qp9.1.orig/src/gc.cc qp9.1/src/gc.cc
--- qp9.1.orig/src/gc.cc 2011-08-23 11:17:44.000000000 +1200
+++ qp9.1/src/gc.cc 2011-11-20 07:14:14.000000000 +1300
@@ -152,7 +152,7 @@
{
cerr << size << endl;
heapobject* ptr = reinterpret_cast<heapobject*>(term);
- cerr << hex << (u_int)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
+ cerr << hex << (wordptr)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
return false;
}
return true;
diff -ur qp9.1.orig/src/objects.h qp9.1/src/objects.h
--- qp9.1.orig/src/objects.h 2011-08-23 11:17:44.000000000 +1200
+++ qp9.1/src/objects.h 2011-11-20 07:14:14.000000000 +1300
@@ -1242,18 +1242,12 @@
<< this->getName() << "\" ";
#ifndef WIN32
- switch (hasAssociatedItem())
- {
- case AssociatedNone:
- std::cerr << "(no info)";
- break;
- case AssociatedInteger:
- std::cerr << "int: " << getAssociatedInteger();
- break;
- case AssociatedAtom:
- std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
- break;
- }
+ if (hasAssociatedInteger())
+ std::cerr << "int: " << getAssociatedInteger();
+ else if (hasAssociatedAtom())
+ std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
+ else
+ std::cerr << "(no info)";
#endif
}
#endif