Fix code for loadlibrary on windows and fix code for certain platforms
This commit is contained in:
@ -132,7 +132,7 @@ void DumpFile(std::filesystem::path p)
|
||||
|
||||
for(size_t i = 1; i < closures.size(); i++)
|
||||
{
|
||||
if(funs.contains((uint32_t)i))
|
||||
if(funs.count((uint32_t)i) > 0)
|
||||
{
|
||||
std::cout << "Func: ";
|
||||
auto res = funs[(uint32_t)i];
|
||||
@ -183,4 +183,4 @@ int main(int argc, char** argv)
|
||||
{
|
||||
DumpFile(argv[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ int main(int argc, char** argv)
|
||||
|
||||
Tesses::Framework::Streams::MemoryStream strm2(true);
|
||||
|
||||
if(source.starts_with("loadfile "))
|
||||
if(source.find("loadfile ") == 0)
|
||||
{
|
||||
std::string filename = source.substr(9);
|
||||
|
||||
@ -121,4 +121,4 @@ int main(int argc, char** argv)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,7 +26,7 @@ namespace Tesses::CrossLang
|
||||
T Resolve(std::string name)
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
return (T)GetProcAddress(handle,name.c_str());
|
||||
return (T)GetProcAddress((HMODULE)handle,name.c_str());
|
||||
#else
|
||||
return (T)dlsym(handle,name.c_str());
|
||||
|
||||
@ -35,7 +35,7 @@ namespace Tesses::CrossLang
|
||||
~DL()
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
FreeLibrary(handle);
|
||||
FreeLibrary((HMODULE)handle);
|
||||
#else
|
||||
dlclose(handle);
|
||||
#endif
|
||||
@ -425,4 +425,4 @@ namespace Tesses::CrossLang
|
||||
gc->BarrierEnd();
|
||||
env->permissions.locked=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user