diff options
-rw-r--r-- | include/dynamic.h | 12 | ||||
-rw-r--r-- | src/dynamic.cpp | 12 |
2 files changed, 12 insertions, 12 deletions
diff --git a/include/dynamic.h b/include/dynamic.h index 47963b828..276b21f13 100644 --- a/include/dynamic.h +++ b/include/dynamic.h @@ -25,17 +25,17 @@ typedef void * (initfunc) (void); class DLLManager { public: - DLLManager( const char *fname ); + DLLManager(char *fname); virtual ~DLLManager(); #ifdef STATIC_LINK - bool GetSymbol( initfunc* &v, const char *sym_name ); + bool GetSymbol( initfunc* &v, char *sym_name ); #else - bool GetSymbol( void **, const char *sym_name ); + bool GetSymbol( void **, char *sym_name ); #endif - const char *LastError() + char *LastError() { return err; } @@ -52,7 +52,7 @@ class DLLManager class DLLFactoryBase : public DLLManager { public: - DLLFactoryBase(const char *fname, const char *func_name = 0); + DLLFactoryBase(char *fname, char *func_name = 0); virtual ~DLLFactoryBase(); #ifdef STATIC_LINK initfunc *factory_func; @@ -65,7 +65,7 @@ class DLLFactoryBase : public DLLManager template <class T> class DLLFactory : public DLLFactoryBase { public: - DLLFactory(const char *fname, const char *func_name=0) : DLLFactoryBase(fname,func_name) + DLLFactory(char *fname, char *func_name=0) : DLLFactoryBase(fname,func_name) { if (factory_func) factory = (T*)factory_func(); diff --git a/src/dynamic.cpp b/src/dynamic.cpp index 2e787f341..c26df56b2 100644 --- a/src/dynamic.cpp +++ b/src/dynamic.cpp @@ -29,7 +29,7 @@ using namespace std; #include "inspstring.h" #include "helperfuncs.h" -DLLManager::DLLManager(const char *fname) +DLLManager::DLLManager(char *fname) { #ifdef STATIC_LINK this->staticname[0] = '\0'; @@ -50,7 +50,7 @@ DLLManager::DLLManager(const char *fname) // Try to open the library now and get any error message. h = dlopen( fname, RTLD_NOW ); - err = dlerror(); + err = (char*)dlerror(); #endif } @@ -67,7 +67,7 @@ DLLManager::~DLLManager() #ifdef STATIC_LINK -bool DLLManager::GetSymbol(initfunc* &v, const char *sym_name) +bool DLLManager::GetSymbol(initfunc* &v, char *sym_name) { log(DEBUG,"Symbol search..."); for (int j = 0; modsyms[j].name; j++) @@ -86,7 +86,7 @@ bool DLLManager::GetSymbol(initfunc* &v, const char *sym_name) #else -bool DLLManager::GetSymbol(void **v, const char *sym_name) +bool DLLManager::GetSymbol(void **v, char *sym_name) { // try extract a symbol from the library // get any error message is there is any @@ -94,7 +94,7 @@ bool DLLManager::GetSymbol(void **v, const char *sym_name) if(h != 0) { *v = dlsym( h, sym_name ); - err = dlerror(); + err = (char*)dlerror(); if( err == 0 ) return true; else @@ -108,7 +108,7 @@ bool DLLManager::GetSymbol(void **v, const char *sym_name) #endif -DLLFactoryBase::DLLFactoryBase(const char *fname, const char *factory) : DLLManager(fname) +DLLFactoryBase::DLLFactoryBase(char *fname, char *factory) : DLLManager(fname) { // try get the factory function if there is no error yet |