File: 0004-fix-all-zend_parse_parameters-call-to-use-zend_long.patch

package info (click to toggle)
php-geos 1.0.0-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 760 kB
  • sloc: ansic: 2,607; php: 131; xml: 81; makefile: 27; sh: 12
file content (114 lines) | stat: -rw-r--r-- 3,410 bytes parent folder | download | duplicates (3)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
Description: fix all zend_parse_parameters call to use zend_long
Author: Remi Collet <remi@remirepo.net>
Origin: https://git.remirepo.net/cgit/rpms/php/php-geos.git/tree/0004-fix-all-zend_parse_parameters-call-to-use-zend_long.patch
Bug: https://git.osgeo.org/gitea/geos/php-geos/issues/26

--- a/geos.c
+++ b/geos.c
@@ -78,6 +78,7 @@ PHP_FUNCTION(GEOSRelateMatch);
 # define GEOS_PHP_ADD_ASSOC_ZVAL(a,k,v) add_assoc_zval((a), (k), (v))
 # define GEOS_PHP_HASH_GET_CUR_KEY(s,k,i) zend_hash_get_current_key((s), (k), (i), 0)
 # define zend_string char
+# define zend_long long
 # define ZSTR_VAL(x) (x)
 # define GEOS_PHP_HASH_GET_CUR_DATA(h,d) zend_hash_get_current_data((h),(void**)&(d))
 # define GEOS_PHP_ZVAL zval **
@@ -1281,7 +1282,7 @@ PHP_METHOD(Geometry, relateBoundaryNodeR
     GEOSGeometry *other;
     zval *zobj;
     char* pat;
-    long int bnr = GEOSRELATE_BNR_OGC;
+    zend_long bnr = GEOSRELATE_BNR_OGC;
     char* retStr;
 
     this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
@@ -1342,7 +1343,7 @@ PHP_METHOD(Geometry, setPrecision)
 {
     GEOSGeometry *this;
     double gridSize;
-    long int flags = 0;
+    zend_long flags = 0;
     GEOSGeometry *ret;
 
     this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
@@ -1756,7 +1757,7 @@ PHP_METHOD(Geometry, checkValidity)
     zend_bool retBool;
     char *reasonVal = NULL;
     zval *locationVal = NULL;
-    long int flags = 0;
+    zend_long flags = 0;
 
     this = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
 
@@ -1929,7 +1930,7 @@ PHP_METHOD(Geometry, getSRID)
 PHP_METHOD(Geometry, setSRID)
 {
     GEOSGeometry *geom;
-    long int srid;
+    zend_long srid;
 
     geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
 
@@ -1965,7 +1966,7 @@ PHP_METHOD(Geometry, geometryN)
     GEOSGeometry *geom;
     const GEOSGeometry *c;
     GEOSGeometry *cc;
-    long int num;
+    zend_long num;
 
     geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
 
@@ -2064,7 +2065,7 @@ PHP_METHOD(Geometry, interiorRingN)
     GEOSGeometry *geom;
     const GEOSGeometry *c;
     GEOSGeometry *cc;
-    long int num;
+    zend_long num;
 
     geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
 
@@ -2162,7 +2163,7 @@ PHP_METHOD(Geometry, pointN)
 {
     GEOSGeometry *geom;
     GEOSGeometry *c;
-    long int num;
+    zend_long num;
 
     geom = (GEOSGeometry*)getRelay(getThis(), Geometry_ce_ptr);
 
@@ -2586,7 +2587,7 @@ PHP_METHOD(WKTWriter, setTrim)
 PHP_METHOD(WKTWriter, setRoundingPrecision)
 {
     GEOSWKTWriter *writer;
-    long int prec;
+    zend_long prec;
 
     writer = (GEOSWKTWriter*)getRelay(getThis(), WKTWriter_ce_ptr);
 
@@ -2607,7 +2608,7 @@ PHP_METHOD(WKTWriter, setRoundingPrecisi
 PHP_METHOD(WKTWriter, setOutputDimension)
 {
     GEOSWKTWriter *writer;
-    long int dim;
+    zend_long dim;
 
     writer = (GEOSWKTWriter*)getRelay(getThis(), WKTWriter_ce_ptr);
 
@@ -2752,7 +2753,7 @@ PHP_METHOD(WKBWriter, getOutputDimension
 PHP_METHOD(WKBWriter, setOutputDimension)
 {
     GEOSWKBWriter *writer;
-    long int dim;
+    zend_long dim;
 
     writer = (GEOSWKBWriter*)getRelay(getThis(), WKBWriter_ce_ptr);
 
@@ -2851,7 +2852,7 @@ PHP_METHOD(WKBWriter, getByteOrder)
 PHP_METHOD(WKBWriter, setByteOrder)
 {
     GEOSWKBWriter *writer;
-    long int dim;
+    zend_long dim;
 
     writer = (GEOSWKBWriter*)getRelay(getThis(), WKBWriter_ce_ptr);