<commit_before>#include <GarrysMod/Lua/Interface.h>
#include <lua.hpp>

extern "C" int luaopen_ssl_core( lua_State *state );
extern "C" int luaopen_ssl_context( lua_State *state );
extern "C" int luaopen_ssl_x509( lua_State *state );

GMOD_MODULE_OPEN( )
{
	if( luaopen_ssl_core( state ) == 1 )
	{
		lua_replace( state, 1 );
		lua_settop( state, 1 );
		LUA->Push( -1 );
		LUA->SetField( GarrysMod::Lua::INDEX_GLOBAL, "ssl" );
	}

	if( luaopen_ssl_context( state ) == 1 )
	{
		lua_replace( state, 2 );
		lua_settop( state, 2 );
		LUA->SetField( -2, "context" );
	}

	if( luaopen_ssl_x509( state ) == 1 )
	{
		lua_replace( state, 2 );
		lua_settop( state, 2 );
		LUA->SetField( -2, "x509" );
	}

	return 0;
}

GMOD_MODULE_CLOSE( )
{
	LUA->PushNil( );
	LUA->SetField( GarrysMod::Lua::INDEX_GLOBAL, "ssl" );
	return 0;
}<commit_msg>Push table on initialization (for fixed require).<commit_after>#include <GarrysMod/Lua/Interface.h>
#include <lua.hpp>

extern "C" int luaopen_ssl_core( lua_State *state );
extern "C" int luaopen_ssl_context( lua_State *state );
extern "C" int luaopen_ssl_x509( lua_State *state );

GMOD_MODULE_OPEN( )
{
	if( luaopen_ssl_core( state ) == 1 )
	{
		lua_replace( state, 1 );
		lua_settop( state, 1 );
		LUA->Push( -1 );
		LUA->SetField( GarrysMod::Lua::INDEX_GLOBAL, "ssl" );
	}

	if( luaopen_ssl_context( state ) == 1 )
	{
		lua_replace( state, 2 );
		lua_settop( state, 2 );
		LUA->SetField( -2, "context" );
	}

	if( luaopen_ssl_x509( state ) == 1 )
	{
		lua_replace( state, 2 );
		lua_settop( state, 2 );
		LUA->SetField( -2, "x509" );
	}

	return 1;
}

GMOD_MODULE_CLOSE( )
{
	LUA->PushNil( );
	LUA->SetField( GarrysMod::Lua::INDEX_GLOBAL, "ssl" );
	return 0;
}
{'fraction_non_alphanumeric': 0.16962174940898345, 'fraction_numerical': 0.027186761229314422, 'mean_word_length': 4.161585365853658, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 19, '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': '4961908', 'n_tokens_mistral': 803, 'n_tokens_neox': 719, 'n_words': 152}