~mdw
/
sod
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
061c44b
)
lib/sod.h: Arrange that `SOD_XCHAIN' returns `void *'.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 30 Aug 2015 09:58:38 +0000
(10:58 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 12 Sep 2015 13:52:35 +0000
(14:52 +0100)
lib/sod.h
patch
|
blob
|
blame
|
history
diff --git
a/lib/sod.h
b/lib/sod.h
index
af34d5d
..
efac06b
100644
(file)
--- a/
lib/sod.h
+++ b/
lib/sod.h
@@
-76,14
+76,15
@@
struct sod_chain {
* Arguments: @chead@ = nickname of target chain's head
* @obj@ = pointer to an instance chain
*
* Arguments: @chead@ = nickname of target chain's head
* @obj@ = pointer to an instance chain
*
- * Returns: Pointer to target chain, as a @
char
*@.
+ * Returns: Pointer to target chain, as a @
void
*@.
*
* Use: Utility for implementing cross-chain upcasts. It's probably
* not that clever to use this macro directly; it's used to make
* the automatically-generated upcast macros more palatable.
*/
*
* Use: Utility for implementing cross-chain upcasts. It's probably
* not that clever to use this macro directly; it's used to make
* the automatically-generated upcast macros more palatable.
*/
-#define SOD_XCHAIN(chead, obj) ((char *)(obj) + (obj)->_vt->_off_##chead)
+#define SOD_XCHAIN(chead, obj) \
+ ((void *)((char *)(obj) + (obj)->_vt->_off_##chead))
/* --- @SOD_OFFSETDIFF@ --- *
*
/* --- @SOD_OFFSETDIFF@ --- *
*