aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Bart <edub4rt@gmail.com>2020-08-23 20:09:40 -0300
committerEduardo Bart <edub4rt@gmail.com>2020-08-23 21:13:18 -0300
commit988b733849c4050cbe7dea110d86c7c8eec6bf77 (patch)
treec88ea1e755e198cd5360a7a089e9a4327a73faac
parent9d02c572fc0c45d76d73263e51b004be51f359fa (diff)
downloadlpeglabel-988b733849c4050cbe7dea110d86c7c8eec6bf77.tar.gz
lpeglabel-988b733849c4050cbe7dea110d86c7c8eec6bf77.tar.bz2
lpeglabel-988b733849c4050cbe7dea110d86c7c8eec6bf77.zip
Fix name clashing issues with LPEG
-rw-r--r--lpcap.h6
-rw-r--r--lpcode.h16
-rw-r--r--lpprint.h12
-rw-r--r--lptree.h2
-rw-r--r--lptypes.h6
-rw-r--r--lpvm.h4
6 files changed, 23 insertions, 23 deletions
diff --git a/lpcap.h b/lpcap.h
index dc10d69..f3d1836 100644
--- a/lpcap.h
+++ b/lpcap.h
@@ -48,9 +48,9 @@ typedef struct CapState {
48} CapState; 48} CapState;
49 49
50 50
51int runtimecap (CapState *cs, Capture *close, const char *s, int *rem); 51LUAI_FUNC int runtimecap (CapState *cs, Capture *close, const char *s, int *rem);
52int getcaptures (lua_State *L, const char *s, const char *r, int ptop); 52LUAI_FUNC int getcaptures (lua_State *L, const char *s, const char *r, int ptop);
53int finddyncap (Capture *cap, Capture *last); 53LUAI_FUNC int finddyncap (Capture *cap, Capture *last);
54 54
55#endif 55#endif
56 56
diff --git a/lpcode.h b/lpcode.h
index 34ee276..bdd3ec1 100644
--- a/lpcode.h
+++ b/lpcode.h
@@ -11,14 +11,14 @@
11#include "lptree.h" 11#include "lptree.h"
12#include "lpvm.h" 12#include "lpvm.h"
13 13
14int tocharset (TTree *tree, Charset *cs); 14LUAI_FUNC int tocharset (TTree *tree, Charset *cs);
15int checkaux (TTree *tree, int pred); 15LUAI_FUNC int checkaux (TTree *tree, int pred);
16int fixedlen (TTree *tree); 16LUAI_FUNC int fixedlen (TTree *tree);
17int hascaptures (TTree *tree); 17LUAI_FUNC int hascaptures (TTree *tree);
18int lp_gc (lua_State *L); 18LUAI_FUNC int lp_gc (lua_State *L);
19Instruction *compile (lua_State *L, Pattern *p); 19LUAI_FUNC Instruction *compile (lua_State *L, Pattern *p);
20void realloccode (lua_State *L, Pattern *p, int nsize); 20LUAI_FUNC void realloccode (lua_State *L, Pattern *p, int nsize);
21int sizei (const Instruction *i); 21LUAI_FUNC int sizei (const Instruction *i);
22 22
23 23
24#define PEnullable 0 24#define PEnullable 0
diff --git a/lpprint.h b/lpprint.h
index 15ef121..c4d57a0 100644
--- a/lpprint.h
+++ b/lpprint.h
@@ -13,12 +13,12 @@
13 13
14#if defined(LPEG_DEBUG) 14#if defined(LPEG_DEBUG)
15 15
16void printpatt (Instruction *p, int n); 16LUAI_FUNC void printpatt (Instruction *p, int n);
17void printtree (TTree *tree, int ident); 17LUAI_FUNC void printtree (TTree *tree, int ident);
18void printktable (lua_State *L, int idx); 18LUAI_FUNC void printktable (lua_State *L, int idx);
19void printcharset (const byte *st); 19LUAI_FUNC void printcharset (const byte *st);
20void printcaplist (Capture *cap, Capture *limit); 20LUAI_FUNC void printcaplist (Capture *cap, Capture *limit);
21void printinst (const Instruction *op, const Instruction *p); 21LUAI_FUNC void printinst (const Instruction *op, const Instruction *p);
22 22
23#else 23#else
24 24
diff --git a/lptree.h b/lptree.h
index 05e0680..c0ae5dc 100644
--- a/lptree.h
+++ b/lptree.h
@@ -73,7 +73,7 @@ typedef struct Pattern {
73 73
74 74
75/* number of children for each tree */ 75/* number of children for each tree */
76extern const byte numsiblings[]; 76LUAI_FUNC const byte numsiblings[];
77 77
78/* access to children */ 78/* access to children */
79#define sib1(t) ((t) + 1) 79#define sib1(t) ((t) + 1)
diff --git a/lptypes.h b/lptypes.h
index bf9aed1..6a6e159 100644
--- a/lptypes.h
+++ b/lptypes.h
@@ -18,8 +18,8 @@
18#define VERSION "1.6.0" 18#define VERSION "1.6.0"
19 19
20 20
21#define PATTERN_T "lpeg-pattern" 21#define PATTERN_T "lpeglabel-pattern"
22#define MAXSTACKIDX "lpeg-maxstack" 22#define MAXSTACKIDX "lpeglabel-maxstack"
23 23
24 24
25/* 25/*
@@ -35,7 +35,7 @@
35#define lua_rawlen lua_objlen 35#define lua_rawlen lua_objlen
36 36
37#define luaL_setfuncs(L,f,n) luaL_register(L,NULL,f) 37#define luaL_setfuncs(L,f,n) luaL_register(L,NULL,f)
38#define luaL_newlib(L,f) luaL_register(L,"lpeg",f) 38#define luaL_newlib(L,f) luaL_register(L,"lpeglabel",f)
39 39
40typedef size_t lua_Unsigned; 40typedef size_t lua_Unsigned;
41 41
diff --git a/lpvm.h b/lpvm.h
index 19f4108..a056701 100644
--- a/lpvm.h
+++ b/lpvm.h
@@ -58,8 +58,8 @@ typedef union Instruction {
58#define utf_to(inst) (((inst)->i.key << 8) | (inst)->i.aux) 58#define utf_to(inst) (((inst)->i.key << 8) | (inst)->i.aux)
59 59
60 60
61void printpatt (Instruction *p, int n); 61LUAI_FUNC void printpatt (Instruction *p, int n);
62const char *match (lua_State *L, const char *o, const char *s, const char *e, 62LUAI_FUNC const char *match (lua_State *L, const char *o, const char *s, const char *e,
63 Instruction *op, Capture *capture, int ptop, short *labelf, const char **sfail); /* labeled failure */ 63 Instruction *op, Capture *capture, int ptop, short *labelf, const char **sfail); /* labeled failure */
64 64
65#endif 65#endif