mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
make love lua 5.4 conform
This commit is contained in:
@@ -73,7 +73,9 @@
|
||||
typedef size_t lua_Unsigned;
|
||||
#endif
|
||||
|
||||
#if LUA_VERSION_NUM == 501
|
||||
#if LUA_VERSION_NUM >= 504
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.b
|
||||
#elif LUA_VERSION_NUM == 501
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.buffer
|
||||
#else
|
||||
# define LUAL_BUFFER53_BUFFER(B) (B)->b.initb
|
||||
|
||||
@@ -309,8 +309,12 @@ int luaopen_luautf8 (lua_State *L) {
|
||||
lua_setfield(L, -2, l->name);
|
||||
}
|
||||
}
|
||||
#if LUA_VERSION_NUM >= 504
|
||||
lua_pushlstring(L, UTF8PATT, sizeof(UTF8PATT) / sizeof(char) - 1);
|
||||
lua_setfield(L, -2, "charpattern");
|
||||
#else
|
||||
lua_pushliteral(L, UTF8PATT);
|
||||
lua_setfield(L, -2, "charpattern");
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user