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
c9c1c5a1
Commit
c9c1c5a1
authored
27 years ago
by
Henrik (Grubba) Grubbström
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/module_support.c
+0
-14
0 additions, 14 deletions
src/module_support.c
src/module_support.h
+14
-2
14 additions, 2 deletions
src/module_support.h
with
14 additions
and
16 deletions
src/module_support.c
+
0
−
14
View file @
c9c1c5a1
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
src/module_support.h
+
14
−
2
View file @
c9c1c5a1
...
@@ -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
,
...
...
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