diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-16 14:57:51 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-09-16 14:57:51 -0300 |
commit | e51564d1bee5aa8b411328d7d3d75906dfc0a260 (patch) | |
tree | 0f2d6e9185961be7999757085226ca87a2c7486d /lstate.h | |
parent | 98ec7995912af0aaaf9a97c5bc1be17e9b601af9 (diff) | |
download | lua-e51564d1bee5aa8b411328d7d3d75906dfc0a260.tar.gz lua-e51564d1bee5aa8b411328d7d3d75906dfc0a260.tar.bz2 lua-e51564d1bee5aa8b411328d7d3d75906dfc0a260.zip |
Details in comments and documentation
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -334,6 +334,12 @@ struct lua_State { | |||
334 | 334 | ||
335 | /* | 335 | /* |
336 | ** Union of all collectable objects (only for conversions) | 336 | ** Union of all collectable objects (only for conversions) |
337 | ** ISO C99, 6.5.2.3 p.5: | ||
338 | ** "if a union contains several structures that share a common initial | ||
339 | ** sequence [...], and if the union object currently contains one | ||
340 | ** of these structures, it is permitted to inspect the common initial | ||
341 | ** part of any of them anywhere that a declaration of the complete type | ||
342 | ** of the union is visible." | ||
337 | */ | 343 | */ |
338 | union GCUnion { | 344 | union GCUnion { |
339 | GCObject gc; /* common header */ | 345 | GCObject gc; /* common header */ |
@@ -347,6 +353,11 @@ union GCUnion { | |||
347 | }; | 353 | }; |
348 | 354 | ||
349 | 355 | ||
356 | /* | ||
357 | ** ISO C99, 6.7.2.1 p.14: | ||
358 | ** "A pointer to a union object, suitably converted, points to each of | ||
359 | ** its members [...], and vice versa." | ||
360 | */ | ||
350 | #define cast_u(o) cast(union GCUnion *, (o)) | 361 | #define cast_u(o) cast(union GCUnion *, (o)) |
351 | 362 | ||
352 | /* macros to convert a GCObject into a specific value */ | 363 | /* macros to convert a GCObject into a specific value */ |