mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
compat52 for luajit2
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#include "luacompat52.h"
|
||||
#include <lua.h>
|
||||
#include <lauxlib.h>
|
||||
#include <stdint.h>
|
||||
@@ -198,7 +199,7 @@ tostring(lua_State *L) {
|
||||
uintptr_t n = (uintptr_t)lua_touserdata(L,1);
|
||||
if (lua_gettop(L) == 1) {
|
||||
luaL_Buffer b;
|
||||
luaL_buffinitsize(L , &b , 28);
|
||||
luaL_buffinit(L , &b);
|
||||
luaL_addstring(&b, "int64: 0x");
|
||||
int i;
|
||||
bool strip = true;
|
||||
@@ -230,7 +231,7 @@ tostring(lua_State *L) {
|
||||
case 10: {
|
||||
int64_t dec = (int64_t)n;
|
||||
luaL_Buffer b;
|
||||
luaL_buffinitsize(L , &b , 28);
|
||||
luaL_buffinit(L , &b);
|
||||
if (dec<0) {
|
||||
luaL_addchar(&b, '-');
|
||||
dec = -dec;
|
||||
|
||||
Reference in New Issue
Block a user