@@ -215,7 +215,7 @@ void retval_point_from_coordinates(zval *return_value, double lon, double lat)
215
215
#endif
216
216
}
217
217
218
- static int parse_point_pair (zval * coordinates , double * lon , double * lat )
218
+ static int parse_point_pair (zval * coordinates , double * lon , double * lat TSRMLS_DC )
219
219
{
220
220
HashTable * coords ;
221
221
#if PHP_VERSION_ID >= 70000
@@ -254,7 +254,7 @@ static int parse_point_pair(zval *coordinates, double *lon, double *lat)
254
254
return 1 ;
255
255
}
256
256
257
- int geojson_point_to_lon_lat (zval * point , double * lon , double * lat )
257
+ int geojson_point_to_lon_lat (zval * point , double * lon , double * lat TSRMLS_DC )
258
258
{
259
259
#if PHP_VERSION_ID >= 70000
260
260
zval * type , * coordinates ;
@@ -271,7 +271,7 @@ int geojson_point_to_lon_lat(zval *point, double *lon, double *lat)
271
271
if (Z_TYPE_P (coordinates ) != IS_ARRAY ) {
272
272
return 0 ;
273
273
}
274
- return parse_point_pair (coordinates , lon , lat );
274
+ return parse_point_pair (coordinates , lon , lat TSRMLS_CC );
275
275
#else
276
276
zval * * type , * * coordinates ;
277
277
@@ -287,7 +287,7 @@ int geojson_point_to_lon_lat(zval *point, double *lon, double *lat)
287
287
if (Z_TYPE_PP (coordinates ) != IS_ARRAY ) {
288
288
return 0 ;
289
289
}
290
- return parse_point_pair (* coordinates , lon , lat );
290
+ return parse_point_pair (* coordinates , lon , lat TSRMLS_CC );
291
291
#endif
292
292
}
293
293
@@ -595,7 +595,7 @@ PHP_FUNCTION(transform_datum)
595
595
return ;
596
596
}
597
597
598
- if (!geojson_point_to_lon_lat (geojson , & longitude , & latitude )) {
598
+ if (!geojson_point_to_lon_lat (geojson , & longitude , & latitude TSRMLS_CC )) {
599
599
RETURN_FALSE ;
600
600
}
601
601
@@ -627,8 +627,8 @@ PHP_FUNCTION(haversine)
627
627
return ;
628
628
}
629
629
630
- geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat );
631
- geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat );
630
+ geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat TSRMLS_CC );
631
+ geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat TSRMLS_CC );
632
632
633
633
RETURN_DOUBLE (php_geo_haversine (from_lat * GEO_DEG_TO_RAD , from_long * GEO_DEG_TO_RAD , to_lat * GEO_DEG_TO_RAD , to_long * GEO_DEG_TO_RAD ) * radius );
634
634
}
@@ -646,8 +646,8 @@ PHP_FUNCTION(vincenty)
646
646
return ;
647
647
}
648
648
649
- geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat );
650
- geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat );
649
+ geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat TSRMLS_CC );
650
+ geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat TSRMLS_CC );
651
651
652
652
geo_ellipsoid eli = get_ellipsoid (reference_ellipsoid );
653
653
RETURN_DOUBLE (php_geo_vincenty (from_lat * GEO_DEG_TO_RAD , from_long * GEO_DEG_TO_RAD , to_lat * GEO_DEG_TO_RAD , to_long * GEO_DEG_TO_RAD , eli ));
@@ -685,8 +685,8 @@ PHP_FUNCTION(fraction_along_gc_line)
685
685
return ;
686
686
}
687
687
688
- geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat );
689
- geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat );
688
+ geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat TSRMLS_CC );
689
+ geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat TSRMLS_CC );
690
690
691
691
php_geo_fraction_along_gc_line (
692
692
from_lat * GEO_DEG_TO_RAD ,
@@ -728,8 +728,8 @@ PHP_FUNCTION(initial_bearing)
728
728
return ;
729
729
}
730
730
731
- geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat );
732
- geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat );
731
+ geojson_point_to_lon_lat (from_geojson , & from_long , & from_lat TSRMLS_CC );
732
+ geojson_point_to_lon_lat (to_geojson , & to_long , & to_lat TSRMLS_CC );
733
733
734
734
bearing = php_initial_bearing (
735
735
from_lat * GEO_DEG_TO_RAD ,
@@ -742,7 +742,7 @@ PHP_FUNCTION(initial_bearing)
742
742
}
743
743
/* }}} */
744
744
745
- geo_array * geo_hashtable_to_array (zval * array )
745
+ geo_array * geo_hashtable_to_array (zval * array TSRMLS_DC )
746
746
{
747
747
geo_array * tmp ;
748
748
int element_count ;
@@ -761,12 +761,12 @@ geo_array *geo_hashtable_to_array(zval *array)
761
761
#if PHP_VERSION_ID >= 70000
762
762
ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (array ), entry ) {
763
763
764
- if (!parse_point_pair (entry , & lon , & lat )) {
764
+ if (!parse_point_pair (entry , & lon , & lat TSRMLS_CC )) {
765
765
#else
766
766
zend_hash_internal_pointer_reset_ex (Z_ARRVAL_P (array ), & pos );
767
767
while (zend_hash_get_current_data_ex (Z_ARRVAL_P (array ), (void * * )& entry , & pos ) == SUCCESS ) {
768
768
769
- if (!parse_point_pair (* entry , & lon , & lat )) {
769
+ if (!parse_point_pair (* entry , & lon , & lat TSRMLS_CC )) {
770
770
#endif
771
771
772
772
goto failure ;
@@ -791,7 +791,7 @@ geo_array *geo_hashtable_to_array(zval *array)
791
791
return NULL ;
792
792
}
793
793
794
- int geojson_linestring_to_array (zval * line , geo_array * * array )
794
+ int geojson_linestring_to_array (zval * line , geo_array * * array TSRMLS_DC )
795
795
{
796
796
geo_array * tmp ;
797
797
#if PHP_VERSION_ID >= 70000
@@ -814,7 +814,7 @@ int geojson_linestring_to_array(zval *line, geo_array **array)
814
814
return 0 ;
815
815
}
816
816
817
- tmp = geo_hashtable_to_array (coordinates );
817
+ tmp = geo_hashtable_to_array (coordinates TSRMLS_CC );
818
818
#else
819
819
zval * * type , * * coordinates ;
820
820
@@ -835,7 +835,7 @@ int geojson_linestring_to_array(zval *line, geo_array **array)
835
835
return 0 ;
836
836
}
837
837
838
- tmp = geo_hashtable_to_array (* coordinates );
838
+ tmp = geo_hashtable_to_array (* coordinates TSRMLS_CC );
839
839
#endif
840
840
if (tmp && array ) {
841
841
* array = tmp ;
@@ -919,7 +919,7 @@ PHP_FUNCTION(rdp_simplify)
919
919
920
920
array_init (return_value );
921
921
922
- points = geo_hashtable_to_array (points_array );
922
+ points = geo_hashtable_to_array (points_array TSRMLS_CC );
923
923
rdp_simplify (points , epsilon , 0 , points -> count - 1 );
924
924
for (i = 0 ; i < points -> count ; i ++ ) {
925
925
if (points -> status [i ]) {
@@ -987,7 +987,7 @@ PHP_FUNCTION(interpolate_linestring)
987
987
return ;
988
988
}
989
989
990
- if (!geojson_linestring_to_array (line , & points )) {
990
+ if (!geojson_linestring_to_array (line , & points TSRMLS_CC )) {
991
991
RETURN_FALSE ;
992
992
}
993
993
@@ -1031,7 +1031,7 @@ PHP_FUNCTION(interpolate_polygon)
1031
1031
return ;
1032
1032
}
1033
1033
1034
- if (!geojson_linestring_to_array (polygon , & points )) {
1034
+ if (!geojson_linestring_to_array (polygon , & points TSRMLS_CC )) {
1035
1035
RETURN_FALSE ;
1036
1036
}
1037
1037
0 commit comments