- move the extern "C" declaration of module_init into main.h so that it

will affect all modules.
- modified: main.h module1.cc
This commit is contained in:
Bryce Denney 2002-10-13 02:22:37 +00:00
parent 53ceefc3c7
commit 0699e46993
2 changed files with 4 additions and 5 deletions

View File

@ -19,3 +19,7 @@ typedef void (*modload_func)(void);
MAINAPI(extern const char *) version_string;
MAINAPI(extern int) register_module (const char *name);
extern "C" {
// this prevents C++ name mangling
void module_init ();
};

View File

@ -1,11 +1,6 @@
#include <stdio.h>
#include "main.h"
extern "C" {
// prevent C++ name mangling
void module_init();
};
void module_init ()
{
printf ("module1 init\n");