pike.git
/
src
/
module_support.h
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/module_support.h:1:
/*\ ||| This file is part of Pike. For copyright information see COPYRIGHT. ||| Pike is distributed under GPL, LGPL and MPL. See the file COPYING ||| for more information. \*/ /*
-
* $Id: module_support.h,v 1.
11
2002/
05
/
31
22
:
41
:
25
nilsson
Exp $
+
* $Id: module_support.h,v 1.
12
2002/
08
/
13
17
:
07
:
28
grubba
Exp $
*/ #ifndef MODULE_SUPPORT_H #include <stdarg.h> enum error_type { ERR_NONE, ERR_TOO_FEW, ERR_TOO_MANY, ERR_BAD_ARG }; struct expect_result { enum error_type error_type; int argno; /* Which argument was it */ unsigned INT32 expected; /* What type was expected */ TYPE_T got; /* What type did we actually receive */ }; /* This should be used in module_init */ #define PIKE_MODULE_EXPORT(MOD, SYM) \
-
pike_module_export_symbol(#MOD "." #SYM, CONSTANT_STRLEN(#MOD "." #SYM), SYM)
+
pike_module_export_symbol(#MOD "." #SYM, CONSTANT_STRLEN(#MOD "." #SYM),
(void *)
SYM)
#define PIKE_MODULE_IMPORT(MOD, SYM) \ pike_module_import_symbol(#MOD "." #SYM, CONSTANT_STRLEN(#MOD "." #SYM), #MOD, CONSTANT_STRLEN(#MOD)) /* Prototypes begin here */ PMOD_EXPORT int check_args(int args, ...); PMOD_EXPORT void check_all_args(const char *fnname, int args, ... ); int va_get_args(struct svalue *s, INT32 num_args,