Rvised the API distribution system to avoid segmentation fault crashes on Linux and make the overal code cleaner.

Moved the constants in IRC module into their own source and implemented a faster method of registering them.
Various other minor changes and adjustments. Some of them in order to comply with the new API distribution system.
This commit is contained in:
Sandu Liviu Catalin
2016-07-17 03:24:07 +03:00
parent 5ddb222903
commit 66d1110733
32 changed files with 3049 additions and 2773 deletions
+20 -12
View File
@@ -33,18 +33,6 @@ extern PluginFuncs* _Func;
extern PluginCallbacks* _Clbk;
extern PluginInfo* _Info;
// ------------------------------------------------------------------------------------------------
#ifdef SQMOD_PLUGIN_API
/* --------------------------------------------------------------------------------------------
* Proxies to comunicate with the Squirrel plug-in.
*/
extern HSQAPI _SqAPI;
extern HSQEXPORTS _SqMod;
extern HSQUIRRELVM _SqVM;
#endif // SQMOD_PLUGIN_API
/* ------------------------------------------------------------------------------------------------
* Retrieve the temporary buffer.
*/
@@ -1542,6 +1530,26 @@ Int64 PopStackSLong(HSQUIRRELVM vm, SQInteger idx);
*/
Uint64 PopStackULong(HSQUIRRELVM vm, SQInteger idx);
// ------------------------------------------------------------------------------------------------
#ifdef SQMOD_PLUGIN_API
/* ------------------------------------------------------------------------------------------------
* Validate the module API to make sure we don't run into issues.
*/
bool CheckModuleAPIVer(CCStr ver, CCStr mod);
/* ------------------------------------------------------------------------------------------------
* Make sure that the module was loaded after the host plug-in.
*/
bool CheckModuleOrder(PluginFuncs * vcapi, Uint32 mod_id, CCStr mod);
/* ------------------------------------------------------------------------------------------------
* Used by the modules to import the API from the host plug-in.
*/
void ImportModuleAPI(PluginFuncs * vcapi, CCStr mod);
#endif // SQMOD_PLUGIN_API
} // Namespace:: SqMod
#endif // _BASE_UTILITY_HPP_