projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ffff18
)
INT_TO_PTR() and PTR_TO_INT() macros added
author
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 31 Aug 2005 17:24:03 +0000
(17:24 +0000)
committer
Michael Beck
<beck@ipd.info.uni-karlsruhe.de>
Wed, 31 Aug 2005 17:24:03 +0000
(17:24 +0000)
[r6551]
ir/common/irtools.h
patch
|
blob
|
history
diff --git
a/ir/common/irtools.h
b/ir/common/irtools.h
index
279ab8f
..
660b83e
100644
(file)
--- a/
ir/common/irtools.h
+++ b/
ir/common/irtools.h
@@
-14,6
+14,16
@@
#include "irnode.h"
+/**
+ * convert an integer into pointer
+ */
+#define INT_TO_PTR(v) ((void *)((char *)0 + (v)))
+
+/**
+ * convert a pointer into an integer
+ */
+#define PTR_TO_INT(v) ((int)((char *)(v) - (char *)0))
+
/**
* The famous clear_link() walker-function.
* Do not implement it by yourself, use this one