Skip to content

Commit

Permalink
清理代码
Browse files Browse the repository at this point in the history
  • Loading branch information
actboy168 committed Jul 11, 2024
1 parent c839864 commit ed4ca21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 4 additions & 1 deletion 3rd/lua/bee_assert.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#include "bee_assert.h"

#include "lauxlib.h"

void _bee_lua_assert(const char* message, const char* file, unsigned line) {
fprintf(stderr, "(%s:%d) %s\n", file, line, message);
fflush(stderr);
abort();
}

void _bee_lua_apicheck(lua_State* L, const char* message, const char* file, unsigned line) {
void _bee_lua_apicheck(void* l, const char* message, const char* file, unsigned line) {
lua_State* L = l;
fprintf(stderr, "(%s:%d) %s\n", file, line, message);
fflush(stderr);
if (!lua_checkstack(L, LUA_MINSTACK)) {
Expand Down
6 changes: 2 additions & 4 deletions 3rd/lua/bee_assert.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#pragma once

#include "lauxlib.h"

void _bee_lua_assert(const char* message, const char* file, unsigned line);
void _bee_lua_apicheck(lua_State* L, const char* message, const char* file, unsigned line);
void _bee_lua_assert(const char*, const char*, unsigned);
void _bee_lua_apicheck(void*, const char*, const char*, unsigned);

0 comments on commit ed4ca21

Please sign in to comment.