<commit_before>#ifndef LEXTLIB_H
#define LEXTLIB_H

#include <lua.h>

#include "lextlib_global.h"

#if LUA_VERSION_NUM < 502
#	define LUA_OK 0
#	define LUA_ERRGCMM 5
#	define LUA_OPEQ 0
#	define LUA_OPLT 1
#	define LUA_OPLE 2
/* lua_rawlen: Not entirely correct, but should work anyway */
#	define lua_rawlen lua_objlen
/* lua_...uservalue: Something very different, but it should get the job done */
#	define lua_getuservalue lua_getfenv
#	define lua_setuservalue lua_setfenv
#	define lua_tonumberx(L,i,b) (lua_isnumber(L,(i)) ? (*(b)=1, lua_tonumber(L,(i))) : (*(b)=0, 0))
#	define lua_tointegerx(L,i,b) (lua_isnumber(L,(i)) ? (*(b)=1, lua_tointeger(L,(i))) : (*(b)=0, 0))
#	define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
#	define luaL_setfuncs(L,l,n) (assert(n==0), luaL_register(L,NULL,l))
#	define luaL_setmetatable(L,t) ( \
	luaL_getmetatable(L,t), \
	!lua_isnil(L,-1) ? 0 : ( \
		lua_newtable(L), \
		lua_pushvalue(L,-1), \
		lua_setfield(L,LUA_REGISTRYINDEX,t), \
		1 \
	) \
)
#	define luaL_testudata(L,i,t) ( \<commit_msg>ERRGCMM is not present in Lua 5.1 and the Lua 5.2 value (6) collides with another Lua 5.1 value<commit_after>#ifndef LEXTLIB_H
#define LEXTLIB_H

#include <lua.h>

#include "lextlib_global.h"

#if LUA_VERSION_NUM < 502
#	define LUA_OK 0
#	define LUA_ERRGCMM (-1)
#	define LUA_OPEQ 0
#	define LUA_OPLT 1
#	define LUA_OPLE 2
/* lua_rawlen: Not entirely correct, but should work anyway */
#	define lua_rawlen lua_objlen
/* lua_...uservalue: Something very different, but it should get the job done */
#	define lua_getuservalue lua_getfenv
#	define lua_setuservalue lua_setfenv
#	define lua_tonumberx(L,i,b) (lua_isnumber(L,(i)) ? (*(b)=1, lua_tonumber(L,(i))) : (*(b)=0, 0))
#	define lua_tointegerx(L,i,b) (lua_isnumber(L,(i)) ? (*(b)=1, lua_tointeger(L,(i))) : (*(b)=0, 0))
#	define luaL_newlib(L,l) (lua_newtable(L), luaL_register(L,NULL,l))
#	define luaL_setfuncs(L,l,n) (assert(n==0), luaL_register(L,NULL,l))
#	define luaL_setmetatable(L,t) ( \
	luaL_getmetatable(L,t), \
	!lua_isnil(L,-1) ? 0 : ( \
		lua_newtable(L), \
		lua_pushvalue(L,-1), \
		lua_setfield(L,LUA_REGISTRYINDEX,t), \
		1 \
	) \
)
#	define luaL_testudata(L,i,t) ( \
{'fraction_non_alphanumeric': 0.16826703246456332, 'fraction_numerical': 0.0205761316872428, 'mean_word_length': 5.416422287390029, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4243022', 'n_tokens_mistral': 1079, 'n_tokens_neox': 1014, 'n_words': 192}