pike.git / src / errors.h

version» Context lines:

pike.git/src/errors.h:1:   #define EMPTY      #ifdef ERR_DECLARE   #define DECLARE_ERROR(NAME, INHERIT, DECL) \ - static struct program *PIKE_CONCAT(NAME,_error_program); \ - static int PIKE_CONCAT(NAME,_error_offset); \ + struct program *PIKE_CONCAT(NAME,_error_program); \ + int PIKE_CONCAT(NAME,_error_offset); +  + #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ; + #endif +  + #ifdef ERR_EXT_DECLARE + #define DECLARE_ERROR(NAME, INHERIT, DECL) \ + extern struct program *PIKE_CONCAT(NAME,_error_program); \ + extern int PIKE_CONCAT(NAME,_error_offset); \   struct PIKE_CONCAT(NAME,_error_struct) { \    DECL \   };      #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ; - #endif + #endif /* ERR_EXT_DECLARE */    -  +    #ifdef ERR_SETUP   #define DECLARE_ERROR(NAME, INHERIT, DECL) do{ \    int current_offset=0; \    struct PIKE_CONCAT(NAME,_error_struct) foo; \    start_new_program(); \    INHERIT \    current_offset = PIKE_CONCAT(NAME,_error_offset)=ADD_STORAGE(struct PIKE_CONCAT(NAME,_error_struct));\    add_string_constant("error_type",#NAME "_error",0); \    add_integer_constant("is_" #NAME "_error",1,0); \    DECL \
pike.git/src/errors.h:97:   DECLARE_ERROR(permission,    ERR_INHERIT(generic),    ERR_VAR(struct pike_string *,string,PIKE_T_STRING,permission_type)   )   #undef DECLARE_ERROR   #undef ERR_INHERIT   #undef ERR_VAR   #undef ERR_FUNC      #undef ERR_DECLARE + #undef ERR_EXT_DECLARE   #undef ERR_SETUP   #undef ERR_CLEANUP