Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
gluaconf.h
1/*
2** $Id: luaconf.h $
3** Configuration file for Lua
4** See Copyright Notice in lua.h
5*/
6
7
8#ifndef luaconf_h
9#define luaconf_h
10
11/* Used by C code generated by mutex.lua */
12#define BA_LUA_LIB
13
14#include <limits.h>
15#include <stddef.h>
16#include <HttpTrace.h>
17#undef LoadString
18
19#define LUA_FLOORN2I 1
20
21/* lstate.c : the seed is used to randomize hashes */
22BAI_FUNC unsigned int baluai_makeseed(void);
23#define luai_makeseed() baluai_makeseed()
24#if !defined(lua_writestringerror)
25#define lua_writestringerror(s,p) HttpTrace_printf(0, (s), (p))
26#endif
27
28#if !defined(lua_writestring)
29#define lua_writestring(s,l) HttpTrace_write(0,s,(int)l)
30#endif
31
32#if !defined(lua_writeline)
33#define lua_writeline() (HttpTrace_write(0,"\n", 1), HttpTrace_flush())
34#endif
35
36#if BA_ENABLE_LUA_DEBUGGER
37struct lua_State;
38BAI_FUNC void LDbgMon_userstatethread(struct lua_State* L, struct lua_State* L1);
39BAI_FUNC void LDbgMon_userstatefree(struct lua_State* L, struct lua_State* L1);
40#define luai_userstatethread(L,L1) LDbgMon_userstatethread(L,L1)
41#define luai_userstatefree(L,L1) LDbgMon_userstatefree(L,L1)
42#endif
43
44
45/*
46** ===================================================================
47** General Configuration File for Lua
48**
49** Some definitions here can be changed externally, through the compiler
50** (e.g., with '-D' options): They are commented out or protected
51** by '#if !defined' guards. However, several other definitions
52** should be changed directly here, either because they affect the
53** Lua ABI (by making the changes here, you ensure that all software
54** connected to Lua, such as C libraries, will be compiled with the same
55** configuration); or because they are seldom changed.
56**
57** Search for "@@" to find all configurable definitions.
58** ===================================================================
59*/
60
61
62/*
63** {====================================================================
64** System Configuration: macros to adapt (if needed) Lua to some
65** particular platform, for instance restricting it to C89.
66** =====================================================================
67*/
68
69/*
70@@ LUA_USE_C89 controls the use of non-ISO-C89 features.
71** Define it if you want Lua to avoid the use of a few C99 features
72** or Windows-specific features on Windows.
73*/
74/* #define LUA_USE_C89 */
75
76
77/*
78** By default, Lua on Windows use (some) specific Windows features
79*/
80#if !defined(BAS_RTOS_WINDOWS_SIM) && !defined(__INTIME__)
81#if !defined(LUA_USE_C89) && defined(_WIN32) && !defined(_WIN32_WCE)
82#define LUA_USE_WINDOWS /* enable goodies for regular Windows */
83#endif
84#endif
85
86
87#if defined(LUA_USE_WINDOWS)
88#define LUA_DL_DLL /* enable support for DLL */
89#define LUA_USE_C89 /* broadly, Windows is C89 */
90#endif
91
92
93/*
94** When POSIX DLL ('LUA_USE_DLOPEN') is enabled, the Lua stand-alone
95** application will try to dynamically link a 'readline' facility
96** for its REPL. In that case, LUA_READLINELIB is the name of the
97** library it will look for those facilities. If lua.c cannot open
98** the specified library, it will generate a warning and then run
99** without 'readline'. If that macro is not defined, lua.c will not
100** use 'readline'.
101*/
102
103#if BA_LUA_USE_DLOPEN
104
105
106#if defined(LUA_USE_LINUX)
107#define LUA_USE_POSIX
108#define LUA_USE_DLOPEN /* needs an extra library: -ldl */
109#if !defined(LUA_READLINELIB)
110#define LUA_READLINELIB "libreadline.so"
111#endif
112#endif
113
114
115#if defined(LUA_USE_MACOSX)
116#define LUA_USE_POSIX
117#define LUA_USE_DLOPEN /* macOS does not need -ldl */
118#define LUA_USE_READLINE /* needs an extra library: -lreadline */
119#endif
120
121
122#if defined(LUA_USE_IOS)
123#define LUA_USE_POSIX
124#define LUA_USE_DLOPEN
125#endif
126
127#endif /* BA_LUA_USE_DLOPEN */
128
129
130#if defined(LUA_USE_C89) && defined(LUA_USE_POSIX)
131#error "POSIX is not compatible with C89"
132#endif
133
134
135/*
136@@ LUAI_IS32INT is true iff 'int' has (at least) 32 bits.
137*/
138#define LUAI_IS32INT ((UINT_MAX >> 30) >= 3)
139
140/* }================================================================== */
141
142
143
144/*
145** {==================================================================
146** Configuration for Number types. These options should not be
147** set externally, because any other code connected to Lua must
148** use the same configuration.
149** ===================================================================
150*/
151
152/*
153@@ LUA_INT_TYPE defines the type for Lua integers.
154@@ LUA_FLOAT_TYPE defines the type for Lua floats.
155** Lua should work fine with any mix of these options supported
156** by your C compiler. The usual configurations are 64-bit integers
157** and 'double' (the default), 32-bit integers and 'float' (for
158** restricted platforms), and 'long'/'double' (for C compilers not
159** compliant with C99, which may not have support for 'long long').
160*/
161
162/* predefined options for LUA_INT_TYPE */
163#define LUA_INT_INT 1
164#define LUA_INT_LONG 2
165#define LUA_INT_LONGLONG 3
166
167/* predefined options for LUA_FLOAT_TYPE */
168#define LUA_FLOAT_FLOAT 1
169#define LUA_FLOAT_DOUBLE 2
170#define LUA_FLOAT_LONGDOUBLE 3
171
172
173/* Default configuration ('long long' and 'double', for 64-bit Lua) */
174#define LUA_INT_DEFAULT LUA_INT_LONGLONG
175#define LUA_FLOAT_DEFAULT LUA_FLOAT_DOUBLE
176
177
178/*
179@@ LUA_32BITS enables Lua with 32-bit integers and 32-bit floats.
180*/
181/* #define LUA_32BITS */
182
183
184/*
185@@ LUA_C89_NUMBERS ensures that Lua uses the largest types available for
186** C89 ('long' and 'double'); Windows always has '__int64', so it does
187** not need to use this case.
188*/
189#if defined(LUA_USE_C89) && !defined(LUA_USE_WINDOWS)
190#define LUA_C89_NUMBERS 1
191#else
192#define LUA_C89_NUMBERS 0
193#endif
194
195
196#if defined(LUA_32BITS) /* { */
197/*
198** 32-bit integers and 'float'
199*/
200#if LUAI_IS32INT /* use 'int' if big enough */
201#define LUA_INT_TYPE LUA_INT_INT
202#else /* otherwise use 'long' */
203#define LUA_INT_TYPE LUA_INT_LONG
204#endif
205#define LUA_FLOAT_TYPE LUA_FLOAT_FLOAT
206
207#elif LUA_C89_NUMBERS /* }{ */
208/*
209** largest types available for C89 ('long' and 'double')
210*/
211#define LUA_INT_TYPE LUA_INT_LONG
212#define LUA_FLOAT_TYPE LUA_FLOAT_DOUBLE
213
214#else /* }{ */
215/* use defaults */
216
217#define LUA_INT_TYPE LUA_INT_DEFAULT
218#define LUA_FLOAT_TYPE LUA_FLOAT_DEFAULT
219
220#endif /* } */
221
222
223/* }================================================================== */
224
225
226
227/*
228** {==================================================================
229** Configuration for Paths.
230** ===================================================================
231*/
232
233/*
234** LUA_PATH_SEP is the character that separates templates in a path.
235** LUA_PATH_MARK is the string that marks the substitution points in a
236** template.
237** LUA_EXEC_DIR in a Windows path is replaced by the executable's
238** directory.
239*/
240#define LUA_PATH_SEP ";"
241#define LUA_PATH_MARK "?"
242#define LUA_EXEC_DIR "!"
243
244
245/*
246@@ LUA_PATH_DEFAULT is the default path that Lua uses to look for
247** Lua libraries.
248@@ LUA_CPATH_DEFAULT is the default path that Lua uses to look for
249** C libraries.
250** CHANGE them if your machine has a non-conventional directory
251** hierarchy or if you want to install your libraries in
252** non-conventional directories.
253*/
254
255#define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR
256#if defined(_WIN32) /* { */
257/*
258** In Windows, any exclamation mark ('!') in the path is replaced by the
259** path of the directory of the executable file of the current process.
260*/
261#define LUA_LDIR "!\\lua\\"
262#define LUA_CDIR "!\\"
263#define LUA_SHRDIR "!\\..\\share\\lua\\" LUA_VDIR "\\"
264
265#if !defined(LUA_PATH_DEFAULT)
266#define LUA_PATH_DEFAULT \
267 LUA_LDIR "?.lua;" LUA_LDIR "?\\init.lua;" \
268 LUA_CDIR "?.lua;" LUA_CDIR "?\\init.lua;" \
269 LUA_SHRDIR "?.lua;" LUA_SHRDIR "?\\init.lua;" \
270 ".\\?.lua;" ".\\?\\init.lua"
271#endif
272
273#if !defined(LUA_CPATH_DEFAULT)
274#define LUA_CPATH_DEFAULT \
275 LUA_CDIR "?.dll;" \
276 LUA_CDIR "..\\lib\\lua\\" LUA_VDIR "\\?.dll;" \
277 LUA_CDIR "loadall.dll;" ".\\?.dll"
278#endif
279
280#else /* }{ */
281
282#define LUA_ROOT "/usr/local/"
283#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
284#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
285
286#if !defined(LUA_PATH_DEFAULT)
287#define LUA_PATH_DEFAULT \
288 LUA_LDIR "?.lua;" LUA_LDIR "?/init.lua;" \
289 LUA_CDIR "?.lua;" LUA_CDIR "?/init.lua;" \
290 "./?.lua;" "./?/init.lua"
291#endif
292
293#if !defined(LUA_CPATH_DEFAULT)
294#define LUA_CPATH_DEFAULT \
295 LUA_CDIR "?.so;" LUA_CDIR "loadall.so;" "./?.so"
296#endif
297
298#endif /* } */
299
300
301/*
302@@ LUA_DIRSEP is the directory separator (for submodules).
303** CHANGE it if your machine does not use "/" as the directory separator
304** and is not Windows. (On Windows Lua automatically uses "\".)
305*/
306#if !defined(LUA_DIRSEP)
307
308#if defined(_WIN32)
309#define LUA_DIRSEP "\\"
310#else
311#define LUA_DIRSEP "/"
312#endif
313
314#endif
315
316
317/*
318** LUA_IGMARK is a mark to ignore all after it when building the
319** module name (e.g., used to build the luaopen_ function name).
320** Typically, the suffix after the mark is the module version,
321** as in "mod-v1.2.so".
322*/
323#define LUA_IGMARK "-"
324
325/* }================================================================== */
326
327
328/*
329** {==================================================================
330** Marks for exported symbols in the C code
331** ===================================================================
332*/
333
334/*
335@@ LUA_API is a mark for all core API functions.
336@@ LUALIB_API is a mark for all auxiliary library functions.
337@@ LUAMOD_API is a mark for all standard library opening functions.
338** All public Lua APIs use the same import/export decision as BAS.
339** There is no separate Lua DLL ownership or build option.
340*/
341#define LUA_API extern BA_API
342
343
344/*
345** More often than not the libs go together with the core.
346*/
347#define LUALIB_API LUA_API
348
349#if defined(__cplusplus)
350/* Lua uses the "C name" when calling open functions */
351#define LUAMOD_API extern "C" BA_API
352#else
353#define LUAMOD_API LUA_API
354#endif
355
356/* }================================================================== */
357
358
359/*
360** {==================================================================
361** Compatibility with previous versions
362** ===================================================================
363*/
364
365/*
366@@ LUA_COMPAT_GLOBAL avoids 'global' being a reserved word
367*/
368#if !defined(LUA_COMPAT_GLOBAL)
369#define LUA_COMPAT_GLOBAL 1
370#endif
371
372
373/*
374@@ LUA_COMPAT_MATHLIB controls the presence of several deprecated
375** functions in the mathematical library.
376** (These functions were already officially removed in 5.3;
377** nevertheless they are still available here.)
378*/
379/* #define LUA_COMPAT_MATHLIB */
380
381
382/*
383@@ The following macros supply trivial compatibility for some
384** changes in the API. The macros themselves document how to
385** change your code to avoid using them.
386** (Once more, these macros were officially removed in 5.3, but they are
387** still available here.)
388*/
389#define lua_strlen(L,i) lua_rawlen(L, (i))
390
391#define lua_objlen(L,i) lua_rawlen(L, (i))
392
393#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ)
394#define lua_lessthan(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPLT)
395
396/* }================================================================== */
397
398
399
400/*
401** {==================================================================
402** Configuration for Numbers (low-level part).
403** Change these definitions if no predefined LUA_FLOAT_* / LUA_INT_*
404** satisfy your needs.
405** ===================================================================
406*/
407
408
409/*
410@@ LUAI_UACNUMBER is the result of a 'default argument promotion'
411@@ over a floating number.
412@@ l_floatatt(x) corrects float attribute 'x' to the proper float type
413** by prefixing it with one of FLT/DBL/LDBL.
414@@ LUA_NUMBER_FRMLEN is the length modifier for writing floats.
415@@ LUA_NUMBER_FMT is the format for writing floats with the maximum
416** number of digits that respects tostring(tonumber(numeral)) == numeral.
417** (That would be floor(log10(2^n)), where n is the number of bits in
418** the float mantissa.)
419@@ LUA_NUMBER_FMT_N is the format for writing floats with the minimum
420** number of digits that ensures tonumber(tostring(number)) == number.
421** (That would be LUA_NUMBER_FMT+2.)
422@@ l_mathop allows the addition of an 'l' or 'f' to all math operations.
423@@ l_floor takes the floor of a float.
424@@ lua_str2number converts a decimal numeral to a number.
425*/
426
427#define LUA_NZERO 0.0
428
429/* The following definition is good for most cases here */
430
431#define l_floor(x) (l_mathop(floor)(x))
432
433
434/* now the variable definitions */
435
436#if LUA_FLOAT_TYPE == LUA_FLOAT_FLOAT /* { single float */
437
438#define LUA_NUMBER float
439
440#define l_floatatt(n) (FLT_##n)
441
442#define LUAI_UACNUMBER double
443
444#define LUA_NUMBER_FRMLEN ""
445#define LUA_NUMBER_FMT "%.7g"
446#define LUA_NUMBER_FMT_N "%.9g"
447
448#define l_mathop(op) op##f
449
450#define lua_str2number(s,p) strtof((s), (p))
451
452
453#elif LUA_FLOAT_TYPE == LUA_FLOAT_LONGDOUBLE /* }{ long double */
454
455#define LUA_NUMBER long double
456
457#define l_floatatt(n) (LDBL_##n)
458
459#define LUAI_UACNUMBER long double
460
461#define LUA_NUMBER_FRMLEN "L"
462#define LUA_NUMBER_FMT "%.19Lg"
463#define LUA_NUMBER_FMT_N "%.21Lg"
464
465#define l_mathop(op) op##l
466
467#define lua_str2number(s,p) strtold((s), (p))
468
469#elif LUA_FLOAT_TYPE == LUA_FLOAT_DOUBLE /* }{ double */
470
471#define LUA_NUMBER double
472
473#define l_floatatt(n) (DBL_##n)
474
475#define LUAI_UACNUMBER double
476
477#define LUA_NUMBER_FRMLEN ""
478#define LUA_NUMBER_FMT "%.15g"
479#define LUA_NUMBER_FMT_N "%.17g"
480
481#define l_mathop(op) op
482
483#define lua_str2number(s,p) strtod((s), (p))
484
485#else /* }{ */
486
487#error "numeric float type not defined"
488
489#endif /* } */
490
491
492
493/*
494@@ LUA_UNSIGNED is the unsigned version of LUA_INTEGER.
495@@ LUAI_UACINT is the result of a 'default argument promotion'
496@@ over a LUA_INTEGER.
497@@ LUA_INTEGER_FRMLEN is the length modifier for reading/writing integers.
498@@ LUA_INTEGER_FMT is the format for writing integers.
499@@ LUA_MAXINTEGER is the maximum value for a LUA_INTEGER.
500@@ LUA_MININTEGER is the minimum value for a LUA_INTEGER.
501@@ LUA_MAXUNSIGNED is the maximum value for a LUA_UNSIGNED.
502@@ lua_integer2str converts an integer to a string.
503*/
504
505
506/* The following definitions are good for most cases here */
507
508#define LUA_INTEGER_FMT "%" LUA_INTEGER_FRMLEN "d"
509
510#define LUAI_UACINT LUA_INTEGER
511
512#define lua_integer2str(s,sz,n) \
513 l_sprintf((s), sz, LUA_INTEGER_FMT, (LUAI_UACINT)(n))
514
515/*
516** use LUAI_UACINT here to avoid problems with promotions (which
517** can turn a comparison between unsigneds into a signed comparison)
518*/
519#define LUA_UNSIGNED unsigned LUAI_UACINT
520
521
522/* now the variable definitions */
523
524#if LUA_INT_TYPE == LUA_INT_INT /* { int */
525
526#define LUA_INTEGER int
527#define LUA_INTEGER_FRMLEN ""
528
529#define LUA_MAXINTEGER INT_MAX
530#define LUA_MININTEGER INT_MIN
531
532#define LUA_MAXUNSIGNED UINT_MAX
533
534#elif LUA_INT_TYPE == LUA_INT_LONG /* }{ long */
535
536#define LUA_INTEGER long
537#define LUA_INTEGER_FRMLEN "l"
538
539#define LUA_MAXINTEGER LONG_MAX
540#define LUA_MININTEGER LONG_MIN
541
542#define LUA_MAXUNSIGNED ULONG_MAX
543
544#elif LUA_INT_TYPE == LUA_INT_LONGLONG /* }{ long long */
545
546/* use presence of macro LLONG_MAX as proxy for C99 compliance */
547#if defined(LLONG_MAX) /* { */
548/* use ISO C99 stuff */
549
550#define LUA_INTEGER long long
551#define LUA_INTEGER_FRMLEN "ll"
552
553#define LUA_MAXINTEGER LLONG_MAX
554#define LUA_MININTEGER LLONG_MIN
555
556#define LUA_MAXUNSIGNED ULLONG_MAX
557
558#elif defined(LUA_USE_WINDOWS) /* }{ */
559/* in Windows, can use specific Windows types */
560
561#define LUA_INTEGER __int64
562#define LUA_INTEGER_FRMLEN "I64"
563
564#define LUA_MAXINTEGER _I64_MAX
565#define LUA_MININTEGER _I64_MIN
566
567#define LUA_MAXUNSIGNED _UI64_MAX
568
569#else /* }{ */
570
571#error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' \
572 or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
573
574#endif /* } */
575
576#else /* }{ */
577
578#error "numeric integer type not defined"
579
580#endif /* } */
581
582
583/* }================================================================== */
584
585
586/*
587** {==================================================================
588** Dependencies with C99 and other C details
589** ===================================================================
590*/
591
592/*
593@@ l_sprintf is equivalent to 'snprintf' or 'sprintf' in C89.
594** (All uses in Lua have only one format item.)
595*/
596#define l_sprintf(s,sz,f,i) basnprintf(s,sz,f,i)
597
598
599/*
600@@ lua_strx2number converts a hexadecimal numeral to a number.
601** In C99, 'strtod' does that conversion. Otherwise, you can
602** leave 'lua_strx2number' undefined and Lua will provide its own
603** implementation.
604*/
605#if !defined(LUA_USE_C89)
606#define lua_strx2number(s,p) lua_str2number(s,p)
607#endif
608
609
610/*
611@@ lua_pointer2str converts a pointer to a readable string in a
612** non-specified way.
613*/
614#define lua_pointer2str(buff,sz,p) l_sprintf(buff,sz,"%p",p)
615
616
617/*
618@@ lua_number2strx converts a float to a hexadecimal numeral.
619** In C99, 'sprintf' (with format specifiers '%a'/'%A') does that.
620** Otherwise, you can leave 'lua_number2strx' undefined and Lua will
621** provide its own implementation.
622*/
623#if !defined(LUA_USE_C89)
624#define lua_number2strx(L,b,sz,f,n) \
625 ((void)L, l_sprintf(b,sz,f,(LUAI_UACNUMBER)(n)))
626#endif
627
628
629/*
630** 'strtof' and 'opf' variants for math functions are not valid in
631** C89. Otherwise, the macro 'HUGE_VALF' is a good proxy for testing the
632** availability of these variants. ('math.h' is already included in
633** all files that use these macros.)
634*/
635#if defined(LUA_USE_C89) || (defined(HUGE_VAL) && !defined(HUGE_VALF))
636#undef l_mathop /* variants not available */
637#undef lua_str2number
638#define l_mathop(op) (lua_Number)op /* no variant */
639#define lua_str2number(s,p) ((lua_Number)strtod((s), (p)))
640#endif
641
642
643/*
644@@ LUA_KCONTEXT is the type of the context ('ctx') for continuation
645** functions. It must be a numerical type; Lua will use 'intptr_t' if
646** available, otherwise it will use 'ptrdiff_t' (the nearest thing to
647** 'intptr_t' in C89)
648*/
649#define LUA_KCONTEXT ptrdiff_t
650
651#if !defined(LUA_USE_C89) && defined(__STDC_VERSION__) && \
652 __STDC_VERSION__ >= 199901L
653#include <stdint.h>
654#if defined(INTPTR_MAX) /* even in C99 this type is optional */
655#undef LUA_KCONTEXT
656#define LUA_KCONTEXT intptr_t
657#endif
658#endif
659
660
661/*
662@@ lua_getlocaledecpoint gets the locale "radix character" (decimal point).
663** Change that if you do not want to use C locales. (Code using this
664** macro must include the header 'locale.h'.)
665*/
666#if !defined(lua_getlocaledecpoint)
667#define lua_getlocaledecpoint() (localeconv()->decimal_point[0])
668#endif
669
670
671/*
672** macros to improve jump prediction, used mostly for error handling
673** and debug facilities. (Some macros in the Lua API use these macros.
674** Define LUA_NOBUILTIN if you do not want '__builtin_expect' in your
675** code.)
676*/
677#if !defined(luai_likely)
678
679#if !defined(LUA_NOBUILTIN) && defined(__GNUC__) && (__GNUC__ >= 3)
680#define luai_likely(x) (__builtin_expect(((x) != 0), 1))
681#define luai_unlikely(x) (__builtin_expect(((x) != 0), 0))
682#else
683#define luai_likely(x) (x)
684#define luai_unlikely(x) (x)
685#endif
686
687#endif
688
689
690
691/* }================================================================== */
692
693
694/*
695** {==================================================================
696** Language Variations
697** =====================================================================
698*/
699
700/*
701@@ LUA_NOCVTN2S/LUA_NOCVTS2N control how Lua performs some
702** coercions. Define LUA_NOCVTN2S to turn off automatic coercion from
703** numbers to strings. Define LUA_NOCVTS2N to turn off automatic
704** coercion from strings to numbers.
705*/
706/* #define LUA_NOCVTN2S */
707/* #define LUA_NOCVTS2N */
708
709
710/*
711@@ LUA_USE_APICHECK turns on several consistency checks on the C API.
712** Define it as a help when debugging C code.
713*/
714/* #define LUA_USE_APICHECK */
715
716/* }================================================================== */
717
718
719/*
720** {==================================================================
721** Macros that affect the API and must be stable (that is, must be the
722** same when you compile Lua and when you compile code that links to
723** Lua).
724** =====================================================================
725*/
726
727/*
728@@ LUA_EXTRASPACE defines the size of a raw memory area associated with
729** a Lua state with very fast access.
730** CHANGE it if you need a different size.
731*/
732#define LUA_EXTRASPACE (sizeof(void *))
733
734
735/*
736@@ LUA_IDSIZE gives the maximum size for the description of the source
737** of a function in debug information.
738** CHANGE it if you want a different size.
739*/
740#define LUA_IDSIZE 60
741
742
743/*
744@@ LUAL_BUFFERSIZE is the initial buffer size used by the lauxlib
745** buffer system.
746*/
747#define LUAL_BUFFERSIZE ((int)(16 * sizeof(void*) * sizeof(lua_Number)))
748
749
750/*
751@@ LUAI_MAXALIGN defines fields that ensure proper alignment for
752** memory areas offered by Lua (e.g., userdata memory).
753** Add fields to it if you need alignment for non-ISO objects.
754*/
755#if defined(LLONG_MAX)
756/* use ISO C99 stuff */
757#define LUAI_MAXALIGN long double u; void *s; long long l
758#else
759/* use only C89 stuff */
760#define LUAI_MAXALIGN lua_Number n; double u; void *s; lua_Integer i; long l
761#endif
762
763/* }================================================================== */
764
765
766
767
768
769/* =================================================================== */
770
771/*
772** Local configuration. You can use this space to add your redefinitions
773** without modifying the main part of the file.
774*/
775
776
777
778#endif