aboutsummaryrefslogtreecommitdiff
path: root/lobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'lobject.h')
-rw-r--r--lobject.h10
1 files changed, 1 insertions, 9 deletions
diff --git a/lobject.h b/lobject.h
index df31a1a0..53e67932 100644
--- a/lobject.h
+++ b/lobject.h
@@ -350,21 +350,13 @@ typedef struct TString {
350} TString; 350} TString;
351 351
352 352
353/*
354** Ensures that address after this type is always fully aligned.
355*/
356typedef union UTString {
357 LUAI_MAXALIGN; /* ensures maximum alignment for strings */
358 TString tsv;
359} UTString;
360
361 353
362/* 354/*
363** Get the actual string (array of bytes) from a 'TString'. 355** Get the actual string (array of bytes) from a 'TString'.
364** (Access to 'extra' ensures that value is really a 'TString'.) 356** (Access to 'extra' ensures that value is really a 'TString'.)
365*/ 357*/
366#define getstr(ts) \ 358#define getstr(ts) \
367 check_exp(sizeof((ts)->extra), cast_charp((ts)) + sizeof(UTString)) 359 check_exp(sizeof((ts)->extra), cast_charp((ts)) + sizeof(TString))
368 360
369 361
370/* get the actual string (array of bytes) from a Lua value */ 362/* get the actual string (array of bytes) from a Lua value */