-
Notifications
You must be signed in to change notification settings - Fork 10
/
php_vanillagenerator.cpp
47 lines (41 loc) · 1.02 KB
/
php_vanillagenerator.cpp
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
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
extern "C" {
#include "php.h"
#include "ext/standard/info.h"
#include "php_vanillagenerator.h"
}
#include "src/NetherGeneratorImpl.h"
#include "src/OverworldGeneratorImpl.h"
PHP_MINIT_FUNCTION (vanillagenerator) {
register_overworld_generator();
register_nether_generator();
return SUCCESS;
}
PHP_MINFO_FUNCTION (vanillagenerator) {
php_info_print_table_start();
php_info_print_table_row(2, "vanillagenerator support", "enabled");
php_info_print_table_row(2, "vanillagenerator module version", PHP_VANILLAGENERATOR_VERSION);
php_info_print_table_end();
}
zend_module_entry vanillagenerator_module_entry = {
STANDARD_MODULE_HEADER,
"vanillagenerator",
NULL,
PHP_MINIT(vanillagenerator),
NULL,
NULL,
NULL,
PHP_MINFO(vanillagenerator),
PHP_VANILLAGENERATOR_VERSION,
STANDARD_MODULE_PROPERTIES
};
#ifdef COMPILE_DL_VANILLAGENERATOR
extern "C" {
#ifdef ZTS
ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_GET_MODULE(vanillagenerator)
}
#endif