aboutsummaryrefslogtreecommitdiff
path: root/lptypes.h
diff options
context:
space:
mode:
Diffstat (limited to 'lptypes.h')
-rw-r--r--lptypes.h34
1 files changed, 17 insertions, 17 deletions
diff --git a/lptypes.h b/lptypes.h
index 1f30bc4..560ddbb 100644
--- a/lptypes.h
+++ b/lptypes.h
@@ -1,7 +1,7 @@
1/* 1/*
2** $Id: lptypes.h,v 1.11 2015/03/04 16:38:00 roberto Exp $ 2** $Id: lptypes.h,v 1.14 2015/09/28 17:17:41 roberto Exp $
3** LPeg - PEG pattern matching for Lua 3** LPeg - PEG pattern matching for Lua
4** Copyright 2007-2014, Lua.org & PUC-Rio (see 'lpeg.html' for license) 4** Copyright 2007-2015, Lua.org & PUC-Rio (see 'lpeg.html' for license)
5** written by Roberto Ierusalimschy 5** written by Roberto Ierusalimschy
6*/ 6*/
7 7
@@ -19,7 +19,7 @@
19#include "lua.h" 19#include "lua.h"
20 20
21 21
22#define VERSION "0.12.2" 22#define VERSION "1.0.0"
23 23
24 24
25#define PATTERN_T "lpeg-pattern" 25#define PATTERN_T "lpeg-pattern"
@@ -27,31 +27,31 @@
27 27
28 28
29/* 29/*
30** compatibility with Lua 5.2 30** compatibility with Lua 5.1
31*/ 31*/
32#if (LUA_VERSION_NUM >= 502) 32#if (LUA_VERSION_NUM == 501)
33 33
34#undef lua_equal 34#define lp_equal lua_equal
35#define lua_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ)
36 35
37#undef lua_getfenv 36#define lua_getuservalue lua_getfenv
38#define lua_getfenv lua_getuservalue 37#define lua_setuservalue lua_setfenv
39#undef lua_setfenv
40#define lua_setfenv lua_setuservalue
41 38
42#undef lua_objlen 39#define lua_rawlen lua_objlen
43#define lua_objlen lua_rawlen
44 40
45#undef luaL_register 41#define luaL_setfuncs(L,f,n) luaL_register(L,NULL,f)
46#define luaL_register(L,n,f) \ 42#define luaL_newlib(L,f) luaL_register(L,"lpeg",f)
47 { if ((n) == NULL) luaL_setfuncs(L,f,0); else luaL_newlib(L,f); }
48 43
49#endif 44#endif
50 45
51 46
47#if !defined(lp_equal)
48#define lp_equal(L,idx1,idx2) lua_compare(L,(idx1),(idx2),LUA_OPEQ)
49#endif
50
51
52/* default maximum size for call/backtrack stack */ 52/* default maximum size for call/backtrack stack */
53#if !defined(MAXBACK) 53#if !defined(MAXBACK)
54#define MAXBACK 100 54#define MAXBACK 400
55#endif 55#endif
56 56
57 57