diff -r 304b5a6f85e4 -r 95f4883da11f src/lxplib.c --- a/src/lxplib.c Wed Jun 01 22:16:24 2011 +0100 +++ b/src/lxplib.c Thu Jun 02 15:10:38 2011 +0100 @@ -511,6 +511,11 @@ return 0; } +static int lxp_stop (lua_State *L) { + lxp_userdata *xpu = checkparser(L, 1); + lua_pushboolean(L, XML_StopParser(xpu->parser, XML_FALSE) == XML_STATUS_OK); + return 1; +} static const struct luaL_reg lxp_meths[] = { {"parse", lxp_parse}, @@ -521,6 +526,7 @@ {"getcallbacks", getcallbacks}, {"getbase", getbase}, {"setbase", setbase}, + {"stop", lxp_stop}, {NULL, NULL} };