-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathmfuncobj.h
56 lines (47 loc) · 1.53 KB
/
mfuncobj.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
$Id: mfuncobj.h 2696 2021-09-12 20:35:03Z soci $
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef MFUNCOBJ_H
#define MFUNCOBJ_H
#include "obj.h"
#include "str.h"
#include "stdbool.h"
extern struct Type *const MFUNC_OBJ;
extern struct Type *const SFUNC_OBJ;
struct mfunc_param_s {
str_t name;
str_t cfname;
Obj *init;
Obj *type;
struct linepos_s epoint;
};
typedef struct Mfunc {
Obj v;
argcount_t argc;
struct mfunc_param_s *param;
const struct file_list_s *file_list;
struct linepos_s epoint;
bool retval;
uint8_t recursion_pass;
size_t nslen;
struct Namespace **namespaces, *names;
size_t ipoint;
struct List *inamespaces;
const uint8_t *line;
} Mfunc;
typedef struct Mfunc Sfunc;
#define Mfunc(a) OBJ_CAST(Mfunc, a)
#define Sfunc(a) OBJ_CAST(Sfunc, a)
extern void mfuncobj_init(void);
#endif