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) \   PMOD_EXPORT struct program *PIKE_CONCAT(NAME,_error_program); \   ptrdiff_t 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) \   PMOD_EXPORT extern struct program *PIKE_CONCAT(NAME,_error_program); \   extern ptrdiff_t PIKE_CONCAT(NAME,_error_offset); \   struct PIKE_CONCAT(NAME,_error_struct) { \    DECL \   };      #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ;      /* Some compilers (eg cl) don't like empty structs... */ - #undef EMPTY +    #define EMPTY ERR_VAR(INT_TYPE, int, PIKE_T_INT, ignored__)      #endif /* ERR_EXT_DECLARE */      #ifdef ERR_SETUP   #define DECLARE_ERROR(NAME, INHERIT, DECL) do{ \    ptrdiff_t current_offset=0; \    struct PIKE_CONCAT(NAME,_error_struct) foo; \    start_new_program(); \    INHERIT \
pike.git/src/errors.h:36:    add_integer_constant("is_" #NAME "_error",1,0); \    DECL \    PIKE_CONCAT(NAME,_error_program)=end_program(); \    add_program_constant( #NAME "_error",PIKE_CONCAT(NAME,_error_program),0); \   }while(0);      #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME2) \    map_variable("__" #NAME2, #CTYPE, 0, \    current_offset + (((char *)&(foo.NAME2))-((char *)&foo)), RUNTYPE);    + #define EMPTY +    #define ERR_INHERIT(NAME) \    low_inherit(PIKE_CONCAT(NAME,_error_program),0,0,0,0,0);      #define ERR_FUNC(NAME,FUNC,TYPE,FLAGS) \    ADD_FUNCTION(NAME,FUNC,TYPE,FLAGS);      #endif      #ifdef ERR_CLEANUP   #define DECLARE_ERROR(NAME, INHERIT, DECL) \
pike.git/src/errors.h:113:    ERR_VAR(struct pike_string *,string,PIKE_T_STRING,permission_type)   )      DECLARE_ERROR(cpp, ERR_INHERIT(generic), EMPTY)      DECLARE_ERROR(compilation, ERR_INHERIT(generic), EMPTY)      #undef DECLARE_ERROR   #undef ERR_INHERIT   #undef ERR_VAR + #undef EMPTY   #undef ERR_FUNC      #undef ERR_DECLARE   #undef ERR_EXT_DECLARE   #undef ERR_SETUP   #undef ERR_CLEANUP