src/modules/native/tcc/wrap_Native.cpp
static int searcher(lua_State * L)
	{
		const char * src = lua_tostring(L, 1);

		int length = strlen(src);

		// luaopen_ needs 8 chars.
		char * dst = new char[length+8+1];
		memcpy(dst, "luaopen_", 8); 

		for(int i = 0; i<=length; i++)
			dst[i+8] = (src[i] == '.') ? '_' : src[i];

		void * sym = instance->getSymbol(dst);

		if(sym == 0)
			lua_pushfstring(L, "\tno symbol \"%s\" in love.native.\n", dst);
		else
			lua_pushcfunction(L, (lua_CFunction)sym);

		delete [] dst;

		return 1;
	}
/**
	* Searcher function for modules compiled with love.native.
	**/
Searcher function for modules compiled with love.native.
Searcher function for modules compiled with love . native .
static int searcher(lua_State * L)
	{
		const char * src = lua_tostring(L, 1);
		int length = strlen(src);
		char * dst = new char[length+8+1];
		memcpy(dst, "luaopen_", 8); 
		for(int i = 0; i<=length; i++)
			dst[i+8] = (src[i] == '.') ? '_' : src[i];
		void * sym = instance->getSymbol(dst);
		if(sym == 0)
			lua_pushfstring(L, "\tno symbol \"%s\" in love.native.\n", dst);
		else
			lua_pushcfunction(L, (lua_CFunction)sym);
		delete [] dst;
		return 1;
	}
static int searcher ( lua_State * L ) { const char * src = lua_tostring ( L , 1 ) ; int length = strlen ( src ) ; char * dst = new char [ length + 8 + 1 ] ; memcpy ( dst , " " , 8 ) ; for ( int i = 0 ; i <= length ; i ++ ) dst [ i + 8 ] = ( src [ i ] == ' ' ) ? ' ' : src [ i ] ; void * sym = instance -> getSymbol ( dst ) ; if ( sym == 0 ) lua_pushfstring ( L , " \t \" \" \n " , dst ) ; else lua_pushcfunction ( L , ( lua_CFunction ) sym ) ; delete [ ] dst ; return 1 ; }
Searcher function for modules compiled with love.native.
Searcher function for modules compiled with love . native .
// luaopen_ needs 8 chars.
