@@ -215,7 +215,7 @@ void retval_point_from_coordinates(zval *return_value, double lon, double lat)
215215#endif
216216}
217217
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 )
219219{
220220 HashTable * coords ;
221221#if PHP_VERSION_ID >= 70000
@@ -254,7 +254,7 @@ static int parse_point_pair(zval *coordinates, double *lon, double *lat)
254254 return 1 ;
255255}
256256
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 )
258258{
259259#if PHP_VERSION_ID >= 70000
260260 zval * type , * coordinates ;
@@ -271,7 +271,7 @@ int geojson_point_to_lon_lat(zval *point, double *lon, double *lat)
271271 if (Z_TYPE_P (coordinates ) != IS_ARRAY ) {
272272 return 0 ;
273273 }
274- return parse_point_pair (coordinates , lon , lat );
274+ return parse_point_pair (coordinates , lon , lat TSRMLS_CC );
275275#else
276276 zval * * type , * * coordinates ;
277277
@@ -287,7 +287,7 @@ int geojson_point_to_lon_lat(zval *point, double *lon, double *lat)
287287 if (Z_TYPE_PP (coordinates ) != IS_ARRAY ) {
288288 return 0 ;
289289 }
290- return parse_point_pair (* coordinates , lon , lat );
290+ return parse_point_pair (* coordinates , lon , lat TSRMLS_CC );
291291#endif
292292}
293293
@@ -595,7 +595,7 @@ PHP_FUNCTION(transform_datum)
595595 return ;
596596 }
597597
598- if (!geojson_point_to_lon_lat (geojson , & longitude , & latitude )) {
598+ if (!geojson_point_to_lon_lat (geojson , & longitude , & latitude TSRMLS_CC )) {
599599 RETURN_FALSE ;
600600 }
601601
@@ -627,8 +627,8 @@ PHP_FUNCTION(haversine)
627627 return ;
628628 }
629629
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 );
632632
633633 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 );
634634}
@@ -646,8 +646,8 @@ PHP_FUNCTION(vincenty)
646646 return ;
647647 }
648648
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 );
651651
652652 geo_ellipsoid eli = get_ellipsoid (reference_ellipsoid );
653653 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)
685685 return ;
686686 }
687687
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 );
690690
691691 php_geo_fraction_along_gc_line (
692692 from_lat * GEO_DEG_TO_RAD ,
@@ -728,8 +728,8 @@ PHP_FUNCTION(initial_bearing)
728728 return ;
729729 }
730730
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 );
733733
734734 bearing = php_initial_bearing (
735735 from_lat * GEO_DEG_TO_RAD ,
@@ -742,7 +742,7 @@ PHP_FUNCTION(initial_bearing)
742742}
743743/* }}} */
744744
745- geo_array * geo_hashtable_to_array (zval * array )
745+ geo_array * geo_hashtable_to_array (zval * array TSRMLS_DC )
746746{
747747 geo_array * tmp ;
748748 int element_count ;
@@ -761,12 +761,12 @@ geo_array *geo_hashtable_to_array(zval *array)
761761#if PHP_VERSION_ID >= 70000
762762 ZEND_HASH_FOREACH_VAL (Z_ARRVAL_P (array ), entry ) {
763763
764- if (!parse_point_pair (entry , & lon , & lat )) {
764+ if (!parse_point_pair (entry , & lon , & lat TSRMLS_CC )) {
765765#else
766766 zend_hash_internal_pointer_reset_ex (Z_ARRVAL_P (array ), & pos );
767767 while (zend_hash_get_current_data_ex (Z_ARRVAL_P (array ), (void * * )& entry , & pos ) == SUCCESS ) {
768768
769- if (!parse_point_pair (* entry , & lon , & lat )) {
769+ if (!parse_point_pair (* entry , & lon , & lat TSRMLS_CC )) {
770770#endif
771771
772772 goto failure ;
@@ -791,7 +791,7 @@ geo_array *geo_hashtable_to_array(zval *array)
791791 return NULL ;
792792}
793793
794- int geojson_linestring_to_array (zval * line , geo_array * * array )
794+ int geojson_linestring_to_array (zval * line , geo_array * * array TSRMLS_DC )
795795{
796796 geo_array * tmp ;
797797#if PHP_VERSION_ID >= 70000
@@ -814,7 +814,7 @@ int geojson_linestring_to_array(zval *line, geo_array **array)
814814 return 0 ;
815815 }
816816
817- tmp = geo_hashtable_to_array (coordinates );
817+ tmp = geo_hashtable_to_array (coordinates TSRMLS_CC );
818818#else
819819 zval * * type , * * coordinates ;
820820
@@ -835,7 +835,7 @@ int geojson_linestring_to_array(zval *line, geo_array **array)
835835 return 0 ;
836836 }
837837
838- tmp = geo_hashtable_to_array (* coordinates );
838+ tmp = geo_hashtable_to_array (* coordinates TSRMLS_CC );
839839#endif
840840 if (tmp && array ) {
841841 * array = tmp ;
@@ -919,7 +919,7 @@ PHP_FUNCTION(rdp_simplify)
919919
920920 array_init (return_value );
921921
922- points = geo_hashtable_to_array (points_array );
922+ points = geo_hashtable_to_array (points_array TSRMLS_CC );
923923 rdp_simplify (points , epsilon , 0 , points -> count - 1 );
924924 for (i = 0 ; i < points -> count ; i ++ ) {
925925 if (points -> status [i ]) {
@@ -987,7 +987,7 @@ PHP_FUNCTION(interpolate_linestring)
987987 return ;
988988 }
989989
990- if (!geojson_linestring_to_array (line , & points )) {
990+ if (!geojson_linestring_to_array (line , & points TSRMLS_CC )) {
991991 RETURN_FALSE ;
992992 }
993993
@@ -1031,7 +1031,7 @@ PHP_FUNCTION(interpolate_polygon)
10311031 return ;
10321032 }
10331033
1034- if (!geojson_linestring_to_array (polygon , & points )) {
1034+ if (!geojson_linestring_to_array (polygon , & points TSRMLS_CC )) {
10351035 RETURN_FALSE ;
10361036 }
10371037
0 commit comments