projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*** empty log message ***
[libfirm]
/
ir
/
adt
/
offset.h
diff --git
a/ir/adt/offset.h
b/ir/adt/offset.h
index
6f797a6
..
fa4b5a5
100644
(file)
--- a/
ir/adt/offset.h
+++ b/
ir/adt/offset.h
@@
-18,8
+18,7
@@
* @param member The name of the member.
* @return The offset of member in type in bytes.
*/
* @param member The name of the member.
* @return The offset of member in type in bytes.
*/
-#define offset_of(type, member) \
- ((char *) &(((type *) 0)->member) - (char *) 0)
+#define firm_offset_of(type, member) ((char *) &((type *) 0)->member - (char *) 0)
/**
* Make pointer to the struct from a pointer to a member of that struct.
/**
* Make pointer to the struct from a pointer to a member of that struct.
@@
-28,7
+27,6
@@
* @param member The name of the member.
* @return A pointer to the struct member is in.
*/
* @param member The name of the member.
* @return A pointer to the struct member is in.
*/
-#define container_of(ptr, type, member) \
- ((type *) ((char *) (ptr) - offset_of(type, member)))
+#define firm_container_of(ptr, type, member) ((type *) ((char *) (ptr) - firm_offset_of(type, member)))
#endif /* _OFFSET_H */
#endif /* _OFFSET_H */