-
Notifications
You must be signed in to change notification settings - Fork 0
/
djbx33a.c
51 lines (42 loc) · 901 Bytes
/
djbx33a.c
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
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "php.h"
#include "ext/standard/info.h"
#include "php_djbx33a.h"
PHP_FUNCTION(djbx33a)
{
zend_string *input;
ZEND_PARSE_PARAMETERS_START(1, 1)
Z_PARAM_STR(input)
ZEND_PARSE_PARAMETERS_END();
RETURN_LONG(ZSTR_HASH(input));
}
PHP_MINFO_FUNCTION(djbx33a)
{
php_info_print_table_start();
php_info_print_table_header(2, "djbx33a support", "enabled");
php_info_print_table_end();
}
ZEND_BEGIN_ARG_INFO(arginfo_djbx33a, 0)
ZEND_ARG_INFO(0, input)
ZEND_END_ARG_INFO()
static const zend_function_entry djbx33a_functions[] = {
PHP_FE(djbx33a, arginfo_djbx33a)
PHP_FE_END
};
zend_module_entry djbx33a_module_entry = {
STANDARD_MODULE_HEADER,
"djbx33a",
djbx33a_functions,
NULL,
NULL,
NULL,
NULL,
PHP_MINFO(djbx33a),
PHP_DJBX33A_VERSION,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_DJBX33A
ZEND_GET_MODULE(djbx33a)
#endif