1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

Fix issue with modules not registering their API.

This commit is contained in:
Sandu Liviu Catalin
2016-07-17 03:47:38 +03:00
parent 66d1110733
commit 9874bbe1dc
7 changed files with 31 additions and 30 deletions

View File

@ -21,7 +21,8 @@ static bool RegisterAPI()
return false;
}
RootTable().Bind(_SC("SampleType"), Class< SampleType >(DefaultVM::Get(), _SC("SampleType"))
RootTable(DefaultVM::Get()).Bind(_SC("SampleType"),
Class< SampleType >(DefaultVM::Get(), _SC("SampleType"))
.Ctor()
.Ctor< int >()
.Var(_SC("MyNum"), &SampleType::mMyNum)
@ -29,7 +30,7 @@ static bool RegisterAPI()
.Func(_SC("SampleMethod"), &SampleType::SampleMethod)
);
RootTable().Func(_SC("SampleFunction"), &SampleFunction);
RootTable(DefaultVM::Get()).Func(_SC("SampleFunction"), &SampleFunction);
// Registration was successful
return true;