From e5c0d09893401b82855872d4f150a0acf56d76d4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Wed, 27 Apr 2022 19:13:32 -0400 Subject: Added printmatch --- Lua/Makefile | 2 +- Lua/lbp.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Lua/Makefile b/Lua/Makefile index 5be2cb4..fc1ba14 100644 --- a/Lua/Makefile +++ b/Lua/Makefile @@ -39,7 +39,7 @@ clean: lbp.o: lbp.c builtins.h $(CC) -c $(ALL_FLAGS) -o $@ $< -bp.so: lbp.o ../pattern.o ../utils.o ../utf8.o ../match.o +bp.so: lbp.o ../pattern.o ../utils.o ../utf8.o ../match.o ../printmatch.o $(MAKESO) -o $@ $^ builtins.h: ../grammars/builtins.bp diff --git a/Lua/lbp.c b/Lua/lbp.c index 341aa81..89cb12a 100644 --- a/Lua/lbp.c +++ b/Lua/lbp.c @@ -21,6 +21,7 @@ #include "../pattern.h" #include "../match.h" +#include "../printmatch.h" static const char *builtins_source = ( #include "builtins.h" @@ -245,9 +246,10 @@ static int Lpat_tostring(lua_State *L) static int Lpat_gc(lua_State *L) { - pat_t **at_pat = lua_touserdata(L, 1); - pat_t *pat = *at_pat; - if (pat) delete_pat(at_pat, true); + (void)L; + // pat_t **at_pat = lua_touserdata(L, 1); + // pat_t *pat = *at_pat; + // if (pat) delete_pat(at_pat, true); return 0; } -- cgit v1.2.3