mirror of https://github.com/rusefi/lua.git
"dofile" does not issue a warning when unable to open the file,
but only returns an error code.
This commit is contained in:
parent
3681d025ac
commit
445872a6e2
8
opcode.c
8
opcode.c
|
@ -3,7 +3,7 @@
|
||||||
** TecCGraf - PUC-Rio
|
** TecCGraf - PUC-Rio
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *rcs_opcode="$Id: opcode.c,v 3.50 1995/11/16 20:46:24 roberto Exp $";
|
char *rcs_opcode="$Id: opcode.c,v 3.52 1996/01/09 20:22:44 roberto Exp roberto $";
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -520,12 +520,8 @@ int lua_call (char *funcname)
|
||||||
int lua_dofile (char *filename)
|
int lua_dofile (char *filename)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
char *message = lua_openfile (filename);
|
if (lua_openfile(filename))
|
||||||
if (message)
|
|
||||||
{
|
|
||||||
lua_message(message);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
|
||||||
status = do_protectedmain();
|
status = do_protectedmain();
|
||||||
lua_closefile();
|
lua_closefile();
|
||||||
return status;
|
return status;
|
||||||
|
|
Loading…
Reference in New Issue