Fix warnings, add newline before function braces
This commit is contained in:
17
src/nhlua.c
17
src/nhlua.c
@@ -1445,7 +1445,8 @@ traceback_handler(lua_State *L)
|
|||||||
/* lua_pcall with our traceback handler and instruction step limiting.
|
/* lua_pcall with our traceback handler and instruction step limiting.
|
||||||
* On error, traceback will be on top of stack */
|
* On error, traceback will be on top of stack */
|
||||||
int
|
int
|
||||||
nhl_pcall(lua_State *L, int nargs, int nresults){
|
nhl_pcall(lua_State *L, int nargs, int nresults)
|
||||||
|
{
|
||||||
struct nhl_user_data *nud;
|
struct nhl_user_data *nud;
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
@@ -1784,7 +1785,8 @@ static const char *ct_base_unsafe[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nhl_clearfromtable(lua_State *L, int tndx, const char **todo){
|
nhl_clearfromtable(lua_State *L, int tndx, const char **todo)
|
||||||
|
{
|
||||||
while(*todo){
|
while(*todo){
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_setfield(L, tndx, *todo++);
|
lua_setfield(L, tndx, *todo++);
|
||||||
@@ -1829,7 +1831,8 @@ return values from "call it":
|
|||||||
*/
|
*/
|
||||||
#ifdef notyet
|
#ifdef notyet
|
||||||
static boolean
|
static boolean
|
||||||
start_luapat(){
|
start_luapat(void)
|
||||||
|
{
|
||||||
int rv;
|
int rv;
|
||||||
/* XXX set memory and step limits */
|
/* XXX set memory and step limits */
|
||||||
nhl_sandbox_info sbi = {NHL_SB_STRING, 0, 0, 0};
|
nhl_sandbox_info sbi = {NHL_SB_STRING, 0, 0, 0};
|
||||||
@@ -1849,7 +1852,8 @@ start_luapat(){
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
end_luapat(){
|
end_luapat(void)
|
||||||
|
{
|
||||||
if(luapat){
|
if(luapat){
|
||||||
lua_close(luapat);
|
lua_close(luapat);
|
||||||
luapat = NULL;
|
luapat = NULL;
|
||||||
@@ -1858,7 +1862,8 @@ end_luapat(){
|
|||||||
|
|
||||||
#ifdef notyet
|
#ifdef notyet
|
||||||
static int
|
static int
|
||||||
opencheckpat(lua_State *L, const char *ename, int param){
|
opencheckpat(lua_State *L, const char *ename, int param)
|
||||||
|
{
|
||||||
/* careful - we're using 2 different and unrelated Lua states */
|
/* careful - we're using 2 different and unrelated Lua states */
|
||||||
const char *string;
|
const char *string;
|
||||||
int rv;
|
int rv;
|
||||||
@@ -2165,7 +2170,7 @@ RESTORE_WARNING_CONDEXPR_IS_CONSTANT
|
|||||||
* it's worth the processing time), it can be overridden.
|
* it's worth the processing time), it can be overridden.
|
||||||
*/
|
*/
|
||||||
#ifndef NHL_ALLOC_ADJUST
|
#ifndef NHL_ALLOC_ADJUST
|
||||||
#define NHL_ALLOC_ADJUST(d) d = (d+15 & ~15)
|
#define NHL_ALLOC_ADJUST(d) d = ((d+15) & ~15)
|
||||||
#endif
|
#endif
|
||||||
static void *
|
static void *
|
||||||
nhl_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
|
nhl_alloc (void *ud, void *ptr, size_t osize, size_t nsize) {
|
||||||
|
|||||||
Reference in New Issue
Block a user