diff --git a/src/module_support.c b/src/module_support.c index 3adddd7c478dc4cf4d02b498f33f411f5d7a3902..d840b49340e36756c938a714c858ca5515fadd0e 100644 --- a/src/module_support.c +++ b/src/module_support.c @@ -6,20 +6,6 @@ #include "pike_types.h" #include "error.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 */ -}; - /* Checks that args_to_check arguments are OK. * Returns 1 if everything worked ok, zero otherwise. * If something went wrong, 'exepect_result' tells you what went wrong. diff --git a/src/module_support.h b/src/module_support.h index f2dd99c4a62563c027911c4c0e3462bcda68bbed..d41535ae75550dbb1fcdf02e8aa58289f8d0c563 100644 --- a/src/module_support.h +++ b/src/module_support.h @@ -8,8 +8,20 @@ #include <stdarg.h> /* Prototypes begin here */ -enum error_type; -struct expect_result; +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 */ +}; + int check_args(int args, ...); void check_all_args(const char *fnname, int args, ... ); int va_get_args(struct svalue *s,