hdf5 load/unload updated to avoid symbol crushing 55/19255/4
Cedric Delamarre [Thu, 13 Apr 2017 17:14:17 +0000 (19:14 +0200)]
Change-Id: Ied68218facf0c9619782bb8f334e996acba0e697

scilab/modules/hdf5/includes/gw_hdf5.h
scilab/modules/hdf5/sci_gateway/cpp/hdf5_gw.cpp
scilab/modules/hdf5/src/c/DllmainHdf5.c

index f138920..33f5ec5 100644 (file)
@@ -18,8 +18,8 @@
 /*--------------------------------------------------------------------------*/
 #include "dynlib_hdf5_scilab.h"
 /*--------------------------------------------------------------------------*/
-HDF5_SCILAB_IMPEXP int Initialize(void);
-HDF5_SCILAB_IMPEXP int Finalize(void);
+HDF5_SCILAB_IMPEXP int Initialize_HDF5(void);
+HDF5_SCILAB_IMPEXP int Finalize_HDF5(void);
 /*--------------------------------------------------------------------------*/
 HDF5_SCILAB_IMPEXP int sci_hdf5_load_v1(char *fname, int* pvApiCtx);
 HDF5_SCILAB_IMPEXP int sci_hdf5_load_v2(char *fname, int* pvApiCtx);
index 44b84f2..d0649dd 100644 (file)
@@ -27,14 +27,14 @@ extern "C"
 #include "h5_fileManagement.h"
 }
 /*--------------------------------------------------------------------------*/
-int Initialize(void)
+int Initialize_HDF5(void)
 {
     org_modules_hdf5::H5VariableScope::initScope();
     org_modules_hdf5::H5Object::initRoot();
     return 0;
 }
 /*--------------------------------------------------------------------------*/
-int Finalize(void)
+int Finalize_HDF5(void)
 {
     org_modules_hdf5::H5Type::cleanMap();
     //org_modules_hdf5::H5VariableScope::clearScope();
@@ -44,5 +44,3 @@ int Finalize(void)
     return 0;
 }
 /*--------------------------------------------------------------------------*/
-
-
index d6e40bc..b543503 100644 (file)
@@ -34,12 +34,12 @@ int WINAPI DllMain(HINSTANCE hinstDLL, DWORD flag, LPVOID reserved)
     {
         case DLL_PROCESS_ATTACH :
         {
-            Initialize();
+            Initialize_HDF5();
             break;
         }
         case DLL_PROCESS_DETACH :
         {
-            Finalize();
+            Finalize_HDF5();
             break;
         }
         case DLL_THREAD_ATTACH :
@@ -58,18 +58,17 @@ int WINAPI DllMain(HINSTANCE hinstDLL, DWORD flag, LPVOID reserved)
     return 1;
 }
 #else
-void __attribute__ ((constructor)) load(void);
-void __attribute__ ((destructor)) unload(void);
+void __attribute__ ((constructor)) load_hdf5(void);
+void __attribute__ ((destructor)) unload_hdf5(void);
 
-void load(void)
+void load_hdf5(void)
 {
-    Initialize();
+    Initialize_HDF5();
 }
 
-void unload(void)
+void unload_hdf5(void)
 {
-    Finalize();
+    Finalize_HDF5();
 }
 #endif
 /*--------------------------------------------------------------------------*/
-