Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 72 lines (60 sloc) 2.426 kB
53e0a25 @lstrojny Copyright notice
lstrojny authored
1 /**
2 * Copyright (C) 2011 by Lars Strojny <lstrojny@php.net>
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 * THE SOFTWARE.
21 */
c151ae0 @lstrojny Skel C extension
lstrojny authored
22 #ifndef PHP_FUNCTIONAL_H
23 #define PHP_FUNCTIONAL_H
24 #define FUNCTIONAL_VERSION "0.0.1"
25
26 #ifdef HAVE_CONFIG_H
27 #include "config.h"
28 #endif
29 #include "php.h"
30
31 extern zend_module_entry functional_module_entry;
32 #define phpext_functional_ptr &functional_module_entry
33
34 PHP_MINIT_FUNCTION(functional);
35 PHP_MSHUTDOWN_FUNCTION(functional);
36 PHP_MINFO_FUNCTION(functional);
37
0b36334 @lstrojny Functional\map()
lstrojny authored
38 void php_functional_prepare_array_key(int hash_key_type, zval **key, zval ***value, char *string_key, uint string_key_len, int num_key);
39 void php_functional_append_array_value(int hash_key_type, zval **return_value, zval **value, char *string_key, uint string_key_len, int int_key);
570bb33 @lstrojny Extracted array key handling
lstrojny authored
40
a2dd9b1 @lstrojny Cleaning up C extension
lstrojny authored
41 PHP_FUNCTION(functional_all);
42 PHP_FUNCTION(functional_any);
43 PHP_FUNCTION(functional_detect);
44 PHP_FUNCTION(functional_each);
45 PHP_FUNCTION(functional_invoke);
46 PHP_FUNCTION(functional_map);
47 PHP_FUNCTION(functional_none);
48 PHP_FUNCTION(functional_pluck);
49 PHP_FUNCTION(functional_reduce_left);
50 PHP_FUNCTION(functional_reduce_right);
51 PHP_FUNCTION(functional_reject);
52 PHP_FUNCTION(functional_select);
53
3127189 @lstrojny First prototype of the C extension
lstrojny authored
54
c151ae0 @lstrojny Skel C extension
lstrojny authored
55 #ifdef ZTS
56 #define FUNCTIONAL(v) TSRMG(functional_globals_id, zend_functional_globals *, v)
57 #else
58 #define FUNCTIONAL(v) (functional_globals.v)
59 #endif
60
61 #ifdef ZTS
62 #include "TSRM.h"
63 #endif
64
65 #ifndef TRUE
66 #define TRUE 1
67 #define FALSE 0
68 #endif
69
70
71 #endif
Something went wrong with that request. Please try again.