git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix typos, some refinements
[lunaix-os.git]
/
lunaix-os
/
includes
/
lunaix
/
types.h
diff --git
a/lunaix-os/includes/lunaix/types.h
b/lunaix-os/includes/lunaix/types.h
index f74c9b8143839b80925ec8275d29bdc4c6742925..e065273ce93a20ef00d8a2e53aed9f30963711a0 100644
(file)
--- a/
lunaix-os/includes/lunaix/types.h
+++ b/
lunaix-os/includes/lunaix/types.h
@@
-47,7
+47,10
@@
typedef int bool;
})
#define offset(data, off) \
- ((void*)(__ptr(data) + (off)))
+ ((typeof(data))(__ptr(data) + (off)))
+
+#define offset_t(data, type, off) \
+ ((type*)(__ptr(data) + (off)))
#define __ptr(val) ((ptr_t)(val))