archrelease: copy trunk to community-any
[ArchLinux/community.git] / php-geoip / trunk / php8.patch
blobd51a20734b9ff180cbef2e2376609adc9f62a96d
1 Index: geoip.c
2 ===================================================================
3 --- geoip.c (revision 351081)
4 +++ geoip.c (revision 351082)
5 @@ -34,41 +34,72 @@
6 #include "ext/standard/info.h"
7 #include "php_geoip.h"
9 +/* For PHP 8 */
10 +#ifndef TSRMLS_CC
11 +#define TSRMLS_CC
12 +#endif
15 ZEND_DECLARE_MODULE_GLOBALS(geoip)
17 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_void, 0, 0, 0)
18 +ZEND_END_ARG_INFO()
20 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_database_opt, 0, 0, 0)
21 + ZEND_ARG_INFO(0, database)
22 +ZEND_END_ARG_INFO()
24 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_database, 0, 0, 1)
25 + ZEND_ARG_INFO(0, database)
26 +ZEND_END_ARG_INFO()
28 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_host, 0, 0, 1)
29 + ZEND_ARG_INFO(0, host)
30 +ZEND_END_ARG_INFO()
32 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_region, 0, 0, 2)
33 + ZEND_ARG_INFO(0, country_code)
34 + ZEND_ARG_INFO(0, region_code)
35 +ZEND_END_ARG_INFO()
37 +ZEND_BEGIN_ARG_INFO_EX(arginfo_geoip_directory, 0, 0, 1)
38 + ZEND_ARG_INFO(0, directory)
39 +ZEND_END_ARG_INFO()
41 static int le_geoip;
43 /* {{{ */
44 zend_function_entry geoip_functions[] = {
45 - PHP_FE(geoip_database_info, NULL)
46 + PHP_FE(geoip_database_info, arginfo_geoip_database_opt)
47 #define GEOIPDEF(php_func, c_func, db_type) \
48 - PHP_FE(php_func, NULL)
49 + PHP_FE(php_func, arginfo_geoip_host)
50 #include "geoip.def"
51 #undef GEOIPDEF
52 - PHP_FE(geoip_continent_code_by_name, NULL)
53 - PHP_FE(geoip_org_by_name, NULL)
54 - PHP_FE(geoip_record_by_name, NULL)
55 - PHP_FE(geoip_id_by_name, NULL)
56 - PHP_FE(geoip_region_by_name, NULL)
57 - PHP_FE(geoip_isp_by_name, NULL)
58 - PHP_FE(geoip_db_avail, NULL)
59 - PHP_FE(geoip_db_get_all_info, NULL)
60 - PHP_FE(geoip_db_filename, NULL)
61 + PHP_FE(geoip_continent_code_by_name, arginfo_geoip_host)
62 + PHP_FE(geoip_org_by_name, arginfo_geoip_host)
63 + PHP_FE(geoip_record_by_name, arginfo_geoip_host)
64 + PHP_FE(geoip_id_by_name, arginfo_geoip_host)
65 + PHP_FE(geoip_region_by_name, arginfo_geoip_host)
66 + PHP_FE(geoip_isp_by_name, arginfo_geoip_host)
67 + PHP_FE(geoip_db_avail, arginfo_geoip_database)
68 + PHP_FE(geoip_db_get_all_info, arginfo_geoip_void)
69 + PHP_FE(geoip_db_filename, arginfo_geoip_database)
70 #if LIBGEOIP_VERSION >= 1004001
71 - PHP_FE(geoip_region_name_by_code, NULL)
72 - PHP_FE(geoip_time_zone_by_country_and_region, NULL)
73 + PHP_FE(geoip_region_name_by_code, arginfo_geoip_region)
74 + PHP_FE(geoip_time_zone_by_country_and_region, arginfo_geoip_region)
75 #endif
76 #ifdef HAVE_CUSTOM_DIRECTORY
77 - PHP_FE(geoip_setup_custom_directory, NULL)
78 + PHP_FE(geoip_setup_custom_directory, arginfo_geoip_directory)
79 #endif
80 - PHP_FE(geoip_asnum_by_name, NULL)
81 - PHP_FE(geoip_domain_by_name, NULL)
82 + PHP_FE(geoip_asnum_by_name, arginfo_geoip_host)
83 + PHP_FE(geoip_domain_by_name, arginfo_geoip_host)
84 #if LIBGEOIP_VERSION >= 1004008
85 - PHP_FE(geoip_netspeedcell_by_name, NULL)
86 + PHP_FE(geoip_netspeedcell_by_name, arginfo_geoip_host)
87 #endif
88 +#ifdef PHP_FE_END
89 + PHP_FE_END
90 +#else
91 {NULL, NULL, NULL}
92 +#endif
94 /* }}} */