-
Notifications
You must be signed in to change notification settings - Fork 1
/
php_tea_openpty.c
66 lines (56 loc) · 1.19 KB
/
php_tea_openpty.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/**
* @author Ammar Faizi <[email protected]> https://www.facebook.com/ammarfaizi2
* @license MIT
*/
#include <php.h>
#include "php_tea_openpty.h"
#include "classes/TeaOpenPTY/TeaOpenPTY.h"
ZEND_GET_MODULE(tea_openpty);
ZEND_DECLARE_MODULE_GLOBALS(tea_openpty);
/**
* MINIT
*/
static
PHP_MINIT_FUNCTION(tea_openpty)
{
zend_class_entry ce;
INIT_CLASS_ENTRY(ce, "TeaOpenPTY\\TeaOpenPTY", methods_TeaOpenPTY__TeaOpenPTY);
ce_TeaOpenPTY__TeaOpenPTY = zend_register_internal_class(&ce TSRMLS_CC);
REGISTER_INI_ENTRIES();
return SUCCESS;
}
/**
* SHUTDOWN
*/
static
PHP_MSHUTDOWN_FUNCTION(tea_openpty)
{
UNREGISTER_INI_ENTRIES();
return SUCCESS;
}
/**
* GLOBAL INIT.
*/
static
PHP_GINIT_FUNCTION(tea_openpty)
{
#if defined(COMPILE_DL_ASTKIT) && defined(ZTS)
ZEND_TSRMLS_CACHE_UPDATE();
#endif
}
zend_module_entry tea_openpty_module_entry = {
STANDARD_MODULE_HEADER,
"tea_openpty",
NULL, /* functions */
PHP_MINIT(tea_openpty),
PHP_MSHUTDOWN(tea_openpty),
NULL, /* RINIT */
NULL, /* RSHUTDOWN */
NULL, /* MINFO */
"0.1",
PHP_MODULE_GLOBALS(tea_openpty),
PHP_GINIT(tea_openpty),
NULL, /* GSHUTDOWN */
NULL, /* RPOSTSHUTDOWN */
STANDARD_MODULE_PROPERTIES_EX
};