New calling conventions, start on print.cpp
This commit is contained in:
32
luprex/core/cpp/print.cpp
Normal file
32
luprex/core/cpp/print.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include "print.hpp"
|
||||
#include "util.hpp"
|
||||
#include <ostream>
|
||||
#include <iostream>
|
||||
|
||||
void luai_writestring(const char *s, size_t len) {
|
||||
std::cout.write(s, len);
|
||||
}
|
||||
|
||||
void luai_writeline() {
|
||||
std::cout << std::endl;
|
||||
std::cout.flush();
|
||||
}
|
||||
|
||||
LuaDefine(string_isidentifier, "c") {
|
||||
LuaArg str;
|
||||
LuaRet result;
|
||||
LuaStack LS(L, str, result);
|
||||
if (LS.isstring(str)) {
|
||||
std::string s = LS.ckstring(str);
|
||||
LS.set(result, util::is_identifier(s));
|
||||
} else {
|
||||
LS.set(result, false);
|
||||
}
|
||||
return LS.result();
|
||||
}
|
||||
|
||||
|
||||
void pprint(LuaStack &LS0, LuaSlot val, int indent, int maxlen, std::ostream *os) {
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user