Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pike
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pikelang
pike
Commits
c853daea
Commit
c853daea
authored
17 years ago
by
Martin Stjernholm
Browse files
Options
Downloads
Patches
Plain Diff
Added a common recognition constant is_cpp_or_compilation_error for
both cpp and compilation errors. Rev: src/errors.h:1.37
parent
ddcc6d5d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/errors.h
+17
-3
17 additions, 3 deletions
src/errors.h
with
17 additions
and
3 deletions
src/errors.h
+
17
−
3
View file @
c853daea
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
|| for more information.
|| $Id: errors.h,v 1.3
6
200
6
/0
9
/2
0 16:15:55
mast Exp $
|| $Id: errors.h,v 1.3
7
200
8
/0
5
/2
2 20:17:13
mast Exp $
*/
*/
#ifdef ERR_DECLARE
#ifdef ERR_DECLARE
...
@@ -24,6 +24,7 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
...
@@ -24,6 +24,7 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
};
};
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ;
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME) TYPE NAME ;
#define ERR_CONST(TYPE, NAME, VALUE)
/* Some compilers (eg cl) don't like empty structs... */
/* Some compilers (eg cl) don't like empty structs... */
#define EMPTY ERR_VAR(INT_TYPE, int, PIKE_T_INT, ignored__)
#define EMPTY ERR_VAR(INT_TYPE, int, PIKE_T_INT, ignored__)
...
@@ -48,6 +49,8 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
...
@@ -48,6 +49,8 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME2) \
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME2) \
MAP_VARIABLE(#NAME2, CTYPE, 0, \
MAP_VARIABLE(#NAME2, CTYPE, 0, \
current_offset + (((char *)&(foo.NAME2))-((char *)&foo)), RUNTYPE);
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. */
/* Reference foo just to avoid warning. */
#define EMPTY (void) &foo;
#define EMPTY (void) &foo;
...
@@ -83,6 +86,10 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
...
@@ -83,6 +86,10 @@ struct PIKE_CONCAT(NAME,_error_struct) { \
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME)
#define ERR_VAR(TYPE,CTYPE,RUNTYPE,NAME)
#endif
#endif
#ifndef ERR_CONST
#define ERR_CONST(TYPE, NAME, VALUE)
#endif
#ifndef ERR_FUNC
#ifndef ERR_FUNC
#define ERR_FUNC(NAME,FUNC,TYPE,FLAGS)
#define ERR_FUNC(NAME,FUNC,TYPE,FLAGS)
#endif
#endif
...
@@ -138,9 +145,15 @@ DECLARE_ERROR(permission, Permission,
...
@@ -138,9 +145,15 @@ DECLARE_ERROR(permission, Permission,
ERR_VAR
(
struct
pike_string
*
,
tStr
,
PIKE_T_STRING
,
permission_type
)
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
)
DECLARE_ERROR
(
master_load
,
MasterLoad
,
ERR_INHERIT
(
generic
),
EMPTY
)
...
@@ -153,6 +166,7 @@ DECLARE_ERROR (module_load, ModuleLoad,
...
@@ -153,6 +166,7 @@ DECLARE_ERROR (module_load, ModuleLoad,
#undef DECLARE_ERROR
#undef DECLARE_ERROR
#undef ERR_INHERIT
#undef ERR_INHERIT
#undef ERR_VAR
#undef ERR_VAR
#undef ERR_CONST
#undef EMPTY
#undef EMPTY
#undef ERR_FUNC
#undef ERR_FUNC
#undef ERR_FUNC_SAVE_ID
#undef ERR_FUNC_SAVE_ID
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment