Skip to content
This repository has been archived by the owner on Nov 20, 2020. It is now read-only.

Solaris Fixes #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion HISTORY
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
HISTORY for LPeg 0.12
HISTORY for LPeg 1.0

* Changes from version 0.12 to 1.0
---------------------------------
+ group "names" can be any Lua value
+ some bugs fixed
+ other small improvements

* Changes from version 0.11 to 0.12
---------------------------------
Expand Down
6 changes: 3 additions & 3 deletions lpcap.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lpcap.c,v 1.4 2013/03/21 20:25:12 roberto Exp $
** $Id: lpcap.c,v 1.6 2015/06/15 16:09:57 roberto Exp $
** Copyright 2007, Lua.org & PUC-Rio (see 'lpeg.html' for license)
*/

Expand Down Expand Up @@ -126,7 +126,7 @@ static Capture *findback (CapState *cs, Capture *cap) {
continue; /* opening an enclosing capture: skip and get previous */
if (captype(cap) == Cgroup) {
getfromktable(cs, cap->idx); /* get group name */
if (lua_equal(L, -2, -1)) { /* right group? */
if (lp_equal(L, -2, -1)) { /* right group? */
lua_pop(L, 2); /* remove reference name and group name */
return cap;
}
Expand Down Expand Up @@ -462,7 +462,7 @@ static int pushcapture (CapState *cs) {
case Carg: {
int arg = (cs->cap++)->idx;
if (arg + FIXEDARGS > cs->ptop)
return luaL_error(L, "reference to absent argument #%d", arg);
return luaL_error(L, "reference to absent extra argument #%d", arg);
lua_pushvalue(L, arg + FIXEDARGS);
return 1;
}
Expand Down
4 changes: 2 additions & 2 deletions lpcap.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
** $Id: lpcap.h,v 1.1 2013/03/21 20:25:12 roberto Exp $
** $Id: lpcap.h,v 1.2 2015/02/27 17:13:17 roberto Exp $
*/

#if !defined(lpcap_h)
Expand All @@ -18,7 +18,7 @@ typedef enum CapKind {

typedef struct Capture {
const char *s; /* subject position */
short idx; /* extra info about capture (group name, arg index, etc.) */
unsigned short idx; /* extra info (group name, arg index, etc.) */
byte kind; /* kind of capture */
byte siz; /* size of full capture + 1 (0 = not a full capture) */
} Capture;
Expand Down
Loading