Skip to content
Snippets Groups Projects
Commit c9c1c5a1 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Moved enum and struct to header-file to avoid warnings.

Rev: src/module_support.c:1.8
Rev: src/module_support.h:1.5
parent 4acdaecc
No related branches found
No related tags found
No related merge requests found
...@@ -6,20 +6,6 @@ ...@@ -6,20 +6,6 @@
#include "pike_types.h" #include "pike_types.h"
#include "error.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. /* Checks that args_to_check arguments are OK.
* Returns 1 if everything worked ok, zero otherwise. * Returns 1 if everything worked ok, zero otherwise.
* If something went wrong, 'exepect_result' tells you what went wrong. * If something went wrong, 'exepect_result' tells you what went wrong.
......
...@@ -8,8 +8,20 @@ ...@@ -8,8 +8,20 @@
#include <stdarg.h> #include <stdarg.h>
/* Prototypes begin here */ /* Prototypes begin here */
enum error_type; enum error_type {
struct expect_result; 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, ...); int check_args(int args, ...);
void check_all_args(const char *fnname, int args, ... ); void check_all_args(const char *fnname, int args, ... );
int va_get_args(struct svalue *s, int va_get_args(struct svalue *s,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment