Example #1
0
CMLuaScript::CMLuaScript(lua_State *L, const TCHAR *path)
	: L(L), status(None)
{
	mir_tstrcpy(filePath, path);

	fileName = _tcsrchr(filePath, '\\') + 1;
	TCHAR *dot = _tcsrchr(fileName, '.');

	size_t length = mir_tstrlen(fileName) - mir_tstrlen(dot) + 1;

	ptrT name((TCHAR*)mir_calloc(sizeof(TCHAR) * (length + 1)));
	mir_tstrncpy(name, fileName, length);

	moduleName = mir_utf8encodeT(name);

	MUUID muidLast = MIID_LAST;
	id = GetPluginLangId(muidLast, 0);
}
Example #2
0
CMLua::CMLua() : L(NULL), Scripts(10, CompareScripts)
{
	MUUID muidLast = MIID_LAST;
	hLangpack = GetPluginLangId(muidLast, 0);
}
Example #3
0
MIR_CORE_DLL(void) mir_getLP(const PLUGININFOEX *pInfo, int *_hLang)
{
	if (_hLang && pInfo)
		*(int*)_hLang = GetPluginLangId(pInfo->uuid, Langpack_MarkPluginLoaded((PLUGININFOEX*)pInfo));
}