@@ -9,68 +9,68 @@ public static class Lua
9
9
10
10
private const string DllName = "Lua515.dll" ;
11
11
12
- public static readonly string LUA_LDIR = "!\\ lua\\ " ;
13
- public static readonly string LUA_CDIR = "!\\ " ;
14
- public static readonly string LUA_PATH_DEFAULT = ".\\ ?.lua;" + LUA_LDIR + "?.lua;" + LUA_LDIR + "?\\ init.lua;" + LUA_CDIR + "?.lua;" + LUA_CDIR + "?\\ init.lua" ;
15
- public static readonly string LUA_CPATH_DEFAULT = ".\\ ?.dll;" + LUA_CDIR + "?.dll;" + LUA_CDIR + "loadall.dll" ;
12
+ public const string LUA_LDIR = "!\\ lua\\ " ;
13
+ public const string LUA_CDIR = "!\\ " ;
14
+ public const string LUA_PATH_DEFAULT = ".\\ ?.lua;" + LUA_LDIR + "?.lua;" + LUA_LDIR + "?\\ init.lua;" + LUA_CDIR + "?.lua;" + LUA_CDIR + "?\\ init.lua" ;
15
+ public const string LUA_CPATH_DEFAULT = ".\\ ?.dll;" + LUA_CDIR + "?.dll;" + LUA_CDIR + "loadall.dll" ;
16
16
17
- public static readonly string LUA_DIRSEP = "\\ " ;
17
+ public const string LUA_DIRSEP = "\\ " ;
18
18
19
- public static readonly string LUA_PATHSEP = ";" ;
20
- public static readonly string LUA_PATH_MARK = "?" ;
21
- public static readonly string LUA_EXECDIR = "!" ;
22
- public static readonly string LUA_IGMARK = "-" ;
19
+ public const string LUA_PATHSEP = ";" ;
20
+ public const string LUA_PATH_MARK = "?" ;
21
+ public const string LUA_EXECDIR = "!" ;
22
+ public const string LUA_IGMARK = "-" ;
23
23
24
- public static readonly int LUA_IDSIZE = 60 ;
24
+ public const int LUA_IDSIZE = 60 ;
25
25
26
- public static readonly int LUAI_MAXCALLS = 20000 ;
27
- public static readonly int LUAI_MAXCSTACK = 8000 ;
28
- public static readonly int LUAI_BITSINT = 32 ;
29
- public static readonly int LUAI_MAXCCALLS = 200 ;
30
- public static readonly int LUAI_MAXVARS = 200 ;
31
- public static readonly int LUAI_MAXUPVALUES = 60 ;
32
- public static readonly int LUAL_BUFFERSIZE = 512 ;
26
+ public const int LUAI_MAXCALLS = 20000 ;
27
+ public const int LUAI_MAXCSTACK = 8000 ;
28
+ public const int LUAI_BITSINT = 32 ;
29
+ public const int LUAI_MAXCCALLS = 200 ;
30
+ public const int LUAI_MAXVARS = 200 ;
31
+ public const int LUAI_MAXUPVALUES = 60 ;
32
+ public const int LUAL_BUFFERSIZE = 512 ;
33
33
34
- public static readonly int LUA_MAXCAPTURES = 32 ;
34
+ public const int LUA_MAXCAPTURES = 32 ;
35
35
36
- public static readonly string LUA_VERSION = "Lua 5.1" ;
37
- public static readonly string LUA_RELEASE = "Lua 5.1.5" ;
38
- public static readonly int LUA_VERSION_NUM = 501 ;
39
- public static readonly string LUA_COPYRIGHT = "Copyright (C) 1994-2012 Lua.org, PUC-Rio" ;
40
- public static readonly string LUA_AUTHORS = "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" ;
36
+ public const string LUA_VERSION = "Lua 5.1" ;
37
+ public const string LUA_RELEASE = "Lua 5.1.5" ;
38
+ public const int LUA_VERSION_NUM = 501 ;
39
+ public const string LUA_COPYRIGHT = "Copyright (C) 1994-2012 Lua.org, PUC-Rio" ;
40
+ public const string LUA_AUTHORS = "R. Ierusalimschy, L. H. de Figueiredo & W. Celes" ;
41
41
42
42
// TODO: \033Lua
43
- public static readonly string LUA_SIGNATURE = "\x1b Lua" ;
43
+ public const string LUA_SIGNATURE = "\x1b Lua" ;
44
44
45
- public static readonly int LUA_MULTRET = - 1 ;
45
+ public const int LUA_MULTRET = - 1 ;
46
46
47
- public static readonly int LUA_REGISTRYINDEX = - 10000 ;
48
- public static readonly int LUA_ENVIRONINDEX = - 10001 ;
49
- public static readonly int LUA_GLOBALSINDEX = - 10002 ;
47
+ public const int LUA_REGISTRYINDEX = - 10000 ;
48
+ public const int LUA_ENVIRONINDEX = - 10001 ;
49
+ public const int LUA_GLOBALSINDEX = - 10002 ;
50
50
51
51
public static int lua_upvalueindex ( int i )
52
52
{
53
53
return LUA_GLOBALSINDEX - i ;
54
54
}
55
55
56
- public static readonly int LUA_YIELD = 1 ;
57
- public static readonly int LUA_ERRRUN = 2 ;
58
- public static readonly int LUA_ERRSYNTAX = 3 ;
59
- public static readonly int LUA_ERRMEM = 4 ;
60
- public static readonly int LUA_ERRERR = 5 ;
56
+ public const int LUA_YIELD = 1 ;
57
+ public const int LUA_ERRRUN = 2 ;
58
+ public const int LUA_ERRSYNTAX = 3 ;
59
+ public const int LUA_ERRMEM = 4 ;
60
+ public const int LUA_ERRERR = 5 ;
61
61
62
- public static readonly int LUA_TNONE = - 1 ;
63
- public static readonly int LUA_TNIL = 0 ;
64
- public static readonly int LUA_TBOOLEAN = 1 ;
65
- public static readonly int LUA_TLIGHTUSERDATA = 2 ;
66
- public static readonly int LUA_TNUMBER = 3 ;
67
- public static readonly int LUA_TSTRING = 4 ;
68
- public static readonly int LUA_TTABLE = 5 ;
69
- public static readonly int LUA_TFUNCTION = 6 ;
70
- public static readonly int LUA_TUSERDATA = 7 ;
71
- public static readonly int LUA_TTHREAD = 8 ;
62
+ public const int LUA_TNONE = - 1 ;
63
+ public const int LUA_TNIL = 0 ;
64
+ public const int LUA_TBOOLEAN = 1 ;
65
+ public const int LUA_TLIGHTUSERDATA = 2 ;
66
+ public const int LUA_TNUMBER = 3 ;
67
+ public const int LUA_TSTRING = 4 ;
68
+ public const int LUA_TTABLE = 5 ;
69
+ public const int LUA_TFUNCTION = 6 ;
70
+ public const int LUA_TUSERDATA = 7 ;
71
+ public const int LUA_TTHREAD = 8 ;
72
72
73
- public static readonly int LUA_MINSTACK = 20 ;
73
+ public const int LUA_MINSTACK = 20 ;
74
74
75
75
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
76
76
public static extern IntPtr lua_newstate ( lua_Alloc f , IntPtr ud ) ;
@@ -275,14 +275,14 @@ public static int lua_upvalueindex(int i)
275
275
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
276
276
public static extern int lua_status ( IntPtr L ) ;
277
277
278
- public static readonly int LUA_GCSTOP = 0 ;
279
- public static readonly int LUA_GCRESTART = 1 ;
280
- public static readonly int LUA_GCCOLLECT = 2 ;
281
- public static readonly int LUA_GCCOUNT = 3 ;
282
- public static readonly int LUA_GCCOUNTB = 4 ;
283
- public static readonly int LUA_GCSTEP = 5 ;
284
- public static readonly int LUA_GCSETPAUSE = 6 ;
285
- public static readonly int LUA_GCSETSTEPMUL = 7 ;
278
+ public const int LUA_GCSTOP = 0 ;
279
+ public const int LUA_GCRESTART = 1 ;
280
+ public const int LUA_GCCOLLECT = 2 ;
281
+ public const int LUA_GCCOUNT = 3 ;
282
+ public const int LUA_GCCOUNTB = 4 ;
283
+ public const int LUA_GCSTEP = 5 ;
284
+ public const int LUA_GCSETPAUSE = 6 ;
285
+ public const int LUA_GCSETSTEPMUL = 7 ;
286
286
287
287
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
288
288
public static extern int lua_gc ( IntPtr L , int what , int data ) ;
@@ -407,16 +407,16 @@ public static int lua_getgccount(IntPtr L)
407
407
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
408
408
public static extern void lua_setlevel ( IntPtr from , IntPtr to ) ;
409
409
410
- public static readonly int LUA_HOOKCALL = 0 ;
411
- public static readonly int LUA_HOOKRET = 1 ;
412
- public static readonly int LUA_HOOKLINE = 2 ;
413
- public static readonly int LUA_HOOKCOUNT = 3 ;
414
- public static readonly int LUA_HOOKTAILRET = 4 ;
410
+ public const int LUA_HOOKCALL = 0 ;
411
+ public const int LUA_HOOKRET = 1 ;
412
+ public const int LUA_HOOKLINE = 2 ;
413
+ public const int LUA_HOOKCOUNT = 3 ;
414
+ public const int LUA_HOOKTAILRET = 4 ;
415
415
416
- public static readonly int LUA_MASKCALL = ( 1 << LUA_HOOKCALL ) ;
417
- public static readonly int LUA_MASKRET = ( 1 << LUA_HOOKRET ) ;
418
- public static readonly int LUA_MASKLINE = ( 1 << LUA_HOOKLINE ) ;
419
- public static readonly int LUA_MASKCOUNT = ( 1 << LUA_HOOKCOUNT ) ;
416
+ public const int LUA_MASKCALL = ( 1 << LUA_HOOKCALL ) ;
417
+ public const int LUA_MASKRET = ( 1 << LUA_HOOKRET ) ;
418
+ public const int LUA_MASKLINE = ( 1 << LUA_HOOKLINE ) ;
419
+ public const int LUA_MASKCOUNT = ( 1 << LUA_HOOKCOUNT ) ;
420
420
421
421
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
422
422
public static extern int lua_getstack ( IntPtr L , int level , lua_Debug ar ) ;
@@ -502,7 +502,7 @@ public static ulong luaL_getn(IntPtr L, int i)
502
502
return lua_objlen ( L , i ) ;
503
503
}
504
504
505
- public static readonly int LUA_ERRFILE = LUA_ERRERR + 1 ;
505
+ public const int LUA_ERRFILE = LUA_ERRERR + 1 ;
506
506
507
507
[ StructLayout ( LayoutKind . Sequential , Pack = 1 , CharSet = CharSet . Ansi ) ]
508
508
public struct luaL_Reg {
@@ -579,8 +579,8 @@ public struct luaL_Reg {
579
579
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
580
580
public static extern int luaL_checkoption ( IntPtr L , int narg , string def , string [ ] [ ] lst ) ;
581
581
582
- public static readonly int LUA_NOREF = - 2 ;
583
- public static readonly int LUA_REFNIL = - 1 ;
582
+ public const int LUA_NOREF = - 2 ;
583
+ public const int LUA_REFNIL = - 1 ;
584
584
585
585
[ DllImport ( DllName , CallingConvention = CallingConvention . StdCall ) ]
586
586
public static extern int luaL_ref ( IntPtr L , int t ) ;
0 commit comments