flm01/mote/v1/openwrt/package/luaexpat/patches/010-luaL_findstring.patch

19 lines
481 B
Diff

diff -urNad trunk~/src/lxplib.c trunk/src/lxplib.c
--- trunk~/src/lxplib.c 2006-03-20 20:55:53.000000000 +0100
+++ trunk/src/lxplib.c 2006-08-22 14:00:43.000000000 +0200
@@ -18,7 +18,13 @@
#include "lxplib.h"
-
+static int luaL_findstring (const char *name, const char *const list[]) {
+ int i;
+ for (i=0; list[i]; i++)
+ if (strcmp(list[i], name) == 0)
+ return i;
+ return -1; /* name not found */
+}
enum XPState {
XPSpre, /* parser just initialized */