diff options
Diffstat (limited to 'llimits.h')
-rw-r--r-- | llimits.h | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -153,6 +153,26 @@ typedef LUAI_UACINT l_uacInt; | |||
153 | 153 | ||
154 | 154 | ||
155 | /* | 155 | /* |
156 | ** Special type equivalent to '(void*)' for functions (to suppress some | ||
157 | ** warnings when converting function pointers) | ||
158 | */ | ||
159 | typedef void (*voidf)(void); | ||
160 | |||
161 | |||
162 | /* | ||
163 | ** Macro to convert pointer-to-void* to pointer-to-function. This cast | ||
164 | ** is undefined according to ISO C, but POSIX assumes that it works. | ||
165 | ** (The '__extension__' in gnu compilers is only to avoid warnings.) | ||
166 | */ | ||
167 | #if defined(__GNUC__) | ||
168 | #define cast_func(p) (__extension__ (voidf)(p)) | ||
169 | #else | ||
170 | #define cast_func(p) ((voidf)(p)) | ||
171 | #endif | ||
172 | |||
173 | |||
174 | |||
175 | /* | ||
156 | ** non-return type | 176 | ** non-return type |
157 | */ | 177 | */ |
158 | #if !defined(l_noret) | 178 | #if !defined(l_noret) |