fix gdbinit; postprocessing macros
[m6w6/ext-psi] / src / types / set_func.h
1 /*******************************************************************************
2 Copyright (c) 2016, Michael Wallner <mike@php.net>.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 * Redistributions of source code must retain the above copyright notice,
9 this list of conditions and the following disclaimer.
10 * Redistributions in binary form must reproduce the above copyright
11 notice, this list of conditions and the following disclaimer in the
12 documentation and/or other materials provided with the distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 *******************************************************************************/
25
26 #ifndef PSI_TYPES_SET_FUNC_H
27 #define PSI_TYPES_SET_FUNC_H
28
29 #include "token.h"
30 #include "marshal.h"
31
32 struct psi_plist;
33 struct psi_decl_var;
34 struct psi_validate_scope;
35
36 struct psi_set_func {
37 struct psi_token *token;
38 token_t type;
39 zend_string *name;
40 struct psi_decl_var *var;
41 psi_marshal_set handler;
42 struct psi_plist *inner;
43 unsigned recursive:1;
44 };
45
46 struct psi_set_func *psi_set_func_init(token_t type, zend_string *name, struct psi_decl_var *var);
47 void psi_set_func_free(struct psi_set_func **func_ptr);
48 void psi_set_func_dump(struct psi_dump *dump, struct psi_set_func *func, unsigned level);
49 bool psi_set_func_validate(struct psi_data *data, struct psi_set_func *func,
50 struct psi_validate_scope *scope);
51
52 #endif