1.1 --- a/core/systems/ExtensionSys.h Sat Nov 17 02:54:44 2007 +0000
1.2 +++ b/core/systems/ExtensionSys.h Sat Nov 17 04:31:01 2007 +0000
1.3 @@ -55,6 +55,14 @@
1.4 const sp_nativeinfo_t *info;
1.5 };
1.6
1.7 +/* Replacement native */
1.8 +struct sm_repnative_t
1.9 +{
1.10 + CExtension *owner;
1.11 + sp_nativeinfo_t info;
1.12 + SPVM_NATIVE_FUNC original;
1.13 +};
1.14 +
1.15 class CExtension : public IExtension
1.16 {
1.17 friend class CExtensionManager;
1.18 @@ -98,6 +106,7 @@
1.19 List<IPlugin *> m_Plugins;
1.20 List<const sp_nativeinfo_t *> m_Natives;
1.21 List<WeakNative> m_WeakNatives;
1.22 + List<WeakNative> m_ReplacedNatives;
1.23 List<String> m_Libraries;
1.24 unsigned int unload_code;
1.25 bool m_bFullyLoaded;
1.26 @@ -168,6 +177,7 @@
1.27 void TryAutoload();
1.28 void AddLibrary(IExtension *pSource, const char *library);
1.29 bool LibraryExists(const char *library);
1.30 + void OverrideNatives(IExtension *myself, const sp_nativeinfo_t *natives);
1.31 public:
1.32 CExtension *GetExtensionFromIdent(IdentityToken_t *ptr);
1.33 void Shutdown();
1.34 @@ -175,6 +185,8 @@
1.35 CExtension *FindByOrder(unsigned int num);
1.36 private:
1.37 List<CExtension *> m_Libs;
1.38 + List<sm_repnative_t> m_RepNativeList;
1.39 + KTrie<sm_repnative_t> m_RepNatives;
1.40 KTrie<sm_extnative_t> m_ExtNatives;
1.41 };
1.42