eris: get rid of hooks for luai_writestring.
This commit is contained in:
@@ -83,15 +83,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
void luai_writestring(const char *s, size_t len) {
|
||||
fwrite((s), sizeof(char), (len), stdout);
|
||||
}
|
||||
|
||||
void luai_writeline() {
|
||||
fwrite("\n", sizeof(char), 1, stdout);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static lua_State *globalL = NULL;
|
||||
|
||||
static const char *progname = LUA_PROGNAME;
|
||||
|
||||
@@ -210,8 +210,9 @@
|
||||
** avoids including 'stdio.h' everywhere.)
|
||||
*/
|
||||
#if defined(LUA_LIB) || defined(lua_c)
|
||||
extern void luai_writestring(const char *s, size_t len);
|
||||
extern void luai_writeline();
|
||||
#include <stdio.h>
|
||||
#define luai_writestring(s,l) fwrite((s), sizeof(char), (l), stdout)
|
||||
#define luai_writeline() (luai_writestring("\n", 1), fflush(stdout))
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -221,7 +222,6 @@ extern void luai_writeline();
|
||||
#define luai_writestringerror(s,p) \
|
||||
(fprintf(stderr, (s), (p)), fflush(stderr))
|
||||
|
||||
|
||||
/*
|
||||
@@ LUAI_MAXSHORTLEN is the maximum length for short strings, that is,
|
||||
** strings that are internalized. (Cannot be smaller than reserved words
|
||||
|
||||
@@ -5,15 +5,6 @@
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
void luai_writestring(const char *s, size_t len) {
|
||||
fwrite((s), sizeof(char), (len), stdout);
|
||||
}
|
||||
|
||||
void luai_writeline() {
|
||||
fwrite("\n", sizeof(char), 1, stdout);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static int LUAF_createludata(lua_State *L)
|
||||
{
|
||||
lua_pushlightuserdata(L, (void*)321);
|
||||
|
||||
@@ -5,15 +5,6 @@
|
||||
#include "lualib.h"
|
||||
#include "lauxlib.h"
|
||||
|
||||
void luai_writestring(const char *s, size_t len) {
|
||||
fwrite((s), sizeof(char), (len), stdout);
|
||||
}
|
||||
|
||||
void luai_writeline() {
|
||||
fwrite("\n", sizeof(char), 1, stdout);
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
static int LUAF_checkludata(lua_State *L)
|
||||
{
|
||||
lua_pushboolean(L, lua_touserdata(L, -1) == (void*)321);
|
||||
|
||||
Reference in New Issue
Block a user