"findname" moved from lobject.c to lauxlib.c (so libraries may use it).

This commit is contained in:
Roberto Ierusalimschy
1998-06-18 13:57:03 -03:00
parent 112c9d53ab
commit c9902be294
6 changed files with 21 additions and 23 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: lauxlib.c,v 1.9 1998/03/06 16:54:42 roberto Exp roberto $
** $Id: lauxlib.c,v 1.10 1998/03/06 18:47:42 roberto Exp roberto $
** Auxiliar functions for building Lua libraries
** See Copyright Notice in lua.h
*/
@@ -7,6 +7,7 @@
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
/* Please Notice: This file uses only the oficial API of Lua
** Any function declared here could be written as an application
@@ -18,6 +19,14 @@
int luaL_findstring (char *name, char *list[]) {
int i;
for (i=0; list[i]; i++)
if (strcmp(list[i], name) == 0)
return i;
return -1; /* name not found */
}
void luaL_argerror (int numarg, char *extramsg)
{
char *funcname;