summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/exportFunction.c1
-rw-r--r--src/base/exportFunction.h1
-rwxr-xr-xsrc/base/modules.c4
-rw-r--r--src/base/modules.h8
4 files changed, 10 insertions, 4 deletions
diff --git a/src/base/exportFunction.c b/src/base/exportFunction.c
index 955c0e1..550e4ec 100644
--- a/src/base/exportFunction.c
+++ b/src/base/exportFunction.c
@@ -37,7 +37,6 @@ void initExortFunction()
{
listExportFce = newList();
}
-
void addToExportFce(char *name, void *function)
{
printf("add to export function %s\n", name);
diff --git a/src/base/exportFunction.h b/src/base/exportFunction.h
index 5f3f1d0..8e01fc9 100644
--- a/src/base/exportFunction.h
+++ b/src/base/exportFunction.h
@@ -5,6 +5,7 @@
extern void initExortFunction();
extern void addToExportFce(char *name, void *function);
+
extern void* getExportFce(char *name);
extern void quitExportFunction();
diff --git a/src/base/modules.c b/src/base/modules.c
index e84cd30..13b0ff2 100755
--- a/src/base/modules.c
+++ b/src/base/modules.c
@@ -88,9 +88,8 @@ static void* getFce(module_t *p, char *s)
static void* mapImage(char *name)
{
- void *image;
-
#ifndef __WIN32__
+ void *image;
image = dlopen (name, RTLD_LAZY);
if( image == NULL )
@@ -118,7 +117,6 @@ static void* mapImage(char *name)
);
fputs(msg, stderr);
free(msg);
- free(ret);
FreeLibrary(image);
return NULL;
}
diff --git a/src/base/modules.h b/src/base/modules.h
index 8036a6a..5ad0287 100644
--- a/src/base/modules.h
+++ b/src/base/modules.h
@@ -31,7 +31,11 @@ typedef struct export_fce_s
int (*fce_getNetTypeGame)();
int (*fce_loadDepModule)(void *name);
+#ifndef __WIN32__
void (*fce_addToExportFce)(char *name, void *function);
+#else
+ void (*fce_addToExportFce)(char *name, HINSTANCE *function);
+#endif
void* (*fce_getExportFce)(char *name);
void (*fce_getTuxProportion)(tux_t *tux, int *x,int *y, int *w, int *h);
@@ -56,7 +60,11 @@ typedef struct export_fce_s
typedef struct module_s
{
char *name;
+#ifndef __WIN32__
void *image;
+#else
+ HINSTANCE *image;
+#endif
int (*fce_init)(export_fce_t *p);
#ifndef PUBLIC_SERVER