Branch: Tag:

2008-05-22

2008-05-22 20:17:13 by Martin Stjernholm <mast@lysator.liu.se>

Added a common recognition constant is_cpp_or_compilation_error for
both cpp and compilation errors.

Rev: src/errors.h:1.37

2:   || 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: errors.h,v 1.36 2006/09/20 16:15:55 mast Exp $ + || $Id: errors.h,v 1.37 2008/05/22 20:17:13 mast Exp $   */      #ifdef ERR_DECLARE
24:   };      #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ; + #define ERR_CONST(TYPE, NAME, VALUE)      /* Some compilers (eg cl) don't like empty structs... */   #define EMPTY ERR_VAR(INT_TYPE, int, PIKE_T_INT, ignored__)
48:   #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME2) \    MAP_VARIABLE(#NAME2, CTYPE, 0, \    current_offset + (((char *)&(foo.NAME2))-((char *)&foo)), RUNTYPE); + #define ERR_CONST(TYPE, NAME, VALUE) \ +  PIKE_CONCAT3 (add_, TYPE, _constant) (NAME, VALUE, 0);      /* Reference foo just to avoid warning. */   #define EMPTY (void) &foo;
83:   #define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME)   #endif    + #ifndef ERR_CONST + #define ERR_CONST(TYPE, NAME, VALUE) + #endif +    #ifndef ERR_FUNC   #define ERR_FUNC(NAME,FUNC,TYPE,FLAGS)   #endif
138:    ERR_VAR(struct pike_string *, tStr, PIKE_T_STRING,permission_type)   )    - DECLARE_ERROR(cpp, Cpp, ERR_INHERIT(generic), EMPTY) + DECLARE_ERROR( +  cpp, Cpp, ERR_INHERIT(generic), +  ERR_CONST (integer, "is_cpp_or_compilation_error", 1) + )    - DECLARE_ERROR(compilation, Compilation, ERR_INHERIT(generic), EMPTY) + DECLARE_ERROR( +  compilation, Compilation, ERR_INHERIT(generic), +  ERR_CONST (integer, "is_cpp_or_compilation_error", 1) + )      DECLARE_ERROR(master_load, MasterLoad, ERR_INHERIT (generic), EMPTY)   
153:   #undef DECLARE_ERROR   #undef ERR_INHERIT   #undef ERR_VAR + #undef ERR_CONST   #undef EMPTY   #undef ERR_FUNC   #undef ERR_FUNC_SAVE_ID