diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/class.c MapServer-rel-7-6-4-new/mapscript/php/class.c --- MapServer-rel-7-6-4/mapscript/php/class.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/class.c 2021-11-23 13:07:29.478506381 +0100 @@ -135,7 +135,7 @@ PHP_METHOD(classObj, __construct) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O", &zlayer, mapscript_ce_layer, &zclass, mapscript_ce_class) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -150,7 +150,7 @@ PHP_METHOD(classObj, __construct) if ((class = classObj_new(php_layer->layer, (zclass ? php_class2->class:NULL))) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -170,7 +170,7 @@ PHP_METHOD(classObj, __get) php_class_object *php_class; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -193,7 +193,7 @@ PHP_METHOD(classObj, __get) else IF_GET_OBJECT("metadata", mapscript_ce_hashtable, php_class->metadata, &php_class->class->metadata) else IF_GET_OBJECT("leader", mapscript_ce_labelleader, php_class->leader, php_class->class->leader) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -206,7 +206,7 @@ PHP_METHOD(classObj, __set) php_class_object *php_class; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -231,12 +231,12 @@ PHP_METHOD(classObj, __set) else IF_SET_STRING("group", php_class->class->group, value) else if ( (STRING_EQUAL("metadata", property)) || (STRING_EQUAL("leader", property)) ) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else if ( (STRING_EQUAL("numstyles", property)) || (STRING_EQUAL("numstyles", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -251,7 +251,7 @@ PHP_METHOD(classObj, addLabel) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zlabel, mapscript_ce_label) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -280,7 +280,7 @@ PHP_METHOD(classObj, removeLabel) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -290,13 +290,13 @@ PHP_METHOD(classObj, removeLabel) php_class = MAPSCRIPT_OBJ_P(php_class_object, zobj); if ((label = classObj_removeLabel(php_class->class, index)) == NULL) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } /* Return a copy of the class object just removed */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_label(label, parent, return_value TSRMLS_CC); + mapscript_create_label(label, parent, return_value); } /* }}} */ @@ -311,7 +311,7 @@ PHP_METHOD(classObj, getLabel) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -321,13 +321,13 @@ PHP_METHOD(classObj, getLabel) php_class = MAPSCRIPT_OBJ_P(php_class_object, zobj); if ((label = classObj_getLabel(php_class->class, index)) == NULL) { - mapscript_throw_exception("Invalid label index." TSRMLS_CC); + mapscript_throw_exception("Invalid label index."); return; } /* Return class object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_label(label, parent, return_value TSRMLS_CC); + mapscript_create_label(label, parent, return_value); } /* }}} */ @@ -342,7 +342,7 @@ PHP_METHOD(classObj, updateFromString) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -354,7 +354,7 @@ PHP_METHOD(classObj, updateFromString) status = classObj_updateFromString(php_class->class, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -401,7 +401,7 @@ PHP_METHOD(classObj, setExpression) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &expression, &expression_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -413,7 +413,7 @@ PHP_METHOD(classObj, setExpression) status = classObj_setExpression(php_class->class, expression); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -461,7 +461,7 @@ PHP_METHOD(classObj, setText) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &text, &text_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -474,7 +474,7 @@ PHP_METHOD(classObj, setText) status = classObj_setText(php_class->class, php_layer->layer, text); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -521,7 +521,7 @@ PHP_METHOD(classObj, getStyle) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -531,14 +531,14 @@ PHP_METHOD(classObj, getStyle) php_class = MAPSCRIPT_OBJ_P(php_class_object, zobj); if (index < 0 || index >= php_class->class->numstyles) { - mapscript_throw_exception("Invalid style index." TSRMLS_CC); + mapscript_throw_exception("Invalid style index."); return; } style = php_class->class->styles[index]; MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_style(style, parent, return_value TSRMLS_CC); + mapscript_create_style(style, parent, return_value); } /* }}} */ @@ -553,7 +553,7 @@ PHP_METHOD(classObj, insertStyle) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &zstyle, mapscript_ce_style, &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -578,7 +578,7 @@ PHP_METHOD(classObj, removeStyle) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -591,7 +591,7 @@ PHP_METHOD(classObj, removeStyle) /* Return a copy of the class object just removed */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_style(style, parent, return_value TSRMLS_CC); + mapscript_create_style(style, parent, return_value); } /* }}} */ @@ -608,7 +608,7 @@ PHP_METHOD(classObj, moveStyleUp) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -636,7 +636,7 @@ PHP_METHOD(classObj, moveStyleDown) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -662,7 +662,7 @@ PHP_METHOD(classObj, deleteStyle) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -687,7 +687,7 @@ PHP_METHOD(classObj, getMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -716,7 +716,7 @@ PHP_METHOD(classObj, setMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zname, &zvalue) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -746,7 +746,7 @@ PHP_METHOD(classObj, removeMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -778,7 +778,7 @@ PHP_METHOD(classObj, createLegendIcon) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &width, &height) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -789,7 +789,7 @@ PHP_METHOD(classObj, createLegendIcon) php_layer = MAPSCRIPT_OBJ(php_layer_object, php_class->parent.val); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this class object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this class object."); return; } @@ -799,12 +799,12 @@ PHP_METHOD(classObj, createLegendIcon) php_map->map, php_layer->layer, width, height)) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return an image object */ - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -822,7 +822,7 @@ PHP_METHOD(classObj, drawLegendIcon) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llOll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "llOll", &width, &height, &zimage, mapscript_ce_image, &dstX, &dstY) == FAILURE) { @@ -837,15 +837,15 @@ PHP_METHOD(classObj, drawLegendIcon) if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this class object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this class object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if (!MS_RENDERER_PLUGIN(php_image->image->format)) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); - mapscript_report_php_error(E_WARNING, "DrawLegendicon function is only available for renderer plugin drivers" TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); + mapscript_report_php_error(E_WARNING, "DrawLegendicon function is only available for renderer plugin drivers"); RETURN_LONG(MS_FAILURE); } @@ -855,7 +855,7 @@ PHP_METHOD(classObj, drawLegendIcon) width, height, php_image->image, dstX, dstY)) != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -912,7 +912,7 @@ zend_function_entry class_functions[] = } }; -void mapscript_create_class(classObj *class, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_class(classObj *class, parent_object parent, zval *return_value) { php_class_object * php_class; object_init_ex(return_value, mapscript_ce_class); @@ -925,13 +925,13 @@ void mapscript_create_class(classObj *cl #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_class_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_class_create_object(zend_class_entry *ce) { php_class_object *php_class; php_class = ecalloc(1, sizeof(*php_class) + zend_object_properties_size(ce)); - zend_object_std_init(&php_class->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_class->zobj, ce); object_properties_init(&php_class->zobj, ce); php_class->zobj.handlers = &mapscript_class_object_handlers; @@ -983,7 +983,7 @@ PHP_MINIT_FUNCTION(class) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "classObj", class_functions); - mapscript_ce_class = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_class = zend_register_internal_class(&ce); mapscript_ce_class->create_object = mapscript_class_create_object; mapscript_ce_class->ce_flags |= ZEND_ACC_FINAL; @@ -997,7 +997,7 @@ PHP_MINIT_FUNCTION(class) } #else /* PHP5 */ -static void mapscript_class_object_destroy(void *object TSRMLS_DC) +static void mapscript_class_object_destroy(void *object) { php_class_object *php_class = (php_class_object *)object; @@ -1013,7 +1013,7 @@ static void mapscript_class_object_destr efree(object); } -static zend_object_value mapscript_class_object_new_ex(zend_class_entry *ce, php_class_object **ptr TSRMLS_DC) +static zend_object_value mapscript_class_object_new_ex(zend_class_entry *ce, php_class_object **ptr) { zend_object_value retval; php_class_object *php_class; @@ -1022,7 +1022,7 @@ static zend_object_value mapscript_class retval = mapscript_object_new_ex(&php_class->std, ce, &mapscript_class_object_destroy, - &mapscript_class_object_handlers TSRMLS_CC); + &mapscript_class_object_handlers); if (ptr) *ptr = php_class; @@ -1035,12 +1035,12 @@ static zend_object_value mapscript_class return retval; } -static zend_object_value mapscript_class_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_class_object_new(zend_class_entry *ce) { - return mapscript_class_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_class_object_new_ex(ce, NULL); } -static zend_object_value mapscript_class_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_class_object_clone(zval *zobj) { php_class_object *php_class_old, *php_class_new; php_layer_object *php_layer; @@ -1049,8 +1049,8 @@ static zend_object_value mapscript_class php_class_old = MAPSCRIPT_OBJ_P(php_class_object, zobj); php_layer = MAPSCRIPT_OBJ_P(php_layer_object, php_class_old->parent.val); - new_ov = mapscript_class_object_new_ex(mapscript_ce_class, &php_class_new TSRMLS_CC); - zend_objects_clone_members(&php_class_new->std, new_ov, &php_class_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_class_object_new_ex(mapscript_ce_class, &php_class_new); + zend_objects_clone_members(&php_class_new->std, new_ov, &php_class_old->std, Z_OBJ_HANDLE_P(zobj)); php_class_new->class = classObj_clone(php_class_old->class, php_layer->layer); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/cluster.c MapServer-rel-7-6-4-new/mapscript/php/cluster.c --- MapServer-rel-7-6-4/mapscript/php/cluster.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/cluster.c 2021-11-23 13:07:29.479506459 +0100 @@ -62,7 +62,7 @@ ZEND_END_ARG_INFO() clusterObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(clusterObj, __construct) { - mapscript_throw_exception("clusterObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("clusterObj cannot be constructed"); } /* }}} */ @@ -74,7 +74,7 @@ PHP_METHOD(clusterObj, __get) php_cluster_object *php_cluster; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -87,7 +87,7 @@ PHP_METHOD(clusterObj, __get) else IF_GET_DOUBLE("buffer", php_cluster->cluster->buffer) else IF_GET_STRING("region", php_cluster->cluster->region) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -100,7 +100,7 @@ PHP_METHOD(clusterObj, __set) php_cluster_object *php_cluster; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -113,7 +113,7 @@ PHP_METHOD(clusterObj, __set) else IF_SET_DOUBLE("buffer", php_cluster->cluster->buffer, value) else IF_SET_STRING("region", php_cluster->cluster->region, value) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -128,7 +128,7 @@ PHP_METHOD(clusterObj, updateFromString) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -140,7 +140,7 @@ PHP_METHOD(clusterObj, updateFromString) status = clusterObj_updateFromString(php_cluster->cluster, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -187,7 +187,7 @@ PHP_METHOD(clusterObj, setGroup) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &group, &group_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -197,7 +197,7 @@ PHP_METHOD(clusterObj, setGroup) php_cluster = MAPSCRIPT_OBJ_P(php_cluster_object, zobj); if ((status = clusterObj_setGroup(php_cluster->cluster, group)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -243,7 +243,7 @@ PHP_METHOD(clusterObj, setFilter) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filter, &filter_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -253,7 +253,7 @@ PHP_METHOD(clusterObj, setFilter) php_cluster = MAPSCRIPT_OBJ_P(php_cluster_object, zobj); if ((status = clusterObj_setFilter(php_cluster->cluster, filter)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -303,7 +303,7 @@ zend_function_entry cluster_functions[] }; -void mapscript_create_cluster(clusterObj *cluster, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_cluster(clusterObj *cluster, parent_object parent, zval *return_value) { php_cluster_object * php_cluster; object_init_ex(return_value, mapscript_ce_cluster); @@ -319,13 +319,13 @@ void mapscript_create_cluster(clusterObj #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_cluster_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_cluster_create_object(zend_class_entry *ce) { php_cluster_object *php_cluster; php_cluster = ecalloc(1, sizeof(*php_cluster) + zend_object_properties_size(ce)); - zend_object_std_init(&php_cluster->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_cluster->zobj, ce); object_properties_init(&php_cluster->zobj, ce); php_cluster->zobj.handlers = &mapscript_cluster_object_handlers; @@ -353,7 +353,7 @@ PHP_MINIT_FUNCTION(cluster) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "clusterObj", cluster_functions); - mapscript_ce_cluster = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_cluster = zend_register_internal_class(&ce); mapscript_ce_cluster->create_object = mapscript_cluster_create_object; mapscript_ce_cluster->ce_flags |= ZEND_ACC_FINAL; @@ -366,7 +366,7 @@ PHP_MINIT_FUNCTION(cluster) } #else /* PHP5 */ -static void mapscript_cluster_object_destroy(void *object TSRMLS_DC) +static void mapscript_cluster_object_destroy(void *object) { php_cluster_object *php_cluster = (php_cluster_object *)object; @@ -379,7 +379,7 @@ static void mapscript_cluster_object_des efree(object); } -static zend_object_value mapscript_cluster_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_cluster_object_new(zend_class_entry *ce) { zend_object_value retval; php_cluster_object *php_cluster; @@ -387,7 +387,7 @@ static zend_object_value mapscript_clust MAPSCRIPT_ALLOC_OBJECT(php_cluster, php_cluster_object); retval = mapscript_object_new(&php_cluster->std, ce, - &mapscript_cluster_object_destroy TSRMLS_CC); + &mapscript_cluster_object_destroy); php_cluster->is_ref = 0; MAPSCRIPT_INIT_PARENT(php_cluster->parent) diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/color.c MapServer-rel-7-6-4-new/mapscript/php/color.c --- MapServer-rel-7-6-4/mapscript/php/color.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/color.c 2021-11-23 13:07:29.479506459 +0100 @@ -63,7 +63,7 @@ ZEND_END_ARG_INFO() colorObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(colorObj, __construct) { - mapscript_throw_exception("colorObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("colorObj cannot be constructed"); } /* }}} */ @@ -75,7 +75,7 @@ PHP_METHOD(colorObj, __get) php_color_object *php_color; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -89,7 +89,7 @@ PHP_METHOD(colorObj, __get) else IF_GET_LONG("blue", php_color->color->blue) else IF_GET_LONG("alpha", php_color->color->alpha) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -102,7 +102,7 @@ PHP_METHOD(colorObj, __set) php_color_object *php_color; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -116,7 +116,7 @@ PHP_METHOD(colorObj, __set) else IF_SET_COLOR("blue", php_color->color->blue, value) else IF_SET_COLOR("alpha", php_color->color->alpha, value) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -130,7 +130,7 @@ PHP_METHOD(colorObj, setRGB) php_color_object *php_color; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll|l", &red, &green, &blue, &alpha) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -156,7 +156,7 @@ PHP_METHOD(colorObj, setHex) php_color_object *php_color; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &hex, &hex_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -172,7 +172,7 @@ PHP_METHOD(colorObj, setHex) } if (red > 255 || green > 255 || blue > 255 || alpha > 255) { - mapscript_throw_exception("Invalid color index." TSRMLS_CC); + mapscript_throw_exception("Invalid color index."); RETURN_LONG(MS_FAILURE); } @@ -182,7 +182,7 @@ PHP_METHOD(colorObj, setHex) RETURN_LONG(MS_SUCCESS); } else { - mapscript_throw_exception("Invalid hex color string." TSRMLS_CC); + mapscript_throw_exception("Invalid hex color string."); RETURN_LONG(MS_FAILURE); } } @@ -201,7 +201,7 @@ PHP_METHOD(colorObj, toHex) color = php_color->color; if (color->red < 0 || color->green < 0 || color->blue < 0) { - mapscript_throw_exception("Can't express invalid color as hex." TSRMLS_CC); + mapscript_throw_exception("Can't express invalid color as hex."); return; } @@ -214,7 +214,7 @@ PHP_METHOD(colorObj, toHex) snprintf(hex, 10, "#%02x%02x%02x%02x", color->red, color->green, color->blue, color->alpha); } else { - mapscript_throw_exception("Can't express color with invalid alpha as hex." TSRMLS_CC); + mapscript_throw_exception("Can't express color with invalid alpha as hex."); return; } @@ -234,7 +234,7 @@ zend_function_entry color_functions[] = }; -void mapscript_create_color(colorObj *color, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_color(colorObj *color, parent_object parent, zval *return_value) { php_color_object * php_color; object_init_ex(return_value, mapscript_ce_color); @@ -248,13 +248,13 @@ void mapscript_create_color(colorObj *co #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_color_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_color_create_object(zend_class_entry *ce) { php_color_object *php_color; php_color = ecalloc(1, sizeof(*php_color) + zend_object_properties_size(ce)); - zend_object_std_init(&php_color->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_color->zobj, ce); object_properties_init(&php_color->zobj, ce); php_color->zobj.handlers = &mapscript_color_object_handlers; @@ -282,7 +282,7 @@ PHP_MINIT_FUNCTION(color) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "colorObj", color_functions); - mapscript_ce_color = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_color = zend_register_internal_class(&ce); mapscript_ce_color->create_object = mapscript_color_create_object; mapscript_ce_color->ce_flags |= ZEND_ACC_FINAL; @@ -295,7 +295,7 @@ PHP_MINIT_FUNCTION(color) } #else /* PHP5 */ -static void mapscript_color_object_destroy(void *object TSRMLS_DC) +static void mapscript_color_object_destroy(void *object) { php_color_object *php_color = (php_color_object *)object; @@ -308,7 +308,7 @@ static void mapscript_color_object_destr efree(object); } -static zend_object_value mapscript_color_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_color_object_new(zend_class_entry *ce) { zend_object_value retval; php_color_object *php_color; @@ -316,7 +316,7 @@ static zend_object_value mapscript_color MAPSCRIPT_ALLOC_OBJECT(php_color, php_color_object); retval = mapscript_object_new(&php_color->std, ce, - &mapscript_color_object_destroy TSRMLS_CC); + &mapscript_color_object_destroy); MAPSCRIPT_INIT_PARENT(php_color->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/error.c MapServer-rel-7-6-4-new/mapscript/php/error.c --- MapServer-rel-7-6-4/mapscript/php/error.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/error.c 2021-11-23 13:07:29.479506459 +0100 @@ -60,7 +60,7 @@ ZEND_END_ARG_INFO() errorObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(errorObj, __construct) { - mapscript_throw_exception("errorObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("errorObj cannot be constructed"); } /* }}} */ @@ -73,7 +73,7 @@ PHP_METHOD(errorObj, __get) php_error_object *php_errobj; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -87,7 +87,7 @@ PHP_METHOD(errorObj, __get) else IF_GET_STRING("message", php_errobj->error->message) else IF_GET_LONG("isreported", php_errobj->error->isreported) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -100,7 +100,7 @@ PHP_METHOD(errorObj, __set) /* php_error_object *php_errobj; */ PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -113,9 +113,9 @@ PHP_METHOD(errorObj, __set) (STRING_EQUAL("routine", property)) || (STRING_EQUAL("isreported", property)) || (STRING_EQUAL("message", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -144,7 +144,7 @@ PHP_METHOD(errorObj, next) error = msGetErrorObj(); while(error != php_errobj->error) { if (error->next == NULL) { - mapscript_throw_exception("Trying to access an errorObj that has expired." TSRMLS_CC); + mapscript_throw_exception("Trying to access an errorObj that has expired."); return; } error = error->next; @@ -166,7 +166,7 @@ zend_function_entry error_functions[] = } }; -void mapscript_create_error(errorObj *error, zval *return_value TSRMLS_DC) +void mapscript_create_error(errorObj *error, zval *return_value) { php_error_object * php_errobj; object_init_ex(return_value, mapscript_ce_error); @@ -176,13 +176,13 @@ void mapscript_create_error(errorObj *er #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_error_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_error_create_object(zend_class_entry *ce) { php_error_object *php_errobj; php_errobj = ecalloc(1, sizeof(*php_errobj) + zend_object_properties_size(ce)); - zend_object_std_init(&php_errobj->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_errobj->zobj, ce); object_properties_init(&php_errobj->zobj, ce); php_errobj->zobj.handlers = &mapscript_error_object_handlers; @@ -206,7 +206,7 @@ PHP_MINIT_FUNCTION(error) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "errorObj", error_functions); - mapscript_ce_error = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_error = zend_register_internal_class(&ce); mapscript_ce_error->create_object = mapscript_error_create_object; mapscript_ce_error->ce_flags |= ZEND_ACC_FINAL; @@ -219,7 +219,7 @@ PHP_MINIT_FUNCTION(error) } #else /* PHP5 */ -static void mapscript_error_object_destroy(void *object TSRMLS_DC) +static void mapscript_error_object_destroy(void *object) { php_error_object *php_errobj = (php_error_object *)object; @@ -230,7 +230,7 @@ static void mapscript_error_object_destr efree(object); } -static zend_object_value mapscript_error_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_error_object_new(zend_class_entry *ce) { zend_object_value retval; php_error_object *php_errobj; @@ -238,7 +238,7 @@ static zend_object_value mapscript_error MAPSCRIPT_ALLOC_OBJECT(php_errobj, php_error_object); retval = mapscript_object_new(&php_errobj->std, ce, - &mapscript_error_object_destroy TSRMLS_CC); + &mapscript_error_object_destroy); return retval; } diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/grid.c MapServer-rel-7-6-4-new/mapscript/php/grid.c --- MapServer-rel-7-6-4/mapscript/php/grid.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/grid.c 2021-11-23 13:07:29.480506536 +0100 @@ -59,7 +59,7 @@ PHP_METHOD(gridObj, __construct) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zlayer, mapscript_ce_layer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -85,7 +85,7 @@ PHP_METHOD(gridObj, __construct) php_old_grid = MAPSCRIPT_OBJ(php_grid_object, php_layer->grid); php_old_grid->parent.child_ptr = NULL; #if PHP_VERSION_ID < 70000 - zend_objects_store_del_ref(php_layer->grid TSRMLS_CC); + zend_objects_store_del_ref(php_layer->grid); #else /* Z_SET_REFCOUNT(php_layer->grid, 0); @@ -99,10 +99,10 @@ PHP_METHOD(gridObj, __construct) MAKE_STD_ZVAL(php_layer->grid); MAPSCRIPT_MAKE_PARENT(zlayer, &php_layer->grid); #if PHP_VERSION_ID < 70000 - mapscript_create_grid((graticuleObj *)(php_layer->layer->layerinfo), parent, php_layer->grid TSRMLS_CC); + mapscript_create_grid((graticuleObj *)(php_layer->layer->layerinfo), parent, php_layer->grid); return_value_ptr = &php_layer->grid; #else - mapscript_create_grid((graticuleObj *)(php_layer->layer->layerinfo), parent, &php_layer->grid TSRMLS_CC); + mapscript_create_grid((graticuleObj *)(php_layer->layer->layerinfo), parent, &php_layer->grid); return_value = &php_layer->grid; #endif } @@ -116,7 +116,7 @@ PHP_METHOD(gridObj, __get) php_grid_object *php_grid; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -133,7 +133,7 @@ PHP_METHOD(gridObj, __get) else IF_GET_DOUBLE("maxinterval", php_grid->grid->maxincrement) else IF_GET_STRING("labelformat", php_grid->grid->labelformat) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -146,7 +146,7 @@ PHP_METHOD(gridObj, __set) php_grid_object *php_grid; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -163,7 +163,7 @@ PHP_METHOD(gridObj, __set) else IF_SET_DOUBLE("maxinterval", php_grid->grid->maxincrement, value) else IF_SET_STRING("labelformat", php_grid->grid->labelformat, value) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -176,7 +176,7 @@ zend_function_entry grid_functions[] = { } }; -void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value) { php_grid_object * php_grid; object_init_ex(return_value, mapscript_ce_grid); @@ -189,13 +189,13 @@ void mapscript_create_grid(graticuleObj #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_grid_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_grid_create_object(zend_class_entry *ce) { php_grid_object *php_grid; php_grid = ecalloc(1, sizeof(*php_grid) + zend_object_properties_size(ce)); - zend_object_std_init(&php_grid->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_grid->zobj, ce); object_properties_init(&php_grid->zobj, ce); php_grid->zobj.handlers = &mapscript_grid_object_handlers; @@ -223,7 +223,7 @@ PHP_MINIT_FUNCTION(grid) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "gridObj", grid_functions); - mapscript_ce_grid = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_grid = zend_register_internal_class(&ce); mapscript_ce_grid->create_object = mapscript_grid_create_object; mapscript_ce_grid->ce_flags |= ZEND_ACC_FINAL; @@ -236,7 +236,7 @@ PHP_MINIT_FUNCTION(grid) } #else /* PHP5 */ -static void mapscript_grid_object_destroy(void *object TSRMLS_DC) +static void mapscript_grid_object_destroy(void *object) { php_grid_object *php_grid = (php_grid_object *)object; @@ -249,7 +249,7 @@ static void mapscript_grid_object_destro efree(object); } -static zend_object_value mapscript_grid_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_grid_object_new(zend_class_entry *ce) { zend_object_value retval; php_grid_object *php_grid; @@ -257,7 +257,7 @@ static zend_object_value mapscript_grid_ MAPSCRIPT_ALLOC_OBJECT(php_grid, php_grid_object); retval = mapscript_object_new(&php_grid->std, ce, - &mapscript_grid_object_destroy TSRMLS_CC); + &mapscript_grid_object_destroy); MAPSCRIPT_INIT_PARENT(php_grid->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/hashtable.c MapServer-rel-7-6-4-new/mapscript/php/hashtable.c --- MapServer-rel-7-6-4/mapscript/php/hashtable.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/hashtable.c 2021-11-23 13:07:29.480506536 +0100 @@ -66,7 +66,7 @@ ZEND_END_ARG_INFO() Create a new hashtableObj instance. */ PHP_METHOD(hashtableObj, __construct) { - mapscript_throw_exception("hashTableObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("hashTableObj cannot be constructed"); } /* }}} */ @@ -78,7 +78,7 @@ PHP_METHOD(hashtableObj, __get) php_hashtable_object *php_hashtable; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -89,7 +89,7 @@ PHP_METHOD(hashtableObj, __get) IF_GET_LONG("numitems", php_hashtable->hashtable->numitems) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -100,7 +100,7 @@ PHP_METHOD(hashtableObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -108,9 +108,9 @@ PHP_METHOD(hashtableObj, __set) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ( (STRING_EQUAL("numitems", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -125,7 +125,7 @@ PHP_METHOD(hashtableObj, get) php_hashtable_object *php_hashtable; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &key, &key_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -154,7 +154,7 @@ PHP_METHOD(hashtableObj, set) php_hashtable_object *php_hashtable; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &key, &key_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -164,7 +164,7 @@ PHP_METHOD(hashtableObj, set) php_hashtable = MAPSCRIPT_OBJ_P(php_hashtable_object, zobj); if ((status = hashTableObj_set(php_hashtable->hashtable, key, value)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -183,7 +183,7 @@ PHP_METHOD(hashtableObj, remove) php_hashtable_object *php_hashtable; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &key, &key_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -193,7 +193,7 @@ PHP_METHOD(hashtableObj, remove) php_hashtable = MAPSCRIPT_OBJ_P(php_hashtable_object, zobj); if ((status = hashTableObj_remove(php_hashtable->hashtable, key)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -233,7 +233,7 @@ PHP_METHOD(hashtableObj, nextKey) php_hashtable_object *php_hashtable; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s!", &key, &key_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -264,7 +264,7 @@ zend_function_entry hashtable_functions[ } }; -void mapscript_create_hashtable(hashTableObj *hashtable, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_hashtable(hashTableObj *hashtable, parent_object parent, zval *return_value) { php_hashtable_object * php_hashtable; object_init_ex(return_value, mapscript_ce_hashtable); @@ -278,13 +278,13 @@ void mapscript_create_hashtable(hashTabl #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_hashtable_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_hashtable_create_object(zend_class_entry *ce) { php_hashtable_object *php_hashtable; php_hashtable = ecalloc(1, sizeof(*php_hashtable) + zend_object_properties_size(ce)); - zend_object_std_init(&php_hashtable->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_hashtable->zobj, ce); object_properties_init(&php_hashtable->zobj, ce); php_hashtable->zobj.handlers = &mapscript_hashtable_object_handlers; @@ -312,7 +312,7 @@ PHP_MINIT_FUNCTION(hashtable) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "hashTableObj", hashtable_functions); - mapscript_ce_hashtable = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_hashtable = zend_register_internal_class(&ce); mapscript_ce_hashtable->create_object = mapscript_hashtable_create_object; mapscript_ce_hashtable->ce_flags |= ZEND_ACC_FINAL; @@ -325,7 +325,7 @@ PHP_MINIT_FUNCTION(hashtable) } #else /* PHP5 */ -static void mapscript_hashtable_object_destroy(void *object TSRMLS_DC) +static void mapscript_hashtable_object_destroy(void *object) { php_hashtable_object *php_hashtable = (php_hashtable_object *)object; @@ -338,7 +338,7 @@ static void mapscript_hashtable_object_d efree(object); } -static zend_object_value mapscript_hashtable_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_hashtable_object_new(zend_class_entry *ce) { zend_object_value retval; php_hashtable_object *php_hashtable; @@ -346,7 +346,7 @@ static zend_object_value mapscript_hasht MAPSCRIPT_ALLOC_OBJECT(php_hashtable, php_hashtable_object); retval = mapscript_object_new(&php_hashtable->std, ce, - &mapscript_hashtable_object_destroy TSRMLS_CC); + &mapscript_hashtable_object_destroy); MAPSCRIPT_INIT_PARENT(php_hashtable->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/image.c MapServer-rel-7-6-4-new/mapscript/php/image.c --- MapServer-rel-7-6-4/mapscript/php/image.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/image.c 2021-11-23 13:07:29.480506536 +0100 @@ -65,7 +65,7 @@ ZEND_END_ARG_INFO() imageObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(imageObj, __construct) { - mapscript_throw_exception("imageObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("imageObj cannot be constructed"); } /* }}} */ @@ -77,7 +77,7 @@ PHP_METHOD(imageObj, __get) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -94,7 +94,7 @@ PHP_METHOD(imageObj, __get) else IF_GET_STRING("imageurl", php_image->image->imageurl) else IF_GET_STRING("imagetype", php_image->image->format->name) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -107,7 +107,7 @@ PHP_METHOD(imageObj, __set) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -123,9 +123,9 @@ PHP_METHOD(imageObj, __set) (STRING_EQUAL("resolution", property)) || (STRING_EQUAL("resolutionfactor", property)) || (STRING_EQUAL("height", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -153,7 +153,7 @@ PHP_METHOD(imageObj, saveWebImage) imageFile = msBuildPath(path, php_image->image->imagepath, imageFilename); if (msSaveImage(NULL, php_image->image, imageFile) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("Failed writing image to %s" TSRMLS_CC, imageFile); + mapscript_throw_mapserver_exception("Failed writing image to %s", imageFile); return; } @@ -186,7 +186,7 @@ PHP_METHOD(imageObj, pasteImage) rasterBufferObj rb; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol|lll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol|lll", &zimage, mapscript_ce_image, &transparent, &dstx, &dsty, &angle) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -195,14 +195,14 @@ PHP_METHOD(imageObj, pasteImage) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if (ZEND_NUM_ARGS() == 3) - mapscript_report_php_error(E_WARNING, "dstX parameter given but not dstY" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "dstX parameter given but not dstY"); php_image = MAPSCRIPT_OBJ_P(php_image_object, zobj); php_imageSrc = MAPSCRIPT_OBJ_P(php_image_object, zimage); if (!MS_RENDERER_PLUGIN(php_imageSrc->image->format) || !MS_RENDERER_PLUGIN(php_image->image->format)) { - mapscript_throw_exception("PasteImage function should only be used with renderer plugin drivers." TSRMLS_CC); + mapscript_throw_exception("PasteImage function should only be used with renderer plugin drivers."); return; } @@ -211,11 +211,11 @@ PHP_METHOD(imageObj, pasteImage) memset(&rb,0,sizeof(rasterBufferObj)); if(MS_SUCCESS != renderer->getRasterBufferHandle(php_imageSrc->image, &rb)) { - mapscript_throw_exception("PasteImage failed to extract rasterbuffer handle" TSRMLS_CC); + mapscript_throw_exception("PasteImage failed to extract rasterbuffer handle"); return; } if(MS_SUCCESS != renderer->mergeRasterBuffer(php_image->image, &rb, 1.0, 0, 0, dstx, dsty, rb.width, rb.height)) { - mapscript_throw_exception("PasteImage failed to merge raster buffer" TSRMLS_CC); + mapscript_throw_exception("PasteImage failed to merge raster buffer"); return; } @@ -269,7 +269,7 @@ PHP_METHOD(imageObj, saveImage) void *iptr=NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|sO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sO", &filename, &filename_len, &zmap, mapscript_ce_map) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -283,7 +283,7 @@ PHP_METHOD(imageObj, saveImage) if(filename_len > 0) { if ((status = msSaveImage((zmap ? php_map->map:NULL), php_image->image, filename) != MS_SUCCESS)) { - mapscript_throw_mapserver_exception("Failed writing image to %s" TSRMLS_CC, filename); + mapscript_throw_mapserver_exception("Failed writing image to %s", filename); return; } @@ -296,11 +296,11 @@ PHP_METHOD(imageObj, saveImage) //handle changes in PHP 5.4.x #if PHP_VERSION_ID < 50399 if (OG(ob_nesting_level)<=0) { - php_header(TSRMLS_C); + php_header(); } #else - if (php_output_get_level(TSRMLS_C)<=0) { - php_header(TSRMLS_C); + if (php_output_get_level()<=0) { + php_header(); } #endif @@ -312,10 +312,10 @@ PHP_METHOD(imageObj, saveImage) } if (size == 0) { - mapscript_throw_mapserver_exception("Failed writing image to stdout" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed writing image to stdout"); return; } else { - php_write(iptr, size TSRMLS_CC); + php_write(iptr, size); status = MS_SUCCESS; /* status = size; why should we return the size ?? */ msFree(iptr); @@ -338,7 +338,7 @@ zend_function_entry image_functions[] = }; -void mapscript_create_image(imageObj *image, zval *return_value TSRMLS_DC) +void mapscript_create_image(imageObj *image, zval *return_value) { php_image_object * php_image; object_init_ex(return_value, mapscript_ce_image); @@ -348,13 +348,13 @@ void mapscript_create_image(imageObj *im #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_image_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_image_create_object(zend_class_entry *ce) { php_image_object *php_image; php_image = ecalloc(1, sizeof(*php_image) + zend_object_properties_size(ce)); - zend_object_std_init(&php_image->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_image->zobj, ce); object_properties_init(&php_image->zobj, ce); php_image->zobj.handlers = &mapscript_image_object_handlers; @@ -378,7 +378,7 @@ PHP_MINIT_FUNCTION(image) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "imageObj", image_functions); - mapscript_ce_image = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_image = zend_register_internal_class(&ce); mapscript_ce_image->create_object = mapscript_image_create_object; mapscript_ce_image->ce_flags |= ZEND_ACC_FINAL; @@ -391,7 +391,7 @@ PHP_MINIT_FUNCTION(image) } #else /* PHP5 */ -static void mapscript_image_object_destroy(void *object TSRMLS_DC) +static void mapscript_image_object_destroy(void *object) { php_image_object *php_image = (php_image_object *)object; @@ -402,7 +402,7 @@ static void mapscript_image_object_destr efree(object); } -static zend_object_value mapscript_image_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_image_object_new(zend_class_entry *ce) { zend_object_value retval; php_image_object *php_image; @@ -410,7 +410,7 @@ static zend_object_value mapscript_image MAPSCRIPT_ALLOC_OBJECT(php_image, php_image_object); retval = mapscript_object_new(&php_image->std, ce, - &mapscript_image_object_destroy TSRMLS_CC); + &mapscript_image_object_destroy); return retval; } diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/label.c MapServer-rel-7-6-4-new/mapscript/php/label.c --- MapServer-rel-7-6-4/mapscript/php/label.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/label.c 2021-11-23 13:07:29.481506614 +0100 @@ -109,7 +109,7 @@ PHP_METHOD(labelObj, __construct) php_label = MAPSCRIPT_OBJ_P(php_label_object, getThis()); if ((php_label->label = labelObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct labelObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct labelObj."); return; } } @@ -123,7 +123,7 @@ PHP_METHOD(labelObj, __get) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -167,7 +167,7 @@ PHP_METHOD(labelObj, __get) else IF_GET_OBJECT("outlinecolor", mapscript_ce_color, php_label->outlinecolor, &php_label->label->outlinecolor) else IF_GET_OBJECT("shadowcolor", mapscript_ce_color, php_label->shadowcolor, &php_label->label->shadowcolor) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -180,7 +180,7 @@ PHP_METHOD(labelObj, __set) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -221,11 +221,11 @@ PHP_METHOD(labelObj, __set) (STRING_EQUAL("outlinecolor", property)) || (STRING_EQUAL("leader", property)) || (STRING_EQUAL("shadowcolor", property)) ) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else if (STRING_EQUAL("numstyles", property)) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -241,7 +241,7 @@ PHP_METHOD(labelObj, updateFromString) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -251,7 +251,7 @@ PHP_METHOD(labelObj, updateFromString) php_label = MAPSCRIPT_OBJ_P(php_label_object, zobj); if ((status = labelObj_updateFromString(php_label->label, snippet)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -297,7 +297,7 @@ PHP_METHOD(labelObj, setBinding) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &bindingId, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -307,12 +307,12 @@ PHP_METHOD(labelObj, setBinding) php_label = MAPSCRIPT_OBJ_P(php_label_object, zobj); if (bindingId < 0 || bindingId > MS_LABEL_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } if (!value || strlen(value) <= 0) { - mapscript_throw_exception("Invalid binding value." TSRMLS_CC); + mapscript_throw_exception("Invalid binding value."); return; } @@ -340,7 +340,7 @@ PHP_METHOD(labelObj, getBinding) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &bindingId) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -350,7 +350,7 @@ PHP_METHOD(labelObj, getBinding) php_label = MAPSCRIPT_OBJ_P(php_label_object, zobj); if (bindingId < 0 || bindingId > MS_LABEL_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } @@ -372,7 +372,7 @@ PHP_METHOD(labelObj, removeBinding) php_label_object *php_label; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &bindingId) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -382,7 +382,7 @@ PHP_METHOD(labelObj, removeBinding) php_label = MAPSCRIPT_OBJ_P(php_label_object, zobj); if (bindingId < 0 || bindingId > MS_LABEL_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } @@ -410,7 +410,7 @@ PHP_METHOD(labelObj, getStyle) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -420,14 +420,14 @@ PHP_METHOD(labelObj, getStyle) php_label = MAPSCRIPT_OBJ_P(php_label_object, zobj); if (index < 0 || index >= php_label->label->numstyles) { - mapscript_throw_exception("Invalid style index." TSRMLS_CC); + mapscript_throw_exception("Invalid style index."); return; } style = php_label->label->styles[index]; MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_style(style, parent, return_value TSRMLS_CC); + mapscript_create_style(style, parent, return_value); } /* }}} */ @@ -442,7 +442,7 @@ PHP_METHOD(labelObj, insertStyle) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &zstyle, mapscript_ce_style, &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -467,7 +467,7 @@ PHP_METHOD(labelObj, removeStyle) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -480,7 +480,7 @@ PHP_METHOD(labelObj, removeStyle) /* Return a copy of the class object just removed */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_style(style, parent, return_value TSRMLS_CC); + mapscript_create_style(style, parent, return_value); } /* }}} */ @@ -493,7 +493,7 @@ PHP_METHOD(labelObj, moveStyleUp) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -517,7 +517,7 @@ PHP_METHOD(labelObj, moveStyleDown) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -541,7 +541,7 @@ PHP_METHOD(labelObj, deleteStyle) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -589,7 +589,7 @@ PHP_METHOD(labelObj, setExpression) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &expression, &expression_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -601,7 +601,7 @@ PHP_METHOD(labelObj, setExpression) status = labelObj_setExpression(php_label->label, expression); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -649,7 +649,7 @@ PHP_METHOD(labelObj, setText) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &text, &text_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -662,7 +662,7 @@ PHP_METHOD(labelObj, setText) status = labelObj_setText(php_label->label, php_layer->layer, text); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -724,7 +724,7 @@ zend_function_entry label_functions[] = }; -void mapscript_create_label(labelObj *label, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_label(labelObj *label, parent_object parent, zval *return_value) { php_label_object * php_label; object_init_ex(return_value, mapscript_ce_label); @@ -740,13 +740,13 @@ void mapscript_create_label(labelObj *la #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_label_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_label_create_object(zend_class_entry *ce) { php_label_object *php_label; php_label = ecalloc(1, sizeof(*php_label) + zend_object_properties_size(ce)); - zend_object_std_init(&php_label->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_label->zobj, ce); object_properties_init(&php_label->zobj, ce); php_label->zobj.handlers = &mapscript_label_object_handlers; @@ -801,7 +801,7 @@ PHP_MINIT_FUNCTION(label) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "labelObj", label_functions); - mapscript_ce_label = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_label = zend_register_internal_class(&ce); mapscript_ce_label->create_object = mapscript_label_create_object; mapscript_ce_label->ce_flags |= ZEND_ACC_FINAL; @@ -815,7 +815,7 @@ PHP_MINIT_FUNCTION(label) } #else /* PHP5 */ -static void mapscript_label_object_destroy(void *object TSRMLS_DC) +static void mapscript_label_object_destroy(void *object) { php_label_object *php_label = (php_label_object *)object; @@ -834,7 +834,7 @@ static void mapscript_label_object_destr efree(object); } -static zend_object_value mapscript_label_object_new_ex(zend_class_entry *ce, php_label_object **ptr TSRMLS_DC) +static zend_object_value mapscript_label_object_new_ex(zend_class_entry *ce, php_label_object **ptr) { zend_object_value retval; php_label_object *php_label; @@ -843,7 +843,7 @@ static zend_object_value mapscript_label retval = mapscript_object_new_ex(&php_label->std, ce, &mapscript_label_object_destroy, - &mapscript_label_object_handlers TSRMLS_CC); + &mapscript_label_object_handlers); if (ptr) *ptr = php_label; @@ -858,20 +858,20 @@ static zend_object_value mapscript_label return retval; } -static zend_object_value mapscript_label_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_label_object_new(zend_class_entry *ce) { - return mapscript_label_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_label_object_new_ex(ce, NULL); } -static zend_object_value mapscript_label_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_label_object_clone(zval *zobj) { php_label_object *php_label_old, *php_label_new; zend_object_value new_ov; php_label_old = MAPSCRIPT_OBJ_P(php_label_object, zobj); - new_ov = mapscript_label_object_new_ex(mapscript_ce_label, &php_label_new TSRMLS_CC); - zend_objects_clone_members(&php_label_new->std, new_ov, &php_label_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_label_object_new_ex(mapscript_ce_label, &php_label_new); + zend_objects_clone_members(&php_label_new->std, new_ov, &php_label_old->std, Z_OBJ_HANDLE_P(zobj)); php_label_new->label = labelObj_clone(php_label_old->label); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/labelcache.c MapServer-rel-7-6-4-new/mapscript/php/labelcache.c --- MapServer-rel-7-6-4/mapscript/php/labelcache.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/labelcache.c 2021-11-23 13:07:29.481506614 +0100 @@ -49,18 +49,18 @@ ZEND_END_ARG_INFO() labelCacheObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(labelCacheObj, __construct) { - mapscript_throw_exception("labelCacheObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("labelCacheObj cannot be constructed"); } /* }}} */ PHP_METHOD(labelCacheObj, __get) { - mapscript_throw_exception("labelCacheObj has no property." TSRMLS_CC); + mapscript_throw_exception("labelCacheObj has no property."); } PHP_METHOD(labelCacheObj, __set) { - mapscript_throw_exception("labelCacheObj has no property." TSRMLS_CC); + mapscript_throw_exception("labelCacheObj has no property."); } /* {{{ proto int labelcache->freeCache(() @@ -95,7 +95,7 @@ zend_function_entry labelcache_functions } }; -void mapscript_create_labelcache(labelCacheObj *labelcache, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_labelcache(labelCacheObj *labelcache, parent_object parent, zval *return_value) { php_labelcache_object * php_labelcache; object_init_ex(return_value, mapscript_ce_labelcache); @@ -109,13 +109,13 @@ void mapscript_create_labelcache(labelCa #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_labelcache_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_labelcache_create_object(zend_class_entry *ce) { php_labelcache_object *php_labelcache; php_labelcache = ecalloc(1, sizeof(*php_labelcache) + zend_object_properties_size(ce)); - zend_object_std_init(&php_labelcache->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_labelcache->zobj, ce); object_properties_init(&php_labelcache->zobj, ce); php_labelcache->zobj.handlers = &mapscript_labelcache_object_handlers; @@ -141,7 +141,7 @@ PHP_MINIT_FUNCTION(labelcache) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "labelcacheObj", labelcache_functions); - mapscript_ce_labelcache = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_labelcache = zend_register_internal_class(&ce); mapscript_ce_labelcache->create_object = mapscript_labelcache_create_object; mapscript_ce_labelcache->ce_flags |= ZEND_ACC_FINAL; @@ -154,7 +154,7 @@ PHP_MINIT_FUNCTION(labelcache) } #else /* PHP5 */ -static void mapscript_labelcache_object_destroy(void *object TSRMLS_DC) +static void mapscript_labelcache_object_destroy(void *object) { php_labelcache_object *php_labelcache = (php_labelcache_object *)object; @@ -167,7 +167,7 @@ static void mapscript_labelcache_object_ efree(object); } -static zend_object_value mapscript_labelcache_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_labelcache_object_new(zend_class_entry *ce) { zend_object_value retval; php_labelcache_object *php_labelcache; @@ -175,7 +175,7 @@ static zend_object_value mapscript_label MAPSCRIPT_ALLOC_OBJECT(php_labelcache, php_labelcache_object); retval = mapscript_object_new(&php_labelcache->std, ce, - &mapscript_labelcache_object_destroy TSRMLS_CC); + &mapscript_labelcache_object_destroy); MAPSCRIPT_INIT_PARENT(php_labelcache->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/labelcachemember.c MapServer-rel-7-6-4-new/mapscript/php/labelcachemember.c --- MapServer-rel-7-6-4/mapscript/php/labelcachemember.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/labelcachemember.c 2021-11-23 13:07:29.481506614 +0100 @@ -49,7 +49,7 @@ ZEND_END_ARG_INFO() labelCacheMemberObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(labelCacheMemberObj, __construct) { - mapscript_throw_exception("labelCacheMemberObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("labelCacheMemberObj cannot be constructed"); } /* }}} */ @@ -61,7 +61,7 @@ PHP_METHOD(labelCacheMemberObj, __get) php_labelcachemember_object *php_labelcachemember; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -84,7 +84,7 @@ PHP_METHOD(labelCacheMemberObj, __get) /* else IF_GET_OBJECT("styles", mapscript_ce_style, php_labelcachemember->styles, php_labelcachemember->labelcachemember->styles) */ /* else IF_GET_OBJECT("poly", mapscript_ce_shape, php_labelcachemember->poly, php_labelcachemember->labelcachemember->poly) */ else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -97,7 +97,7 @@ PHP_METHOD(labelCacheMemberObj, __set) /* php_labelcachemember_object *php_labelcachemember; */ PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -119,9 +119,9 @@ PHP_METHOD(labelCacheMemberObj, __set) /* (STRING_EQUAL("styles", property)) || */ /* (STRING_EQUAL("poly", property)) || */ (STRING_EQUAL("point", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -160,7 +160,7 @@ zend_function_entry labelcachemember_fun void mapscript_create_labelcachemember(labelCacheMemberObj *labelcachemember, - parent_object parent, zval *return_value TSRMLS_DC) + parent_object parent, zval *return_value) { php_labelcachemember_object * php_labelcachemember; object_init_ex(return_value, mapscript_ce_labelcachemember); @@ -174,13 +174,13 @@ void mapscript_create_labelcachemember(l #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_labelcachemember_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_labelcachemember_create_object(zend_class_entry *ce) { php_labelcachemember_object *php_labelcachemember; php_labelcachemember = ecalloc(1, sizeof(*php_labelcachemember) + zend_object_properties_size(ce)); - zend_object_std_init(&php_labelcachemember->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_labelcachemember->zobj, ce); object_properties_init(&php_labelcachemember->zobj, ce); php_labelcachemember->zobj.handlers = &mapscript_labelcachemember_object_handlers; @@ -217,7 +217,7 @@ PHP_MINIT_FUNCTION(labelcachemember) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "labelCacheMemberObj", labelcachemember_functions); - mapscript_ce_labelcachemember = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_labelcachemember = zend_register_internal_class(&ce); mapscript_ce_labelcachemember->create_object = mapscript_labelcachemember_create_object; mapscript_ce_labelcachemember->ce_flags |= ZEND_ACC_FINAL; @@ -231,7 +231,7 @@ PHP_MINIT_FUNCTION(labelcachemember) #else /* PHP5 */ -static void mapscript_labelcachemember_object_destroy(void *object TSRMLS_DC) +static void mapscript_labelcachemember_object_destroy(void *object) { php_labelcachemember_object *php_labelcachemember = (php_labelcachemember_object *)object; @@ -248,7 +248,7 @@ static void mapscript_labelcachemember_o efree(object); } -static zend_object_value mapscript_labelcachemember_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_labelcachemember_object_new(zend_class_entry *ce) { zend_object_value retval; php_labelcachemember_object *php_labelcachemember; @@ -256,7 +256,7 @@ static zend_object_value mapscript_label MAPSCRIPT_ALLOC_OBJECT(php_labelcachemember, php_labelcachemember_object); retval = mapscript_object_new(&php_labelcachemember->std, ce, - &mapscript_labelcachemember_object_destroy TSRMLS_CC); + &mapscript_labelcachemember_object_destroy); MAPSCRIPT_INIT_PARENT(php_labelcachemember->parent); php_labelcachemember->point = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/labelleader.c MapServer-rel-7-6-4-new/mapscript/php/labelleader.c --- MapServer-rel-7-6-4/mapscript/php/labelleader.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/labelleader.c 2021-11-23 13:07:29.482506692 +0100 @@ -47,7 +47,7 @@ ZEND_END_ARG_INFO() labelLeaderObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(labelLeaderObj, __construct) { - mapscript_throw_exception("labelLeaderObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("labelLeaderObj cannot be constructed"); } /* }}} */ @@ -59,7 +59,7 @@ PHP_METHOD(labelLeaderObj, __get) php_labelleader_object *php_labelleader; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -71,7 +71,7 @@ PHP_METHOD(labelLeaderObj, __get) IF_GET_LONG("maxdistance", php_labelleader->labelleader->maxdistance) else IF_GET_LONG("gridstep", php_labelleader->labelleader->gridstep) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -82,7 +82,7 @@ PHP_METHOD(labelLeaderObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -91,9 +91,9 @@ PHP_METHOD(labelLeaderObj, __set) if ( (STRING_EQUAL("maxdistance", property)) || (STRING_EQUAL("gridstep", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -105,7 +105,7 @@ zend_function_entry labelleader_function } }; -void mapscript_create_labelleader(labelLeaderObj *labelleader, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_labelleader(labelLeaderObj *labelleader, parent_object parent, zval *return_value) { php_labelleader_object * php_labelleader; object_init_ex(return_value, mapscript_ce_labelleader); @@ -118,13 +118,13 @@ void mapscript_create_labelleader(labelL #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_labelleader_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_labelleader_create_object(zend_class_entry *ce) { php_labelleader_object *php_labelleader; php_labelleader = ecalloc(1, sizeof(*php_labelleader) + zend_object_properties_size(ce)); - zend_object_std_init(&php_labelleader->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_labelleader->zobj, ce); object_properties_init(&php_labelleader->zobj, ce); php_labelleader->zobj.handlers = &mapscript_labelleader_object_handlers; @@ -152,7 +152,7 @@ PHP_MINIT_FUNCTION(labelleader) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "labelLeaderObj", labelleader_functions); - mapscript_ce_labelleader = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_labelleader = zend_register_internal_class(&ce); mapscript_ce_labelleader->create_object = mapscript_labelleader_create_object; mapscript_ce_labelleader->ce_flags |= ZEND_ACC_FINAL; @@ -166,7 +166,7 @@ PHP_MINIT_FUNCTION(labelleader) #else /* PHP5 */ -static void mapscript_labelleader_object_destroy(void *object TSRMLS_DC) +static void mapscript_labelleader_object_destroy(void *object) { php_labelleader_object *php_labelleader = (php_labelleader_object *)object; @@ -179,7 +179,7 @@ static void mapscript_labelleader_object efree(object); } -static zend_object_value mapscript_labelleader_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_labelleader_object_new(zend_class_entry *ce) { zend_object_value retval; php_labelleader_object *php_labelleader; @@ -187,7 +187,7 @@ static zend_object_value mapscript_label MAPSCRIPT_ALLOC_OBJECT(php_labelleader, php_labelleader_object); retval = mapscript_object_new(&php_labelleader->std, ce, - &mapscript_labelleader_object_destroy TSRMLS_CC); + &mapscript_labelleader_object_destroy); MAPSCRIPT_INIT_PARENT(php_labelleader->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/layer.c MapServer-rel-7-6-4-new/mapscript/php/layer.c --- MapServer-rel-7-6-4/mapscript/php/layer.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/layer.c 2021-11-23 13:07:29.483506770 +0100 @@ -212,7 +212,7 @@ PHP_METHOD(layerObj, __construct) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O", &zmap, mapscript_ce_map, &zlayer, mapscript_ce_layer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -226,7 +226,7 @@ PHP_METHOD(layerObj, __construct) php_layer2 = MAPSCRIPT_OBJ_P(php_layer_object, zlayer); if ((layer = layerObj_new(php_map->map)) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -265,7 +265,7 @@ PHP_METHOD(layerObj, __get) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -329,7 +329,7 @@ PHP_METHOD(layerObj, __get) else IF_GET_OBJECT("cluster", mapscript_ce_cluster, php_layer->cluster, &php_layer->layer->cluster) else IF_GET_OBJECT("projection", mapscript_ce_projection, php_layer->projection, &php_layer->layer->projection) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -342,7 +342,7 @@ PHP_METHOD(layerObj, __set) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -408,13 +408,13 @@ PHP_METHOD(layerObj, __set) (STRING_EQUAL("numjoins", property)) || (STRING_EQUAL("extent", property)) || (STRING_EQUAL("cluster", property)) ) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else if ( (STRING_EQUAL("numclasses", property)) || (STRING_EQUAL("index", property)) || (STRING_EQUAL("connectiontype", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -430,7 +430,7 @@ PHP_METHOD(layerObj, draw) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -441,14 +441,14 @@ PHP_METHOD(layerObj, draw) php_image = MAPSCRIPT_OBJ_P(php_image_object, zimage); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if ((status = layerObj_draw(php_layer->layer, php_map->map, php_image->image)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -466,7 +466,7 @@ PHP_METHOD(layerObj, drawQuery) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -477,14 +477,14 @@ PHP_METHOD(layerObj, drawQuery) php_image = MAPSCRIPT_OBJ_P(php_image_object, zimage); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if ((status = layerObj_drawQuery(php_layer->layer, php_map->map, php_image->image)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -504,7 +504,7 @@ PHP_METHOD(layerObj, queryByPoint) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Old", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Old", &zpoint, mapscript_ce_point, &mode, &buffer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -516,7 +516,7 @@ PHP_METHOD(layerObj, queryByPoint) php_point = MAPSCRIPT_OBJ_P(php_point_object, zpoint); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -524,7 +524,7 @@ PHP_METHOD(layerObj, queryByPoint) if ((status = layerObj_queryByPoint(php_layer->layer, php_map->map, php_point->point, mode, buffer)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -542,7 +542,7 @@ PHP_METHOD(layerObj, queryByRect) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zrect, mapscript_ce_rect) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -553,14 +553,14 @@ PHP_METHOD(layerObj, queryByRect) php_rect = MAPSCRIPT_OBJ_P(php_rect_object, zrect); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if ((status = layerObj_queryByRect(php_layer->layer, php_map->map, *(php_rect->rect))) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -578,7 +578,7 @@ PHP_METHOD(layerObj, queryByShape) php_shape_object *php_shape; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -589,14 +589,14 @@ PHP_METHOD(layerObj, queryByShape) php_shape = MAPSCRIPT_OBJ_P(php_shape_object, zshape); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if ((status = layerObj_queryByShape(php_layer->layer, php_map->map, php_shape->shape)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -613,7 +613,7 @@ PHP_METHOD(layerObj, queryByFeatures) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &slayer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -623,14 +623,14 @@ PHP_METHOD(layerObj, queryByFeatures) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); if ((status = layerObj_queryByFeatures(php_layer->layer, php_map->map, slayer)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -651,7 +651,7 @@ PHP_METHOD(layerObj, queryByAttributes) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssl", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssl", &item, &item_len, &string, &string_len, &mode) == FAILURE) { @@ -663,7 +663,7 @@ PHP_METHOD(layerObj, queryByAttributes) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -671,7 +671,7 @@ PHP_METHOD(layerObj, queryByAttributes) if ((status = layerObj_queryByAttributes(php_layer->layer, php_map->map, item, string, mode)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -689,7 +689,7 @@ PHP_METHOD(layerObj, queryByFilter) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &string, &string_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -699,7 +699,7 @@ PHP_METHOD(layerObj, queryByFilter) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -707,7 +707,7 @@ PHP_METHOD(layerObj, queryByFilter) if ((status = layerObj_queryByFilter(php_layer->layer, php_map->map, string)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -725,7 +725,7 @@ PHP_METHOD(layerObj, queryByIndex) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l", &tileindex, &shapeindex, &addtoquery) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -735,7 +735,7 @@ PHP_METHOD(layerObj, queryByIndex) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -743,7 +743,7 @@ PHP_METHOD(layerObj, queryByIndex) if ((status = layerObj_queryByIndex(php_layer->layer, php_map->map, tileindex, shapeindex, addtoquery)) != MS_SUCCESS) - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } @@ -760,7 +760,7 @@ PHP_METHOD(layerObj, updateFromString) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -770,7 +770,7 @@ PHP_METHOD(layerObj, updateFromString) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if ((status = layerObj_updateFromString(php_layer->layer, snippet)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -816,7 +816,7 @@ PHP_METHOD(layerObj, getClass) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -826,13 +826,13 @@ PHP_METHOD(layerObj, getClass) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if ((class = layerObj_getClass(php_layer->layer, index)) == NULL) { - mapscript_throw_exception("Invalid class index." TSRMLS_CC); + mapscript_throw_exception("Invalid class index."); return; } /* Return class object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_class(class, parent, return_value TSRMLS_CC); + mapscript_create_class(class, parent, return_value); } /* }}} */ @@ -852,7 +852,7 @@ PHP_METHOD(layerObj, getClassIndex) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|a!l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|a!l", &zshape, mapscript_ce_shape, &zclassgroup, &numClasses) == FAILURE) { @@ -865,7 +865,7 @@ PHP_METHOD(layerObj, getClassIndex) php_shape = MAPSCRIPT_OBJ_P(php_shape_object, zshape); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -909,7 +909,7 @@ PHP_METHOD(layerObj, setFilter) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &expression, &expression_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -919,7 +919,7 @@ PHP_METHOD(layerObj, setFilter) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if ((status = layerObj_setFilter(php_layer->layer, expression)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -966,7 +966,7 @@ PHP_METHOD(layerObj, setProjection) php_projection_object *php_projection=NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &projection, &projection_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -978,7 +978,7 @@ PHP_METHOD(layerObj, setProjection) php_projection = MAPSCRIPT_OBJ(php_projection_object, php_layer->projection); if ((status = layerObj_setProjection(php_layer->layer, projection)) != MS_SUCCESS) { - mapscript_report_php_error(E_WARNING, "setProjection failed" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "setProjection failed"); RETURN_LONG(status); } @@ -1028,7 +1028,7 @@ PHP_METHOD(layerObj, setWKTProjection) php_projection_object *php_projection=NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &projection, &projection_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1040,7 +1040,7 @@ PHP_METHOD(layerObj, setWKTProjection) php_projection = MAPSCRIPT_OBJ(php_projection_object, php_layer->projection); if ((status = layerObj_setWKTProjection(php_layer->layer, projection)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1098,7 +1098,7 @@ PHP_METHOD(layerObj, getResultsBounds) /* Return result object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); mapscript_create_rect(&(php_layer->layer->resultcache->bounds), - parent, return_value TSRMLS_CC); + parent, return_value); } /* }}} */ @@ -1113,7 +1113,7 @@ PHP_METHOD(layerObj, getResult) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1123,14 +1123,14 @@ PHP_METHOD(layerObj, getResult) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if ((result = layerObj_getResult(php_layer->layer, index)) == NULL) { - mapscript_throw_exception("Invalid result index." TSRMLS_CC); + mapscript_throw_exception("Invalid result index."); return; } /* Return result object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); mapscript_create_result(&(php_layer->layer->resultcache->results[index]), - parent, return_value TSRMLS_CC); + parent, return_value); } /* }}} */ @@ -1154,7 +1154,7 @@ PHP_METHOD(layerObj, open) status = layerObj_open(php_layer->layer); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(status); } else { msLayerGetItems(php_layer->layer); @@ -1184,7 +1184,7 @@ PHP_METHOD(layerObj, whichShapes) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zrect, mapscript_ce_rect) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1225,7 +1225,7 @@ PHP_METHOD(layerObj, nextShape) /* Return valid object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, php_layer, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, php_layer, return_value); } /* }}} */ @@ -1269,18 +1269,18 @@ PHP_METHOD(layerObj, getExtent) /* Create a new rectObj to hold the result */ if ((rect = rectObj_new()) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new rectObj (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new rectObj (out of memory?)"); return; } if (msLayerGetExtent(php_layer->layer, rect) != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } /* Return rectObj */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_rect(rect, parent, return_value TSRMLS_CC); + mapscript_create_rect(rect, parent, return_value); } /* }}} */ @@ -1293,7 +1293,7 @@ PHP_METHOD(layerObj, setExtent) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "llll", &minx, &miny, &maxx, &maxy) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1302,11 +1302,11 @@ PHP_METHOD(layerObj, setExtent) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (minx > maxx || miny > maxy) { - mapscript_throw_mapserver_exception("Invalid min/max values" TSRMLS_CC); + mapscript_throw_mapserver_exception("Invalid min/max values"); return; } - RETURN_LONG(msLayerSetExtent(php_layer->layer, minx, miny, maxx, maxy)) + RETURN_LONG(msLayerSetExtent(php_layer->layer, minx, miny, maxx, maxy)); } /* }}} */ @@ -1322,7 +1322,7 @@ PHP_METHOD(layerObj, addFeature) php_shape_object *php_shape; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1349,7 +1349,7 @@ PHP_METHOD(layerObj, getMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1364,7 +1364,7 @@ PHP_METHOD(layerObj, getMetaData) #if PHP_VERSION_ID < 70000 RETURN_STRING(Z_STRVAL_P(retval),1); #else - RETURN_STRING(Z_STRVAL(retval)) + RETURN_STRING(Z_STRVAL(retval)); #endif } /* }}} */ @@ -1379,7 +1379,7 @@ PHP_METHOD(layerObj, setMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zname, &zvalue) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1409,7 +1409,7 @@ PHP_METHOD(layerObj, removeMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1442,7 +1442,7 @@ PHP_METHOD(layerObj, getWMSFeatureInfoUR php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "llls", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "llls", &clickx, &clicky, &featureCount, &infoFormat, &infoFormat_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1453,7 +1453,7 @@ PHP_METHOD(layerObj, getWMSFeatureInfoUR php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -1464,7 +1464,7 @@ PHP_METHOD(layerObj, getWMSFeatureInfoUR clicky, featureCount, infoFormat)) == NULL) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } @@ -1512,7 +1512,7 @@ PHP_METHOD(layerObj, setProcessing) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &string, &string_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1546,7 +1546,7 @@ PHP_METHOD(layerObj, setProcessingKey) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &key, &key_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1655,7 +1655,7 @@ PHP_METHOD(layerObj, applySLD) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &sldxml, &sldxml_len, &namedLayer, &namedLayer_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1688,7 +1688,7 @@ PHP_METHOD(layerObj, applySLDURL) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &sldurl, &sldurl_len, &namedLayer, &namedLayer_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1728,7 +1728,7 @@ PHP_METHOD(layerObj, generateSLD) MAPSCRIPT_RETVAL_STRING(buffer, 1); free(buffer); } else { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } } @@ -1745,7 +1745,7 @@ PHP_METHOD(layerObj, moveClassUp) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1771,7 +1771,7 @@ PHP_METHOD(layerObj, moveClassDown) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1798,7 +1798,7 @@ PHP_METHOD(layerObj, removeClass) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1808,13 +1808,13 @@ PHP_METHOD(layerObj, removeClass) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if ((class = layerObj_removeClass(php_layer->layer, index)) == NULL) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } /* Return a copy of the class object just removed */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_class(class, parent, return_value TSRMLS_CC); + mapscript_create_class(class, parent, return_value); } /* }}} */ @@ -1838,7 +1838,7 @@ PHP_METHOD(layerObj, isVisible) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -1862,7 +1862,7 @@ PHP_METHOD(layerObj, setConnectionType) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|s", &type, &plugin, &plugin_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1875,7 +1875,7 @@ PHP_METHOD(layerObj, setConnectionType) if ((status = layerObj_setConnectionType(php_layer->layer, type, plugin)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1916,7 +1916,7 @@ PHP_METHOD(layerObj, getGridIntersection php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zobj); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this layer object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this layer object."); return; } @@ -1926,7 +1926,7 @@ PHP_METHOD(layerObj, getGridIntersection array_init(return_value); if (php_layer->layer->connectiontype != MS_GRATICULE) { - mapscript_throw_exception("Layer is not of graticule type" TSRMLS_CC); + mapscript_throw_exception("Layer is not of graticule type"); return; } @@ -2068,7 +2068,7 @@ PHP_METHOD(layerObj, getShape) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zresult, mapscript_ce_result) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2083,19 +2083,19 @@ PHP_METHOD(layerObj, getShape) * at this point since it will be set by SHPReadShape(). */ if ((shape = shapeObj_new(MS_SHAPE_NULL)) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)"); return; } if (msLayerGetShape(php_layer->layer, shape, php_result->result) != MS_SUCCESS) { shapeObj_destroy(shape); - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return valid object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, php_layer, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, php_layer, return_value); } /* }}} */ @@ -2133,7 +2133,7 @@ PHP_METHOD(layerObj, setGeomTransform) php_layer_object *php_layer; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &transform, &transform_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2242,7 +2242,7 @@ zend_function_entry layer_functions[] = }; -void mapscript_create_layer(layerObj *layer, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_layer(layerObj *layer, parent_object parent, zval *return_value) { php_layer_object * php_layer; object_init_ex(return_value, mapscript_ce_layer); @@ -2267,13 +2267,13 @@ void mapscript_create_layer(layerObj *la #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_layer_create_object(zend_class_entry *ce TSRMLS_DC) +zend_object *mapscript_layer_create_object(zend_class_entry *ce) { php_layer_object *php_layer; php_layer = ecalloc(1, sizeof(*php_layer) + zend_object_properties_size(ce)); - zend_object_std_init(&php_layer->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_layer->zobj, ce); object_properties_init(&php_layer->zobj, ce); php_layer->zobj.handlers = &mapscript_layer_object_handlers; @@ -2291,7 +2291,7 @@ static zend_object *mapscript_layer_crea return &php_layer->zobj; } -static void mapscript_layer_free_object(zend_object *object) +void mapscript_layer_free_object(zend_object *object) { php_layer_object *php_layer; @@ -2314,7 +2314,7 @@ static void mapscript_layer_free_object( zend_object_std_dtor(object); } -static zend_object* mapscript_layer_clone_object(zval *zobj) +zend_object* mapscript_layer_clone_object(zval *zobj) { php_layer_object *php_layer_old, *php_layer_new; zend_object* zobj_new; @@ -2336,7 +2336,7 @@ PHP_MINIT_FUNCTION(layer) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "layerObj", layer_functions); - mapscript_ce_layer = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_layer = zend_register_internal_class(&ce); mapscript_ce_layer->create_object = mapscript_layer_create_object; mapscript_ce_layer->ce_flags |= ZEND_ACC_FINAL; @@ -2350,7 +2350,7 @@ PHP_MINIT_FUNCTION(layer) } #else /* PHP5 */ -static void mapscript_layer_object_destroy(void *object TSRMLS_DC) +static void mapscript_layer_object_destroy(void *object) { php_layer_object *php_layer = (php_layer_object *)object; @@ -2372,7 +2372,7 @@ static void mapscript_layer_object_destr efree(object); } -static zend_object_value mapscript_layer_object_new_ex(zend_class_entry *ce, php_layer_object **ptr TSRMLS_DC) +static zend_object_value mapscript_layer_object_new_ex(zend_class_entry *ce, php_layer_object **ptr) { zend_object_value retval; php_layer_object *php_layer; @@ -2381,7 +2381,7 @@ static zend_object_value mapscript_layer retval = mapscript_object_new_ex(&php_layer->std, ce, &mapscript_layer_object_destroy, - &mapscript_layer_object_handlers TSRMLS_CC); + &mapscript_layer_object_handlers); if (ptr) *ptr = php_layer; @@ -2399,20 +2399,20 @@ static zend_object_value mapscript_layer return retval; } -static zend_object_value mapscript_layer_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_layer_object_new(zend_class_entry *ce) { - return mapscript_layer_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_layer_object_new_ex(ce, NULL); } -static zend_object_value mapscript_layer_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_layer_object_clone(zval *zobj) { php_layer_object *php_layer_old, *php_layer_new; zend_object_value new_ov; php_layer_old = MAPSCRIPT_OBJ_P(php_layer_object, zobj); - new_ov = mapscript_layer_object_new_ex(mapscript_ce_layer, &php_layer_new TSRMLS_CC); - zend_objects_clone_members(&php_layer_new->std, new_ov, &php_layer_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_layer_object_new_ex(mapscript_ce_layer, &php_layer_new); + zend_objects_clone_members(&php_layer_new->std, new_ov, &php_layer_old->std, Z_OBJ_HANDLE_P(zobj)); php_layer_new->layer = layerObj_clone(php_layer_old->layer); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/legend.c MapServer-rel-7-6-4-new/mapscript/php/legend.c --- MapServer-rel-7-6-4/mapscript/php/legend.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/legend.c 2021-11-23 13:07:29.483506770 +0100 @@ -53,7 +53,7 @@ ZEND_END_ARG_INFO() legendObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(legendObj, __construct) { - mapscript_throw_exception("legendObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("legendObj cannot be constructed"); } /* }}} */ @@ -65,7 +65,7 @@ PHP_METHOD(legendObj, __get) php_legend_object *php_legend; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -88,7 +88,7 @@ PHP_METHOD(legendObj, __get) else IF_GET_OBJECT("label", mapscript_ce_label, php_legend->label, &php_legend->legend->label) else IF_GET_OBJECT("imagecolor", mapscript_ce_color, php_legend->imagecolor, &php_legend->legend->imagecolor) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -101,7 +101,7 @@ PHP_METHOD(legendObj, __set) php_legend_object *php_legend; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -123,9 +123,9 @@ PHP_METHOD(legendObj, __set) else if ( (STRING_EQUAL("outlinecolor", property)) || (STRING_EQUAL("imagecolor", property)) || (STRING_EQUAL("label", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -140,7 +140,7 @@ PHP_METHOD(legendObj, updateFromString) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -152,7 +152,7 @@ PHP_METHOD(legendObj, updateFromString) status = legendObj_updateFromString(php_legend->legend, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -220,7 +220,7 @@ zend_function_entry legend_functions[] = } }; -void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value) { php_legend_object * php_legend; object_init_ex(return_value, mapscript_ce_legend); @@ -234,13 +234,13 @@ void mapscript_create_legend(legendObj * #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_legend_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_legend_create_object(zend_class_entry *ce) { php_legend_object *php_legend; php_legend = ecalloc(1, sizeof(*php_legend) + zend_object_properties_size(ce)); - zend_object_std_init(&php_legend->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_legend->zobj, ce); object_properties_init(&php_legend->zobj, ce); php_legend->zobj.handlers = &mapscript_legend_object_handlers; @@ -274,7 +274,7 @@ PHP_MINIT_FUNCTION(legend) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "legendObj", legend_functions); - mapscript_ce_legend = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_legend = zend_register_internal_class(&ce); mapscript_ce_legend->create_object = mapscript_legend_create_object; mapscript_ce_legend->ce_flags |= ZEND_ACC_FINAL; @@ -287,7 +287,7 @@ PHP_MINIT_FUNCTION(legend) } #else /* PHP5 */ -static void mapscript_legend_object_destroy(void *object TSRMLS_DC) +static void mapscript_legend_object_destroy(void *object) { php_legend_object *php_legend = (php_legend_object *)object; @@ -303,7 +303,7 @@ static void mapscript_legend_object_dest efree(object); } -static zend_object_value mapscript_legend_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_legend_object_new(zend_class_entry *ce) { zend_object_value retval; php_legend_object *php_legend; @@ -311,7 +311,7 @@ static zend_object_value mapscript_legen MAPSCRIPT_ALLOC_OBJECT(php_legend, php_legend_object); retval = mapscript_object_new(&php_legend->std, ce, - &mapscript_legend_object_destroy TSRMLS_CC); + &mapscript_legend_object_destroy); MAPSCRIPT_INIT_PARENT(php_legend->parent); php_legend->outlinecolor = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/line.c MapServer-rel-7-6-4-new/mapscript/php/line.c --- MapServer-rel-7-6-4/mapscript/php/line.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/line.c 2021-11-23 13:07:29.484506848 +0100 @@ -90,7 +90,7 @@ PHP_METHOD(lineObj, __construct) php_line = MAPSCRIPT_OBJ_P(php_line_object, getThis()); if ((php_line->line = lineObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct lineObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct lineObj."); return; } } @@ -104,7 +104,7 @@ PHP_METHOD(lineObj, __get) php_line_object *php_line; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -115,7 +115,7 @@ PHP_METHOD(lineObj, __get) IF_GET_LONG("numpoints", php_line->line->numpoints) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -126,7 +126,7 @@ PHP_METHOD(lineObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -134,9 +134,9 @@ PHP_METHOD(lineObj, __set) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if (STRING_EQUAL("numpoints", property)) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -151,7 +151,7 @@ PHP_METHOD(lineObj, add) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zobj_point, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -179,7 +179,7 @@ PHP_METHOD(lineObj, addXY) php_line_object *php_line; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|d", &x, &y, &m) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd|d", &x, &y, &m) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; } @@ -213,7 +213,7 @@ PHP_METHOD(lineObj, addXYZ) php_line_object *php_line; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ddd|d", &x, &y, &z, &m) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -247,7 +247,7 @@ PHP_METHOD(lineObj, project) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &zobj_proj_in, mapscript_ce_projection, &zobj_proj_out, mapscript_ce_projection) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -261,7 +261,7 @@ PHP_METHOD(lineObj, project) status = lineObj_project(php_line->line, php_proj_in->projection, php_proj_out->projection); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -278,7 +278,7 @@ PHP_METHOD(lineObj, point) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &index) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; } @@ -287,12 +287,12 @@ PHP_METHOD(lineObj, point) php_line = MAPSCRIPT_OBJ_P(php_line_object, zobj); if ( (index < 0) || (index >= php_line->line->numpoints)) { - mapscript_throw_exception("Point '%d' does not exist in this object." TSRMLS_CC, index); + mapscript_throw_exception("Point '%d' does not exist in this object.", index); return; } MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_point(&(php_line->line->point[index]), parent, return_value TSRMLS_CC); + mapscript_create_point(&(php_line->line->point[index]), parent, return_value); } /* }}} */ @@ -307,7 +307,7 @@ PHP_METHOD(lineObj, set) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lO", &index, &zobj_point, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -317,7 +317,7 @@ PHP_METHOD(lineObj, set) php_line = MAPSCRIPT_OBJ_P(php_line_object, zobj); if ( (index < 0) || (index >= php_line->line->numpoints)) { - mapscript_throw_exception("Point '%d' does not exist in this object." TSRMLS_CC, index); + mapscript_throw_exception("Point '%d' does not exist in this object.", index); return; } @@ -346,7 +346,7 @@ zend_function_entry line_functions[] = { }; -void mapscript_create_line(lineObj *line, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_line(lineObj *line, parent_object parent, zval *return_value) { php_line_object * php_line; object_init_ex(return_value, mapscript_ce_line); @@ -362,13 +362,13 @@ void mapscript_create_line(lineObj *line #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_line_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_line_create_object(zend_class_entry *ce) { php_line_object *php_line; php_line = ecalloc(1, sizeof(*php_line) + zend_object_properties_size(ce)); - zend_object_std_init(&php_line->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_line->zobj, ce); object_properties_init(&php_line->zobj, ce); php_line->zobj.handlers = &mapscript_line_object_handlers; @@ -416,7 +416,7 @@ PHP_MINIT_FUNCTION(line) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "lineObj", line_functions); - mapscript_ce_line = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_line = zend_register_internal_class(&ce); mapscript_ce_line->create_object = mapscript_line_create_object; mapscript_ce_line->ce_flags |= ZEND_ACC_FINAL; @@ -430,7 +430,7 @@ PHP_MINIT_FUNCTION(line) } #else /* PHP5 */ -static void mapscript_line_object_destroy(void *object TSRMLS_DC) +static void mapscript_line_object_destroy(void *object) { php_line_object *php_line = (php_line_object *)object; @@ -445,7 +445,7 @@ static void mapscript_line_object_destro efree(object); } -static zend_object_value mapscript_line_object_new_ex(zend_class_entry *ce, php_line_object **ptr TSRMLS_DC) +static zend_object_value mapscript_line_object_new_ex(zend_class_entry *ce, php_line_object **ptr) { zend_object_value retval; php_line_object *php_line; @@ -454,7 +454,7 @@ static zend_object_value mapscript_line_ retval = mapscript_object_new_ex(&php_line->std, ce, &mapscript_line_object_destroy, - &mapscript_line_object_handlers TSRMLS_CC); + &mapscript_line_object_handlers); if (ptr) *ptr = php_line; @@ -465,20 +465,20 @@ static zend_object_value mapscript_line_ return retval; } -static zend_object_value mapscript_line_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_line_object_new(zend_class_entry *ce) { - return mapscript_line_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_line_object_new_ex(ce, NULL); } -static zend_object_value mapscript_line_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_line_object_clone(zval *zobj) { php_line_object *php_line_old, *php_line_new; zend_object_value new_ov; php_line_old = MAPSCRIPT_OBJ_P(php_line_object, zobj); - new_ov = mapscript_line_object_new_ex(mapscript_ce_line, &php_line_new TSRMLS_CC); - zend_objects_clone_members(&php_line_new->std, new_ov, &php_line_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_line_object_new_ex(mapscript_ce_line, &php_line_new); + zend_objects_clone_members(&php_line_new->std, new_ov, &php_line_old->std, Z_OBJ_HANDLE_P(zobj)); php_line_new->line = lineObj_clone(php_line_old->line); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/map.c MapServer-rel-7-6-4-new/mapscript/php/map.c --- MapServer-rel-7-6-4/mapscript/php/map.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/map.c 2021-11-23 13:07:29.485506926 +0100 @@ -35,7 +35,7 @@ zend_class_entry *mapscript_ce_map; zend_object_handlers mapscript_map_object_handlers; static int mapscript_map_setProjection(int isWKTProj, php_map_object *php_map, - char *projString, int setUnitsAndExtents TSRMLS_DC); + char *projString, int setUnitsAndExtents); ZEND_BEGIN_ARG_INFO_EX(map___construct_args, 0, 0, 1) ZEND_ARG_INFO(0, mapFileName) @@ -331,7 +331,7 @@ PHP_METHOD(mapObj, __construct) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &filename, &filename_len, &path, &path_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -344,7 +344,7 @@ PHP_METHOD(mapObj, __construct) map = mapObj_new(filename, path); if (map == NULL) { - mapscript_throw_mapserver_exception("Failed to open map file %s" TSRMLS_CC, filename); + mapscript_throw_mapserver_exception("Failed to open map file %s", filename); return; } @@ -360,7 +360,7 @@ PHP_METHOD(mapObj, __get) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -406,7 +406,7 @@ PHP_METHOD(mapObj, __get) else IF_GET_OBJECT("projection", mapscript_ce_projection, php_map->projection, &php_map->map->projection) else IF_GET_OBJECT("metadata", mapscript_ce_hashtable, php_map->metadata, &php_map->map->web.metadata) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -419,7 +419,7 @@ PHP_METHOD(mapObj, __set) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -458,16 +458,16 @@ PHP_METHOD(mapObj, __set) (STRING_EQUAL("metadata", property)) || (STRING_EQUAL("configoptions", property)) || (STRING_EQUAL("imagecolor", property)) ) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else if ( (STRING_EQUAL("numlayers", property)) || (STRING_EQUAL("symbolsetfilename", property)) || (STRING_EQUAL("imagetype", property)) || (STRING_EQUAL("numoutputformats", property)) || (STRING_EQUAL("mappath", property)) || (STRING_EQUAL("fontsetfilename", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -482,7 +482,7 @@ PHP_METHOD(mapObj, getSymbolByName) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &symbolName, &symbolName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -509,7 +509,7 @@ PHP_METHOD(mapObj, getSymbolObjectById) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &symbolId) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -519,7 +519,7 @@ PHP_METHOD(mapObj, getSymbolObjectById) php_map = MAPSCRIPT_OBJ_P(php_map_object, zobj); if ( symbolId < 0 || symbolId >= php_map->map->symbolset.numsymbols) { - mapscript_throw_exception("Invalid symbol index." TSRMLS_CC); + mapscript_throw_exception("Invalid symbol index."); return; } @@ -527,7 +527,7 @@ PHP_METHOD(mapObj, getSymbolObjectById) /* Return style object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_symbol(symbol, parent, return_value TSRMLS_CC); + mapscript_create_symbol(symbol, parent, return_value); } /* }}} */ @@ -570,13 +570,13 @@ PHP_METHOD(mapObj, prepareImage) image = mapObj_prepareImage(php_map->map); if (image == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return an image object */ - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -599,11 +599,11 @@ PHP_METHOD(mapObj, draw) image = mapObj_draw(php_map->map); if (image == NULL) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -626,11 +626,11 @@ PHP_METHOD(mapObj, drawQuery) image = mapObj_drawQuery(php_map->map); if (image == NULL) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -653,12 +653,12 @@ PHP_METHOD(mapObj, drawLegend) image = mapObj_drawLegend(php_map->map); if (image == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -681,12 +681,12 @@ PHP_METHOD(mapObj, drawReferenceMap) image = mapObj_drawReferenceMap(php_map->map); if (image == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -709,12 +709,12 @@ PHP_METHOD(mapObj, drawScaleBar) image = mapObj_drawScalebar(php_map->map); if (image == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ @@ -729,7 +729,7 @@ PHP_METHOD(mapObj, embedLegend) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -741,7 +741,7 @@ PHP_METHOD(mapObj, embedLegend) retval = mapObj_embedLegend(php_map->map, php_image->image); if ( (retval == MS_FAILURE) || (retval == -1) ) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -761,7 +761,7 @@ PHP_METHOD(mapObj, embedScaleBar) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -773,7 +773,7 @@ PHP_METHOD(mapObj, embedScaleBar) retval = mapObj_embedScalebar(php_map->map, php_image->image); if ( (retval == MS_FAILURE) || (retval == -1) ) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -793,7 +793,7 @@ PHP_METHOD(mapObj, drawLabelCache) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -805,7 +805,7 @@ PHP_METHOD(mapObj, drawLabelCache) retval = mapObj_drawLabelCache(php_map->map, php_image->image); if ( (retval == MS_FAILURE) || (retval == -1) ) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -825,7 +825,7 @@ PHP_METHOD(mapObj, getLayer) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -836,14 +836,14 @@ PHP_METHOD(mapObj, getLayer) layer = mapObj_getLayer(php_map->map, index); if (layer == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return layer object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_layer(layer, parent, return_value TSRMLS_CC); + mapscript_create_layer(layer, parent, return_value); } /* }}} */ @@ -859,7 +859,7 @@ PHP_METHOD(mapObj, getLayerByName) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &layerName, &layerName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -870,13 +870,13 @@ PHP_METHOD(mapObj, getLayerByName) layer = mapObj_getLayerByName(php_map->map, layerName); if (layer == NULL) { - mapscript_report_php_error(E_WARNING, "getLayerByName failed for : %s\n" TSRMLS_CC, layerName); + mapscript_report_php_error(E_WARNING, "getLayerByName failed for : %s\n", layerName); RETURN_NULL(); } /* Return layer object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_layer(layer, parent, return_value TSRMLS_CC); + mapscript_create_layer(layer, parent, return_value); } /* }}} */ @@ -893,7 +893,7 @@ PHP_METHOD(mapObj, getColorByIndex) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -909,13 +909,13 @@ PHP_METHOD(mapObj, getColorByIndex) color.green = palette.colors[index].green; color.blue = palette.colors[index].blue; } else { - mapscript_throw_mapserver_exception("Index should not be higher than %d\n" TSRMLS_CC, palette.numcolors-1); + mapscript_throw_mapserver_exception("Index should not be higher than %d\n", palette.numcolors-1); return; } /* Return color object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_color(&color, parent, return_value TSRMLS_CC); + mapscript_create_color(&color, parent, return_value); } /* }}} */ @@ -929,7 +929,7 @@ PHP_METHOD(mapObj, setExtent) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dddd", &minx, &miny, &maxx, &maxy) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -943,7 +943,7 @@ PHP_METHOD(mapObj, setExtent) maxx, maxy); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -962,7 +962,7 @@ PHP_METHOD(mapObj, setCenter) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zpoint, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -974,7 +974,7 @@ PHP_METHOD(mapObj, setCenter) status = mapObj_setCenter(php_map->map, php_point->point); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -991,7 +991,7 @@ PHP_METHOD(mapObj, offsetExtent) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd", &x, &y) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1002,7 +1002,7 @@ PHP_METHOD(mapObj, offsetExtent) status = mapObj_offsetExtent(php_map->map, x, y); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1020,7 +1020,7 @@ PHP_METHOD(mapObj, scaleExtent) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ddd", &zoomFactor, &minScaleDenom, &maxScaleDenom) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1031,7 +1031,7 @@ PHP_METHOD(mapObj, scaleExtent) status = mapObj_scaleExtent(php_map->map, zoomFactor, minScaleDenom, maxScaleDenom); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1051,7 +1051,7 @@ PHP_METHOD(mapObj, setRotation) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &angle) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1062,7 +1062,7 @@ PHP_METHOD(mapObj, setRotation) status = mapObj_setRotation(php_map->map, angle); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1081,7 +1081,7 @@ PHP_METHOD(mapObj, setSize) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &width, &height) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1092,7 +1092,7 @@ PHP_METHOD(mapObj, setSize) status = msMapSetSize(php_map->map, width, height); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1117,7 +1117,7 @@ PHP_METHOD(mapObj, zoomPoint) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lOllO|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lOllO|O", &zoomFactor, &zpoint, mapscript_ce_point, &width, &height, @@ -1143,7 +1143,7 @@ PHP_METHOD(mapObj, zoomPoint) php_geoRefExtent->rect == NULL || php_pixelPosition->point == NULL || (zmaxGeoRefExtent && php_maxGeoRefExtent->rect == NULL)) { - mapscript_throw_mapserver_exception("Incorrect parameters\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Incorrect parameters\n"); return; } @@ -1151,21 +1151,21 @@ PHP_METHOD(mapObj, zoomPoint) /* check if the values passed are consistent min > max. */ /* -------------------------------------------------------------------- */ if (php_geoRefExtent->rect->minx >= php_geoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n"); return; } if (php_geoRefExtent->rect->miny >= php_geoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n"); return; } if (zmaxGeoRefExtent) { if (php_maxGeoRefExtent->rect->minx >= php_maxGeoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n"); return; } if (php_maxGeoRefExtent->rect->miny >= php_maxGeoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n"); return; } } @@ -1218,7 +1218,7 @@ PHP_METHOD(mapObj, zoomPoint) if (msCalculateScale(newGeoRefExtent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &dfNewScale) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1312,7 +1312,7 @@ PHP_METHOD(mapObj, zoomPoint) if (msCalculateScale(php_map->map->extent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &(php_map->map->scaledenom)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1337,7 +1337,7 @@ PHP_METHOD(mapObj, zoomRectangle) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OllO|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OllO|O", &zpixelExtent , mapscript_ce_rect, &width, &height, &zgeoRefExtent , mapscript_ce_rect, @@ -1362,7 +1362,7 @@ PHP_METHOD(mapObj, zoomRectangle) php_geoRefExtent->rect == NULL || php_pixelExtent->rect == NULL || (zmaxGeoRefExtent && php_maxGeoRefExtent->rect == NULL)) { - mapscript_throw_mapserver_exception("Incorrect parameters\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Incorrect parameters\n"); return; } @@ -1370,20 +1370,20 @@ PHP_METHOD(mapObj, zoomRectangle) /* check if the values passed are consistent min > max. */ /* -------------------------------------------------------------------- */ if (php_geoRefExtent->rect->minx >= php_geoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n"); return; } if (php_geoRefExtent->rect->miny >= php_geoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n"); return; } if (zmaxGeoRefExtent) { if (php_maxGeoRefExtent->rect->minx >= php_maxGeoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n"); return; } if (php_maxGeoRefExtent->rect->miny >= php_maxGeoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n"); return; } } @@ -1411,7 +1411,7 @@ PHP_METHOD(mapObj, zoomRectangle) if (msCalculateScale(newGeoRefExtent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &dfNewScale) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1502,7 +1502,7 @@ PHP_METHOD(mapObj, zoomRectangle) if (msCalculateScale(php_map->map->extent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &(php_map->map->scaledenom)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1531,7 +1531,7 @@ PHP_METHOD(mapObj, zoomScale) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dOllO|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dOllO|O", &scaleDenom, &zpoint, mapscript_ce_point, &width, &height, @@ -1557,7 +1557,7 @@ PHP_METHOD(mapObj, zoomScale) php_geoRefExtent->rect == NULL || php_pixelPosition->point == NULL || (zmaxGeoRefExtent && php_maxGeoRefExtent->rect == NULL)) { - mapscript_throw_mapserver_exception("Incorrect parameters\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Incorrect parameters\n"); return; } @@ -1565,20 +1565,20 @@ PHP_METHOD(mapObj, zoomScale) /* check if the values passed are consistent min > max. */ /* -------------------------------------------------------------------- */ if (php_geoRefExtent->rect->minx >= php_geoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates minx >= maxx\n"); return; } if (php_geoRefExtent->rect->miny >= php_geoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Georeferenced coordinates miny >= maxy\n"); return; } if (zmaxGeoRefExtent) { if (php_maxGeoRefExtent->rect->minx >= php_maxGeoRefExtent->rect->maxx) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates minx >= maxx\n"); return; } if (php_maxGeoRefExtent->rect->miny >= php_maxGeoRefExtent->rect->maxy) { - mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n" TSRMLS_CC); + mapscript_throw_mapserver_exception("Max Georeferenced coordinates miny >= maxy\n"); return; } } @@ -1624,7 +1624,7 @@ PHP_METHOD(mapObj, zoomScale) if (msCalculateScale(*php_geoRefExtent->rect, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &dfCurrentScale) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1640,7 +1640,7 @@ PHP_METHOD(mapObj, zoomScale) if (msCalculateScale(newGeoRefExtent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &dfNewScale) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1735,7 +1735,7 @@ PHP_METHOD(mapObj, zoomScale) if (msCalculateScale(php_map->map->extent, php_map->map->units, php_map->map->width, php_map->map->height, php_map->map->resolution, &(php_map->map->scaledenom)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1765,7 +1765,7 @@ PHP_METHOD(mapObj, queryByPoint) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Old", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Old", &zpoint, mapscript_ce_point, &mode, &buffer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1778,7 +1778,7 @@ PHP_METHOD(mapObj, queryByPoint) status = mapObj_queryByPoint(php_map->map, php_point->point, mode, buffer); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1795,7 +1795,7 @@ PHP_METHOD(mapObj, queryByRect) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zrect, mapscript_ce_rect) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1807,7 +1807,7 @@ PHP_METHOD(mapObj, queryByRect) status = mapObj_queryByRect(php_map->map, *(php_rect->rect)); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1831,7 +1831,7 @@ PHP_METHOD(mapObj, queryByShape) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1843,7 +1843,7 @@ PHP_METHOD(mapObj, queryByShape) status = mapObj_queryByShape(php_map->map, php_shape->shape); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1859,7 +1859,7 @@ PHP_METHOD(mapObj, queryByFeatures) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &slayer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1870,7 +1870,7 @@ PHP_METHOD(mapObj, queryByFeatures) status = mapObj_queryByFeatures(php_map->map, slayer); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1896,7 +1896,7 @@ PHP_METHOD(mapObj, queryByIndex) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll|l", &layerIndex, &tileIndex, &shapeIndex, &addToQuery) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -1911,7 +1911,7 @@ PHP_METHOD(mapObj, queryByIndex) shapeIndex, addToQuery); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1928,7 +1928,7 @@ PHP_METHOD(mapObj, queryByFilter) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &string, &string_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1939,7 +1939,7 @@ PHP_METHOD(mapObj, queryByFilter) status = mapObj_queryByFilter(php_map->map, string); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -1958,7 +1958,7 @@ PHP_METHOD(mapObj, saveQuery) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &filename, &filename_len, &results) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1986,7 +1986,7 @@ PHP_METHOD(mapObj, saveQueryAsGML) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &filename, &filename_len, &namespace, &namespace_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2012,7 +2012,7 @@ PHP_METHOD(mapObj, loadQuery) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2037,7 +2037,7 @@ PHP_METHOD(mapObj, freeQuery) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &qlayer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2063,7 +2063,7 @@ PHP_METHOD(mapObj, save) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2074,7 +2074,7 @@ PHP_METHOD(mapObj, save) status = mapObj_save(php_map->map, filename); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -2095,7 +2095,7 @@ PHP_METHOD(mapObj, setProjection) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &projection, &projection_len, &setUnitsAndExtents) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2105,7 +2105,7 @@ PHP_METHOD(mapObj, setProjection) php_map = MAPSCRIPT_OBJ_P(php_map_object, zobj); status = mapscript_map_setProjection(MS_FALSE, php_map, - projection, setUnitsAndExtents TSRMLS_CC); + projection, setUnitsAndExtents); RETURN_LONG(status); } /* }}} */ @@ -2149,7 +2149,7 @@ PHP_METHOD(mapObj, setWKTProjection) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &projection, &projection_len, &setUnitsAndExtents) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2159,7 +2159,7 @@ PHP_METHOD(mapObj, setWKTProjection) php_map = MAPSCRIPT_OBJ_P(php_map_object, zobj); status = mapscript_map_setProjection(MS_TRUE, php_map, - projection, setUnitsAndExtents TSRMLS_CC); + projection, setUnitsAndExtents); RETURN_LONG(status); } /* }}} */ @@ -2174,7 +2174,7 @@ PHP_METHOD(mapObj, getMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2204,7 +2204,7 @@ PHP_METHOD(mapObj, setMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &zname, &zvalue) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2234,7 +2234,7 @@ PHP_METHOD(mapObj, removeMetaData) MAPSCRIPT_ZVAL retval; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &zname) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2267,7 +2267,7 @@ PHP_METHOD(mapObj, getLayersIndexByGroup php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &groupName, &groupName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2364,7 +2364,7 @@ PHP_METHOD(mapObj, moveLayerUp) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2389,7 +2389,7 @@ PHP_METHOD(mapObj, moveLayerDown) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2467,7 +2467,7 @@ PHP_METHOD(mapObj, setLayersDrawingOrder php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &zindexes) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2526,7 +2526,7 @@ PHP_METHOD(mapObj, processTemplate) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "al", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "al", &zindexes, &generateImages) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2560,7 +2560,7 @@ PHP_METHOD(mapObj, processTemplate) } else { // Failed for some reason - mapscript_report_php_error(E_WARNING, "processTemplate: failed reading array" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "processTemplate: failed reading array"); MAPSCRIPT_RETURN_STRING("", 1); } efree(papszNameValue); @@ -2575,7 +2575,7 @@ PHP_METHOD(mapObj, processTemplate) MAPSCRIPT_RETVAL_STRING(buffer, 1); free(buffer); } else { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } } @@ -2598,7 +2598,7 @@ PHP_METHOD(mapObj, processQueryTemplate) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "a|l", &zindexes, &generateImages) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2633,7 +2633,7 @@ PHP_METHOD(mapObj, processQueryTemplate) } else { // Failed for some reason - mapscript_report_php_error(E_WARNING, "processQueryTemplate: failed reading array" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "processQueryTemplate: failed reading array"); MAPSCRIPT_RETURN_STRING("", 1); } efree(papszNameValue); @@ -2649,7 +2649,7 @@ PHP_METHOD(mapObj, processQueryTemplate) MAPSCRIPT_RETVAL_STRING(buffer, 1); free(buffer); } else { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } } @@ -2671,7 +2671,7 @@ PHP_METHOD(mapObj, processLegendTemplate php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &zindexes) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2706,7 +2706,7 @@ PHP_METHOD(mapObj, processLegendTemplate } else { // Failed for some reason - mapscript_report_php_error(E_WARNING, "processLegendTemplate: failed reading array" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "processLegendTemplate: failed reading array"); MAPSCRIPT_RETURN_STRING("", 1); } efree(papszNameValue); @@ -2722,7 +2722,7 @@ PHP_METHOD(mapObj, processLegendTemplate MAPSCRIPT_RETVAL_STRING(buffer, 1); free(buffer); } else { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } } @@ -2738,7 +2738,7 @@ PHP_METHOD(mapObj, setSymbolSet) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2750,7 +2750,7 @@ PHP_METHOD(mapObj, setSymbolSet) if(filename_len > 0) { if ((status = mapObj_setSymbolSet(php_map->map, filename)) != 0) { - mapscript_throw_mapserver_exception("Failed loading symbolset from %s" TSRMLS_CC, + mapscript_throw_mapserver_exception("Failed loading symbolset from %s", filename); return; } @@ -2791,7 +2791,7 @@ PHP_METHOD(mapObj, setFontSet) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2803,7 +2803,7 @@ PHP_METHOD(mapObj, setFontSet) if(filename_len > 0) { if ((status = mapObj_setFontSet(php_map->map, filename)) != 0) { - mapscript_throw_mapserver_exception("Failed loading fontset from %s" TSRMLS_CC, + mapscript_throw_mapserver_exception("Failed loading fontset from %s", filename); return; } @@ -2825,7 +2825,7 @@ PHP_METHOD(mapObj, selectOutputFormat) php_outputformat_object *php_outputformat = NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &type, &type_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2840,7 +2840,7 @@ PHP_METHOD(mapObj, selectOutputFormat) type)) != MS_SUCCESS) { - mapscript_report_php_error(E_WARNING, "Unable to set output format to '%s'" TSRMLS_CC, + mapscript_report_php_error(E_WARNING, "Unable to set output format to '%s'", type); } else if (ZVAL_NOT_UNDEF(php_map->outputformat)) { php_outputformat->outputformat = php_map->map->outputformat; @@ -2861,7 +2861,7 @@ PHP_METHOD(mapObj, appendOutputFormat) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zoutputformat, mapscript_ce_outputformat) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2888,7 +2888,7 @@ PHP_METHOD(mapObj, removeOutputFormat) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2900,7 +2900,7 @@ PHP_METHOD(mapObj, removeOutputFormat) if ((status = msRemoveOutputFormat(php_map->map, name)) != MS_SUCCESS) { - mapscript_report_php_error(E_WARNING, "Unable to remove output format to '%s'" TSRMLS_CC, + mapscript_report_php_error(E_WARNING, "Unable to remove output format to '%s'", name); } @@ -2918,7 +2918,7 @@ PHP_METHOD(mapObj, getOutputFormat) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2928,13 +2928,13 @@ PHP_METHOD(mapObj, getOutputFormat) php_map = MAPSCRIPT_OBJ_P(php_map_object, zobj); if (index < 0 || index >= php_map->map->numoutputformats) { - mapscript_throw_mapserver_exception("Invalid outputformat index." TSRMLS_CC); + mapscript_throw_mapserver_exception("Invalid outputformat index."); return; } MAPSCRIPT_MAKE_PARENT(zobj, NULL); mapscript_create_outputformat(php_map->map->outputformatlist[index], - parent, return_value TSRMLS_CC); + parent, return_value); } /* }}} */ @@ -2948,7 +2948,7 @@ PHP_METHOD(mapObj, saveMapContext) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2959,8 +2959,8 @@ PHP_METHOD(mapObj, saveMapContext) if(filename_len > 0) { if ((status = mapObj_saveMapContext(php_map->map, filename)) != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); - mapscript_report_php_error(E_WARNING, "Failed saving map context from %s" TSRMLS_CC, + mapscript_report_mapserver_error(E_WARNING); + mapscript_report_php_error(E_WARNING, "Failed saving map context from %s", filename); RETURN_LONG(MS_FAILURE); } @@ -2981,7 +2981,7 @@ PHP_METHOD(mapObj, loadMapContext) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|l", &filename, &filename_len, &unique) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -2992,8 +2992,8 @@ PHP_METHOD(mapObj, loadMapContext) if(filename_len > 0) { if ((status = mapObj_loadMapContext(php_map->map, filename, unique)) != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); - mapscript_report_php_error(E_WARNING, "Failed loading map context from %s" TSRMLS_CC, + mapscript_report_mapserver_error(E_WARNING); + mapscript_report_php_error(E_WARNING, "Failed loading map context from %s", filename); RETURN_LONG(MS_FAILURE); } @@ -3014,7 +3014,7 @@ PHP_METHOD(mapObj, applySLD) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &sldxml, &sldxml_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3041,7 +3041,7 @@ PHP_METHOD(mapObj, applySLDURL) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &sldurl, &sldurl_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3079,7 +3079,7 @@ PHP_METHOD(mapObj, generateSLD) MAPSCRIPT_RETVAL_STRING(buffer, 1); free(buffer); } else { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); MAPSCRIPT_RETURN_STRING("", 1); } } @@ -3098,7 +3098,7 @@ PHP_METHOD(mapObj, getConfigOption) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &key, &key_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3127,7 +3127,7 @@ PHP_METHOD(mapObj, setConfigOption) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &key, &key_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3177,7 +3177,7 @@ PHP_METHOD(mapObj, loadOwsParameters) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|s", &zrequest, mapscript_ce_owsrequest, &version, &version_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -3213,7 +3213,7 @@ PHP_METHOD(mapObj, owsDispatch) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zrequest, mapscript_ce_owsrequest) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3241,7 +3241,7 @@ PHP_METHOD(mapObj, insertLayer) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|l", &zlayer, mapscript_ce_layer, &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3253,7 +3253,7 @@ PHP_METHOD(mapObj, insertLayer) if ((retval = mapObj_insertLayer(php_map->map, php_layer->layer, index)) < 0) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -3274,7 +3274,7 @@ PHP_METHOD(mapObj, removeLayer) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3284,13 +3284,13 @@ PHP_METHOD(mapObj, removeLayer) php_map = MAPSCRIPT_OBJ_P(php_map_object, zobj); if ((layer = mapObj_removeLayer(php_map->map, index)) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* return layer object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_layer(layer, parent, return_value TSRMLS_CC); + mapscript_create_layer(layer, parent, return_value); } /* }}} */ @@ -3307,7 +3307,7 @@ PHP_METHOD(mapObj, getLabel) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -3323,7 +3323,7 @@ PHP_METHOD(mapObj, getLabel) /* Return labelCacheMember object */ MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_labelcachemember(labelCacheMember, parent, return_value TSRMLS_CC); + mapscript_create_labelcachemember(labelCacheMember, parent, return_value); } /* }}} */ #endif @@ -3391,7 +3391,7 @@ PHP_METHOD(mapObj, getLatLongExtent) /* Return rectObj */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_rect(&geoRefExt, parent, return_value TSRMLS_CC); + mapscript_create_rect(&geoRefExt, parent, return_value); } /* {{{ proto int map.free(). @@ -3514,7 +3514,7 @@ zend_function_entry map_functions[] = { }; static int mapscript_map_setProjection(int isWKTProj, php_map_object *php_map, - char *projString, int setUnitsAndExtents TSRMLS_DC) + char *projString, int setUnitsAndExtents) { int status = MS_SUCCESS; int units = MS_METERS; @@ -3553,7 +3553,7 @@ static int mapscript_map_setProjection(i status = mapObj_setProjection(php_map->map, projString); if (status == -1) { - mapscript_report_php_error(E_WARNING, "setProjection failed" TSRMLS_CC); + mapscript_report_php_error(E_WARNING, "setProjection failed"); return MS_FAILURE; } else if (ZVAL_NOT_UNDEF(php_map->projection)) { php_projection->projection = &(php_map->map->projection); @@ -3582,7 +3582,7 @@ static int mapscript_map_setProjection(i return MS_SUCCESS; } -void mapscript_create_map(mapObj *map, zval *return_value TSRMLS_DC) +void mapscript_create_map(mapObj *map, zval *return_value) { php_map_object * php_map; object_init_ex(return_value, mapscript_ce_map); @@ -3592,13 +3592,13 @@ void mapscript_create_map(mapObj *map, z #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_map_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_map_create_object(zend_class_entry *ce) { php_map_object *php_map; php_map = ecalloc(1, sizeof(*php_map) + zend_object_properties_size(ce)); - zend_object_std_init(&php_map->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_map->zobj, ce); object_properties_init(&php_map->zobj, ce); php_map->zobj.handlers = &mapscript_map_object_handlers; @@ -3669,7 +3669,7 @@ PHP_MINIT_FUNCTION(map) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "mapObj", map_functions); - mapscript_ce_map = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_map = zend_register_internal_class(&ce); mapscript_ce_map->create_object = mapscript_map_create_object; mapscript_ce_map->ce_flags |= ZEND_ACC_FINAL; @@ -3683,7 +3683,7 @@ PHP_MINIT_FUNCTION(map) } #else /* PHP5 */ -static void mapscript_map_object_destroy(void *object TSRMLS_DC) +static void mapscript_map_object_destroy(void *object) { php_map_object *php_map = (php_map_object *)object; @@ -3708,7 +3708,7 @@ static void mapscript_map_object_destroy efree(object); } -static zend_object_value mapscript_map_object_new_ex(zend_class_entry *ce, php_map_object **ptr TSRMLS_DC) +static zend_object_value mapscript_map_object_new_ex(zend_class_entry *ce, php_map_object **ptr) { zend_object_value retval; php_map_object *php_map; @@ -3717,7 +3717,7 @@ static zend_object_value mapscript_map_o retval = mapscript_object_new_ex(&php_map->std, ce, &mapscript_map_object_destroy, - &mapscript_map_object_handlers TSRMLS_CC); + &mapscript_map_object_handlers); if (ptr) *ptr = php_map; @@ -3740,20 +3740,20 @@ static zend_object_value mapscript_map_o return retval; } -static zend_object_value mapscript_map_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_map_object_new(zend_class_entry *ce) { - return mapscript_map_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_map_object_new_ex(ce, NULL); } -static zend_object_value mapscript_map_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_map_object_clone(zval *zobj) { php_map_object *php_map_old, *php_map_new; zend_object_value new_ov; php_map_old = MAPSCRIPT_OBJ_P(php_map_object, zobj); - new_ov = mapscript_map_object_new_ex(mapscript_ce_map, &php_map_new TSRMLS_CC); - zend_objects_clone_members(&php_map_new->std, new_ov, &php_map_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_map_object_new_ex(mapscript_ce_map, &php_map_new); + zend_objects_clone_members(&php_map_new->std, new_ov, &php_map_old->std, Z_OBJ_HANDLE_P(zobj)); php_map_new->map = mapObj_clone(php_map_old->map); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/mapscript_error.c MapServer-rel-7-6-4-new/mapscript/php/mapscript_error.c --- MapServer-rel-7-6-4/mapscript/php/mapscript_error.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/mapscript_error.c 2021-11-23 13:07:29.486507003 +0100 @@ -38,9 +38,9 @@ zend_class_entry *mapscript_ce_mapscriptexception; #if PHP_VERSION_ID >= 70000 -zend_object* mapscript_throw_exception(char *format TSRMLS_DC, ...) +zend_object* mapscript_throw_exception(char *format, ...) #else -zval* mapscript_throw_exception(char *format TSRMLS_DC, ...) +zval* mapscript_throw_exception(char *format, ...) #endif { va_list args; @@ -49,13 +49,13 @@ zval* mapscript_throw_exception(char *fo //prevent buffer overflow vsnprintf(message, MESSAGELENGTH, format, args); va_end(args); - return zend_throw_exception(mapscript_ce_mapscriptexception, message, 0 TSRMLS_CC); + return zend_throw_exception(mapscript_ce_mapscriptexception, message, 0); } #if PHP_VERSION_ID >= 70000 -zend_object* mapscript_throw_mapserver_exception(char *format TSRMLS_DC, ...) +zend_object* mapscript_throw_mapserver_exception(char *format, ...) #else -zval* mapscript_throw_mapserver_exception(char *format TSRMLS_DC, ...) +zval* mapscript_throw_mapserver_exception(char *format, ...) #endif { va_list args; @@ -65,7 +65,7 @@ zval* mapscript_throw_mapserver_exceptio ms_error = msGetErrorObj(); while (ms_error && ms_error->code != MS_NOERR) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, + php_error_docref(NULL, E_WARNING, "[MapServer Error]: %s: %s\n", ms_error->routine, ms_error->message); ms_error = ms_error->next; @@ -76,10 +76,10 @@ zval* mapscript_throw_mapserver_exceptio vsnprintf(message, MESSAGELENGTH, format, args); va_end(args); //prevent format string attack - return mapscript_throw_exception("%s", message TSRMLS_CC); + return mapscript_throw_exception("%s", message); } -void mapscript_report_php_error(int error_type, char *format TSRMLS_DC, ...) +void mapscript_report_php_error(int error_type, char *format, ...) { va_list args; char message[MESSAGELENGTH]; @@ -87,17 +87,17 @@ void mapscript_report_php_error(int erro //prevent buffer overflow vsnprintf(message, MESSAGELENGTH, format, args); va_end(args); - php_error_docref(NULL TSRMLS_CC, error_type, "%s,", message); + php_error_docref(NULL, error_type, "%s,", message); } -void mapscript_report_mapserver_error(int error_type TSRMLS_DC) +void mapscript_report_mapserver_error(int error_type) { errorObj *ms_error; ms_error = msGetErrorObj(); while (ms_error && ms_error->code != MS_NOERR) { - php_error_docref(NULL TSRMLS_CC, error_type, + php_error_docref(NULL, error_type, "[MapServer Error]: %s: %s\n", ms_error->routine, ms_error->message); ms_error = ms_error->next; @@ -111,9 +111,9 @@ PHP_MINIT_FUNCTION(mapscript_error) INIT_CLASS_ENTRY(ce, "MapScriptException", NULL); #if PHP_VERSION_ID >= 70000 - mapscript_ce_mapscriptexception = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C)); + mapscript_ce_mapscriptexception = zend_register_internal_class_ex(&ce, zend_exception_get_default()); #else - mapscript_ce_mapscriptexception = zend_register_internal_class_ex(&ce, zend_exception_get_default(TSRMLS_C), "Exception" TSRMLS_CC); + mapscript_ce_mapscriptexception = zend_register_internal_class_ex(&ce, zend_exception_get_default(), "Exception"); #endif return SUCCESS; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/outputformat.c MapServer-rel-7-6-4-new/mapscript/php/outputformat.c --- MapServer-rel-7-6-4/mapscript/php/outputformat.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/outputformat.c 2021-11-23 13:07:29.486507003 +0100 @@ -75,7 +75,7 @@ PHP_METHOD(outputFormatObj, __construct) long name_len = 0; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &driver, &driver_len, &name, &name_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -85,7 +85,7 @@ PHP_METHOD(outputFormatObj, __construct) php_outputformat = MAPSCRIPT_OBJ_P(php_outputformat_object, zobj); if ((php_outputformat->outputformat = outputFormatObj_new(driver, name)) == NULL) { - mapscript_throw_exception("Unable to construct outputFormatObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct outputFormatObj."); return; } } @@ -99,7 +99,7 @@ PHP_METHOD(outputFormatObj, __get) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -119,7 +119,7 @@ PHP_METHOD(outputFormatObj, __get) else IF_GET_LONG("bands", php_outputformat->outputformat->bands) else IF_GET_LONG("numformatoptions", php_outputformat->outputformat->numformatoptions) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -132,7 +132,7 @@ PHP_METHOD(outputFormatObj, __set) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -150,11 +150,11 @@ PHP_METHOD(outputFormatObj, __set) else IF_SET_LONG("transparent", php_outputformat->outputformat->transparent, value) else if ( (STRING_EQUAL("bands", property)) || (STRING_EQUAL("numformatoptions", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -170,7 +170,7 @@ PHP_METHOD(outputFormatObj, setOption) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &property, &property_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -197,7 +197,7 @@ PHP_METHOD(outputFormatObj, getOption) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -233,7 +233,7 @@ PHP_METHOD(outputFormatObj, validate) status = msOutputFormatValidate(php_outputformat->outputformat, MS_TRUE); if (status != MS_TRUE) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_LONG(MS_FAILURE); } else RETURN_LONG(MS_SUCCESS); @@ -249,7 +249,7 @@ PHP_METHOD(outputFormatObj, getOptionByI php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -259,7 +259,7 @@ PHP_METHOD(outputFormatObj, getOptionByI php_outputformat = MAPSCRIPT_OBJ_P(php_outputformat_object, zobj); if (index < 0 || index >= php_outputformat->outputformat->numformatoptions) { - mapscript_throw_mapserver_exception("Invalid format option index." TSRMLS_CC); + mapscript_throw_mapserver_exception("Invalid format option index."); return; } @@ -280,7 +280,7 @@ zend_function_entry outputformat_functio } }; -void mapscript_create_outputformat(outputFormatObj *outputformat, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_outputformat(outputFormatObj *outputformat, parent_object parent, zval *return_value) { php_outputformat_object * php_outputformat; object_init_ex(return_value, mapscript_ce_outputformat); @@ -296,13 +296,13 @@ void mapscript_create_outputformat(outpu #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_outputformat_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_outputformat_create_object(zend_class_entry *ce) { php_outputformat_object *php_outputformat; php_outputformat = ecalloc(1, sizeof(*php_outputformat) + zend_object_properties_size(ce)); - zend_object_std_init(&php_outputformat->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_outputformat->zobj, ce); object_properties_init(&php_outputformat->zobj, ce); php_outputformat->zobj.handlers = &mapscript_outputformat_object_handlers; @@ -333,7 +333,7 @@ PHP_MINIT_FUNCTION(outputformat) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "outputFormatObj", outputformat_functions); - mapscript_ce_outputformat = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_outputformat = zend_register_internal_class(&ce); mapscript_ce_outputformat->create_object = mapscript_outputformat_create_object; mapscript_ce_outputformat->ce_flags |= ZEND_ACC_FINAL; @@ -347,7 +347,7 @@ PHP_MINIT_FUNCTION(outputformat) #else /* PHP5 */ -static void mapscript_outputformat_object_destroy(void *object TSRMLS_DC) +static void mapscript_outputformat_object_destroy(void *object) { php_outputformat_object *php_outputformat = (php_outputformat_object *)object; @@ -362,7 +362,7 @@ static void mapscript_outputformat_objec efree(object); } -static zend_object_value mapscript_outputformat_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_outputformat_object_new(zend_class_entry *ce) { zend_object_value retval; php_outputformat_object *php_outputformat; @@ -370,7 +370,7 @@ static zend_object_value mapscript_outpu MAPSCRIPT_ALLOC_OBJECT(php_outputformat, php_outputformat_object); retval = mapscript_object_new(&php_outputformat->std, ce, - &mapscript_outputformat_object_destroy TSRMLS_CC); + &mapscript_outputformat_object_destroy); php_outputformat->is_ref = 0; MAPSCRIPT_INIT_PARENT(php_outputformat->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/owsrequest.c MapServer-rel-7-6-4-new/mapscript/php/owsrequest.c --- MapServer-rel-7-6-4/mapscript/php/owsrequest.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/owsrequest.c 2021-11-23 13:07:29.493507548 +0100 @@ -92,7 +92,7 @@ PHP_METHOD(OWSRequestObj, __construct) php_owsrequest = MAPSCRIPT_OBJ_P(php_owsrequest_object, zobj); if ((request = cgirequestObj_new()) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -108,7 +108,7 @@ PHP_METHOD(OWSRequestObj, __get) php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -124,7 +124,7 @@ PHP_METHOD(OWSRequestObj, __get) else IF_GET_STRING("httpcookiedata", php_owsrequest->cgirequest->httpcookiedata) else IF_GET_LONG("type", php_owsrequest->cgirequest->type) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -135,7 +135,7 @@ PHP_METHOD(OWSRequestObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -147,9 +147,9 @@ PHP_METHOD(OWSRequestObj, __set) (STRING_EQUAL("contenttype", property)) || (STRING_EQUAL("postrequest", property)) || (STRING_EQUAL("httpcookiedata", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -184,7 +184,7 @@ PHP_METHOD(OWSRequestObj, loadParams) if (SG(request_info).request_method && STRING_EQUAL(SG(request_info).request_method, "GET")) { #if PHP_VERSION_ID >= 70000 - zend_is_auto_global_str("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC); + zend_is_auto_global_str("_SERVER", sizeof("_SERVER")-1); if ( !Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER]) && ((val = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), "QUERY_STRING", sizeof("QUERY_STRING")-1)) != NULL) && (Z_TYPE_P(val) == IS_STRING) && @@ -192,7 +192,7 @@ PHP_METHOD(OWSRequestObj, loadParams) cgirequestObj_loadParams(php_owsrequest->cgirequest, owsrequest_getenv, NULL, 0, thread_context); } #else - zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC); + zend_is_auto_global("_SERVER", sizeof("_SERVER")-1); if ( PG(http_globals)[TRACK_VARS_SERVER] && (zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, "QUERY_STRING", sizeof("QUERY_STRING"), (void **) &val) == SUCCESS) && (Z_TYPE_PP(val) == IS_STRING) && @@ -257,7 +257,7 @@ PHP_METHOD(OWSRequestObj, setParameter) php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -284,7 +284,7 @@ PHP_METHOD(OWSRequestObj, addParameter) php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &name, &name_len, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -309,7 +309,7 @@ PHP_METHOD(OWSRequestObj, getName) php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -336,7 +336,7 @@ PHP_METHOD(OWSRequestObj, getValue) php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -364,7 +364,7 @@ PHP_METHOD(OWSRequestObj, getValueByName php_owsrequest_object *php_owsrequest; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &name, &name_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -425,7 +425,7 @@ char *owsrequest_getenv(const char *name } return Z_STRVAL_P(cookie_result); } else { - zend_is_auto_global("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC); + zend_is_auto_global("_SERVER", sizeof("_SERVER")-1); if ( PG(http_globals)[TRACK_VARS_SERVER] && (zend_hash_find(PG(http_globals)[TRACK_VARS_SERVER]->value.ht, name, strlen(name)+1, (void **) &val) == SUCCESS) && (Z_TYPE_PP(val) == IS_STRING)) { @@ -447,7 +447,6 @@ char *owsrequest_getenv(const char *name zend_ulong num_key; size_t len, sum = 0; int i = 0; - TSRMLS_FETCH_FROM_CTX(thread_context); if (STRING_EQUAL(name, "HTTP_COOKIE")) { cookies = Z_ARRVAL(PG(http_globals)[TRACK_VARS_COOKIE]); @@ -472,7 +471,7 @@ char *owsrequest_getenv(const char *name else return ""; } else { - zend_is_auto_global_str("_SERVER", sizeof("_SERVER")-1 TSRMLS_CC); + zend_is_auto_global_str("_SERVER", sizeof("_SERVER")-1); if ( (!Z_ISUNDEF(PG(http_globals)[TRACK_VARS_SERVER])) && ((val = zend_hash_str_find(Z_ARRVAL(PG(http_globals)[TRACK_VARS_SERVER]), name, strlen(name))) != NULL) && (Z_TYPE_P(val) == IS_STRING)) { @@ -484,7 +483,7 @@ char *owsrequest_getenv(const char *name } #endif -void mapscript_create_owsrequest(cgiRequestObj *cgirequest, zval *return_value TSRMLS_DC) +void mapscript_create_owsrequest(cgiRequestObj *cgirequest, zval *return_value) { php_owsrequest_object * php_owsrequest; object_init_ex(return_value, mapscript_ce_owsrequest); @@ -494,13 +493,13 @@ void mapscript_create_owsrequest(cgiRequ #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_owsrequest_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_owsrequest_create_object(zend_class_entry *ce) { php_owsrequest_object *php_owsrequest; php_owsrequest = ecalloc(1, sizeof(*php_owsrequest) + zend_object_properties_size(ce)); - zend_object_std_init(&php_owsrequest->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_owsrequest->zobj, ce); object_properties_init(&php_owsrequest->zobj, ce); php_owsrequest->zobj.handlers = &mapscript_owsrequest_object_handlers; @@ -524,7 +523,7 @@ PHP_MINIT_FUNCTION(owsrequest) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "OWSRequestObj", owsrequest_functions); - mapscript_ce_owsrequest = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_owsrequest = zend_register_internal_class(&ce); mapscript_ce_owsrequest->create_object = mapscript_owsrequest_create_object; mapscript_ce_owsrequest->ce_flags |= ZEND_ACC_FINAL; @@ -537,7 +536,7 @@ PHP_MINIT_FUNCTION(owsrequest) } #else /* PHP5 */ -static void mapscript_owsrequest_object_destroy(void *object TSRMLS_DC) +static void mapscript_owsrequest_object_destroy(void *object) { php_owsrequest_object *php_owsrequest = (php_owsrequest_object *)object; @@ -548,7 +547,7 @@ static void mapscript_owsrequest_object_ efree(object); } -static zend_object_value mapscript_owsrequest_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_owsrequest_object_new(zend_class_entry *ce) { zend_object_value retval; php_owsrequest_object *php_owsrequest; @@ -556,7 +555,7 @@ static zend_object_value mapscript_owsre MAPSCRIPT_ALLOC_OBJECT(php_owsrequest, php_owsrequest_object); retval = mapscript_object_new(&php_owsrequest->std, ce, - &mapscript_owsrequest_object_destroy TSRMLS_CC); + &mapscript_owsrequest_object_destroy); return retval; } diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/php_mapscript.c MapServer-rel-7-6-4-new/mapscript/php/php_mapscript.c --- MapServer-rel-7-6-4/mapscript/php/php_mapscript.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/php_mapscript.c 2021-11-23 13:07:29.487507081 +0100 @@ -128,7 +128,7 @@ PHP_FUNCTION(ms_newMapObj) mapObj *map = NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &filename, &filename_len, &path, &path_len) == FAILURE) { return; @@ -139,11 +139,11 @@ PHP_FUNCTION(ms_newMapObj) map = mapObj_new(filename, path); if (map == NULL) { - mapscript_throw_mapserver_exception("Failed to open map file \"%s\", or map file error." TSRMLS_CC, filename); + mapscript_throw_mapserver_exception("Failed to open map file \"%s\", or map file error.", filename); return; } - mapscript_create_map(map, return_value TSRMLS_CC); + mapscript_create_map(map, return_value); } /* }}} */ @@ -158,7 +158,7 @@ PHP_FUNCTION(ms_newMapObjFromString) mapObj *map = NULL; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|s", &string, &string_len, &path, &path_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -169,11 +169,11 @@ PHP_FUNCTION(ms_newMapObjFromString) map = mapObj_newFromString(string, path); if (map == NULL) { - mapscript_throw_mapserver_exception("Error while loading map file from string." TSRMLS_CC); + mapscript_throw_mapserver_exception("Error while loading map file from string."); return; } - mapscript_create_map(map, return_value TSRMLS_CC); + mapscript_create_map(map, return_value); } /* }}} */ @@ -189,7 +189,7 @@ PHP_FUNCTION(ms_newLayerObj) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O", &zmap, mapscript_ce_map, &zlayer, mapscript_ce_layer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -202,7 +202,7 @@ PHP_FUNCTION(ms_newLayerObj) php_layer = MAPSCRIPT_OBJ_P(php_layer_object, zlayer); if ((layer = layerObj_new(php_map->map)) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -215,7 +215,7 @@ PHP_FUNCTION(ms_newLayerObj) } MAPSCRIPT_MAKE_PARENT(zmap, NULL); - mapscript_create_layer(layer, parent, return_value TSRMLS_CC); + mapscript_create_layer(layer, parent, return_value); } /* }}} */ @@ -229,7 +229,7 @@ PHP_FUNCTION(ms_newProjectionObj) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &projString, &projString_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -237,12 +237,12 @@ PHP_FUNCTION(ms_newProjectionObj) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ((projection = projectionObj_new(projString)) == NULL) { - mapscript_throw_mapserver_exception("Unable to construct projectionObj." TSRMLS_CC); + mapscript_throw_mapserver_exception("Unable to construct projectionObj."); return; } MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_projection(projection, parent, return_value TSRMLS_CC); + mapscript_create_projection(projection, parent, return_value); } /* }}} */ @@ -263,7 +263,7 @@ PHP_FUNCTION(ms_newRectObj) php_rect = MAPSCRIPT_OBJ_P(php_rect_object, return_value); if ((php_rect->rect = rectObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct rectObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct rectObj."); return; } } @@ -284,7 +284,7 @@ PHP_FUNCTION(ms_newPointObj) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ((point = pointObj_new()) == NULL) { - mapscript_throw_mapserver_exception("Unable to construct pointObj." TSRMLS_CC); + mapscript_throw_mapserver_exception("Unable to construct pointObj."); return; } @@ -297,7 +297,7 @@ PHP_FUNCTION(ms_newPointObj) /* Return point object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(point, parent, return_value TSRMLS_CC); + mapscript_create_point(point, parent, return_value); } /* {{{ proto lineObj ms_newLineObj() @@ -317,7 +317,7 @@ PHP_FUNCTION(ms_newLineObj) php_line = MAPSCRIPT_OBJ_P(php_line_object, return_value); if ((php_line->line = lineObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct lineObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct lineObj."); return; } } @@ -334,7 +334,7 @@ PHP_FUNCTION(ms_newStyleObj) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O", &zclass, mapscript_ce_class, &zstyle, mapscript_ce_style) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -347,13 +347,13 @@ PHP_FUNCTION(ms_newStyleObj) php_style = MAPSCRIPT_OBJ_P(php_style_object, zstyle); if ((style = styleObj_new(php_class->class, (zstyle ? php_style->style : NULL))) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return point object */ MAPSCRIPT_MAKE_PARENT(zclass, NULL); - mapscript_create_style(style, parent, return_value TSRMLS_CC); + mapscript_create_style(style, parent, return_value); } /* {{{ proto classObj ms_newClassObj(layerObj layer [, classObj class]) @@ -367,7 +367,7 @@ PHP_FUNCTION(ms_newClassObj) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O|O", &zlayer, mapscript_ce_layer, &zclass, mapscript_ce_class) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -381,12 +381,12 @@ PHP_FUNCTION(ms_newClassObj) if ((class = classObj_new(php_layer->layer, (zclass ? php_class->class:NULL))) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } MAPSCRIPT_MAKE_PARENT(zlayer, NULL); - mapscript_create_class(class, parent, return_value TSRMLS_CC); + mapscript_create_class(class, parent, return_value); } /* }}} */ @@ -401,7 +401,7 @@ PHP_FUNCTION(ms_newSymbolObj) php_map_object *php_map; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &zmap, mapscript_ce_map, &symbolName, &symbolName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -425,7 +425,7 @@ PHP_FUNCTION(ms_newShapeObj) long type; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &type) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -436,7 +436,7 @@ PHP_FUNCTION(ms_newShapeObj) php_shape = MAPSCRIPT_OBJ_P(php_shape_object, return_value); if ((php_shape->shape = shapeObj_new(type)) == NULL) { - mapscript_throw_exception("Unable to construct shapeObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct shapeObj."); return; } @@ -454,7 +454,7 @@ PHP_FUNCTION(ms_shapeObjFromWkt) long str_len = 0; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &wkt, &str_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -465,7 +465,7 @@ PHP_FUNCTION(ms_shapeObjFromWkt) php_shape = MAPSCRIPT_OBJ_P(php_shape_object, return_value); if ((php_shape->shape = msShapeFromWKT(wkt)) == NULL) { - mapscript_throw_exception("Unable to construct shapeObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct shapeObj."); return; } @@ -484,7 +484,7 @@ PHP_FUNCTION(ms_newShapeFileObj) shapefileObj *shapefile; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &filename, &filename_len, &type) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -493,11 +493,11 @@ PHP_FUNCTION(ms_newShapeFileObj) shapefile = shapefileObj_new(filename, type); if (shapefile == NULL) { - mapscript_throw_mapserver_exception("Failed to open shapefile %s" TSRMLS_CC, filename); + mapscript_throw_mapserver_exception("Failed to open shapefile %s", filename); return; } - mapscript_create_shapefile(shapefile, return_value TSRMLS_CC); + mapscript_create_shapefile(shapefile, return_value); } /* }}} */ @@ -513,12 +513,12 @@ PHP_FUNCTION(ms_newOWSRequestObj) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ((request = cgirequestObj_new()) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return owsrequest object */ - mapscript_create_owsrequest(request, return_value TSRMLS_CC); + mapscript_create_owsrequest(request, return_value); } /* {{{ proto gridObj ms_newGridObj(layerObj layer) @@ -531,7 +531,7 @@ PHP_FUNCTION(ms_newGridObj) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zlayer, mapscript_ce_layer) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -554,7 +554,7 @@ PHP_FUNCTION(ms_newGridObj) php_grid = MAPSCRIPT_OBJ(php_grid_object, php_layer->grid); php_grid->parent.child_ptr = NULL; #if PHP_VERSION_ID < 70000 - zend_objects_store_del_ref(php_layer->grid TSRMLS_CC); + zend_objects_store_del_ref(php_layer->grid); #else MAPSCRIPT_DELREF(php_layer->grid); #endif @@ -564,12 +564,12 @@ PHP_FUNCTION(ms_newGridObj) MAPSCRIPT_MAKE_PARENT(zlayer, &php_layer->grid); #if PHP_VERSION_ID < 70000 - mapscript_create_grid((graticuleObj *)(php_layer->layer->grid), parent, php_layer->grid TSRMLS_CC); - zend_objects_store_add_ref(php_layer->grid TSRMLS_CC); + mapscript_create_grid((graticuleObj *)(php_layer->layer->grid), parent, php_layer->grid); + zend_objects_store_add_ref(php_layer->grid); *return_value = *(php_layer->grid); #else - mapscript_create_grid((graticuleObj *)(php_layer->layer->grid), parent, &php_layer->grid TSRMLS_CC); + mapscript_create_grid((graticuleObj *)(php_layer->layer->grid), parent, &php_layer->grid); ZVAL_COPY_VALUE(return_value, &php_layer->grid); #endif @@ -590,12 +590,12 @@ PHP_FUNCTION(ms_GetErrorObj) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ((error = msGetErrorObj()) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } /* Return error object */ - mapscript_create_error(error, return_value TSRMLS_CC); + mapscript_create_error(error, return_value); } /* }}} */ @@ -729,7 +729,7 @@ PHP_FUNCTION(ms_ioGetStdoutBufferBytes) buf->data_len = 0; buf->data = NULL; - php_write(gdBuf.data, gdBuf.size TSRMLS_CC); + php_write(gdBuf.data, gdBuf.size); /* return the gdBuf.size, which is the "really used length" of the msIOBuffer */ RETURN_LONG(gdBuf.size); @@ -849,7 +849,7 @@ PHP_FUNCTION(ms_getScale) double dfScale = 0.0; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ollld", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ollld", &zgeoRefExt, mapscript_ce_rect, &width, &height, &unit, &resolution) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -860,7 +860,7 @@ PHP_FUNCTION(ms_getScale) php_geoRefExt = MAPSCRIPT_OBJ_P(php_rect_object, zgeoRefExt); if (msCalculateScale(*(php_geoRefExt->rect), unit, width, height, resolution, &dfScale) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -886,7 +886,7 @@ PHP_FUNCTION(ms_tokenizeMap) PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -894,7 +894,7 @@ PHP_FUNCTION(ms_tokenizeMap) PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); if ((tokens = msTokenizeMap(filename, &numtokens)) == NULL) { - mapscript_throw_mapserver_exception("Failed tokenizing map file %s" TSRMLS_CC, + mapscript_throw_mapserver_exception("Failed tokenizing map file %s", filename); return; } else { @@ -990,7 +990,7 @@ PHP_MINIT_FUNCTION(mapscript) /* Init MapServer resources */ if (msSetup() != MS_SUCCESS) { - mapscript_report_php_error(E_ERROR, "msSetup(): MapScript initialization failed." TSRMLS_CC); + mapscript_report_php_error(E_ERROR, "msSetup(): MapScript initialization failed."); return FAILURE; } diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/php_mapscript.h MapServer-rel-7-6-4-new/mapscript/php/php_mapscript.h --- MapServer-rel-7-6-4/mapscript/php/php_mapscript.h 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/php_mapscript.h 2021-11-23 13:07:29.487507081 +0100 @@ -101,8 +101,8 @@ #define MAPSCRIPT_ZVAL zval* #define MAPSCRIPT_ZVAL_P zval** -#define MAPSCRIPT_OBJ_P(t, o) (t *) zend_object_store_get_object(o TSRMLS_CC) -#define MAPSCRIPT_OBJ(t, o) (t *) zend_object_store_get_object(o TSRMLS_CC) +#define MAPSCRIPT_OBJ_P(t, o) (t *) zend_object_store_get_object(o) +#define MAPSCRIPT_OBJ(t, o) (t *) zend_object_store_get_object(o) #define MAPSCRIPT_RETURN_STRINGL(a, b, c) RETURN_STRINGL(a, b, c) #define MAPSCRIPT_RETURN_STRING(a, b) RETURN_STRING(a, b) #define MAPSCRIPT_RETVAL_STRING(a, b) RETVAL_STRING(a, b) @@ -131,7 +131,7 @@ extern zend_module_entry mapscript_modul #ifndef zend_parse_parameters_none #define zend_parse_parameters_none() \ - zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") + zend_parse_parameters(ZEND_NUM_ARGS(), "") #endif /* it looks like that macro is not always defined: ticket #3926 */ @@ -146,19 +146,19 @@ extern zend_module_entry mapscript_modul #define PHP_MAPSCRIPT_ERROR_HANDLING(force_exceptions) \ zend_error_handling error_handling; \ if(force_exceptions || getThis()) { \ - zend_replace_error_handling(EH_THROW, mapscript_ce_mapscriptexception, &error_handling TSRMLS_CC); \ + zend_replace_error_handling(EH_THROW, mapscript_ce_mapscriptexception, &error_handling); \ } #define PHP_MAPSCRIPT_RESTORE_ERRORS(force_exceptions) \ if(force_exceptions || getThis()) { \ - zend_restore_error_handling(&error_handling TSRMLS_CC); \ + zend_restore_error_handling(&error_handling); \ } #else /* 5.2 versions of the macros */ #define PHP_MAPSCRIPT_ERROR_HANDLING(force_exceptions) \ if(force_exceptions || getThis()) { \ - php_set_error_handling(EH_THROW, mapscript_ce_mapscriptexception TSRMLS_CC); \ + php_set_error_handling(EH_THROW, mapscript_ce_mapscriptexception); \ } #define PHP_MAPSCRIPT_RESTORE_ERRORS(force_exceptions) \ @@ -773,66 +773,66 @@ extern zend_class_entry *mapscript_ce_cl #if PHP_VERSION_ID < 70000 /* PHP Object constructors */ extern zend_object_value mapscript_object_new(zend_object *zobj, zend_class_entry *ce, - void (*zend_objects_free_object) TSRMLS_DC); + void (*zend_objects_free_object)); extern zend_object_value mapscript_object_new_ex(zend_object *zobj, zend_class_entry *ce, void (*zend_objects_free_object), - zend_object_handlers *object_handlers TSRMLS_DC); + zend_object_handlers *object_handlers); #endif /* PHP_VERSION_ID < 70000 */ extern void mapscript_fetch_object(zend_class_entry *ce, zval* zval_parent, php_layer_object* layer, - void *internal_object, MAPSCRIPT_ZVAL_P php_object_storage TSRMLS_DC); -extern void mapscript_create_color(colorObj *color, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_rect(rectObj *rect, parent_object php_parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_hashtable(hashTableObj *hashtable, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_label(labelObj *label, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_style(styleObj *style, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_symbol(symbolObj *symbol, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_class(classObj *class, parent_object parent, zval *return_value TSRMLS_DC); + void *internal_object, MAPSCRIPT_ZVAL_P php_object_storage); +extern void mapscript_create_color(colorObj *color, parent_object parent, zval *return_value); +extern void mapscript_create_rect(rectObj *rect, parent_object php_parent, zval *return_value); +extern void mapscript_create_hashtable(hashTableObj *hashtable, parent_object parent, zval *return_value); +extern void mapscript_create_label(labelObj *label, parent_object parent, zval *return_value); +extern void mapscript_create_style(styleObj *style, parent_object parent, zval *return_value); +extern void mapscript_create_symbol(symbolObj *symbol, parent_object parent, zval *return_value); +extern void mapscript_create_class(classObj *class, parent_object parent, zval *return_value); #ifdef disabled extern void mapscript_create_labelcachemember(labelCacheMemberObj *labelcachemember, - parent_object parent, zval *return_value TSRMLS_DC); + parent_object parent, zval *return_value); extern void mapscript_create_labelcache(labelCacheObj *labelcache, - parent_object parent, zval *return_value TSRMLS_DC); + parent_object parent, zval *return_value); #endif extern void mapscript_create_labelleader(labelLeaderObj *labelleader, - parent_object parent, zval *return_value TSRMLS_DC); + parent_object parent, zval *return_value); extern void mapscript_create_result(resultObj *result, - parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_scalebar(scalebarObj *scalebar, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_owsrequest(cgiRequestObj *cgirequest, zval *return_value TSRMLS_DC); -extern void mapscript_create_image(imageObj *image, zval *return_value TSRMLS_DC); -extern void mapscript_create_web(webObj *web, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_outputformat(outputFormatObj *outputformat, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_querymap(queryMapObj *querymap, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_error(errorObj *error, zval *return_value TSRMLS_DC); -extern void mapscript_create_referencemap(referenceMapObj *referenceMap, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_point(pointObj *point, parent_object parent, zval *return_value TSRMLS_DC); + parent_object parent, zval *return_value); +extern void mapscript_create_scalebar(scalebarObj *scalebar, parent_object parent, zval *return_value); +extern void mapscript_create_owsrequest(cgiRequestObj *cgirequest, zval *return_value); +extern void mapscript_create_image(imageObj *image, zval *return_value); +extern void mapscript_create_web(webObj *web, parent_object parent, zval *return_value); +extern void mapscript_create_legend(legendObj *legend, parent_object parent, zval *return_value); +extern void mapscript_create_outputformat(outputFormatObj *outputformat, parent_object parent, zval *return_value); +extern void mapscript_create_querymap(queryMapObj *querymap, parent_object parent, zval *return_value); +extern void mapscript_create_grid(graticuleObj *grid, parent_object parent, zval *return_value); +extern void mapscript_create_error(errorObj *error, zval *return_value); +extern void mapscript_create_referencemap(referenceMapObj *referenceMap, parent_object parent, zval *return_value); +extern void mapscript_create_point(pointObj *point, parent_object parent, zval *return_value); extern void mapscript_create_projection(projectionObj *projection, - parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_line(lineObj *line, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_shape(shapeObj *shape, parent_object parent, php_layer_object *php_layer, zval *return_value TSRMLS_DC); -extern void mapscript_create_shapefile(shapefileObj *shapefile, zval *return_value TSRMLS_DC); -extern void mapscript_create_layer(layerObj *layer, parent_object parent, zval *return_value TSRMLS_DC); -extern void mapscript_create_map(mapObj *map, zval *return_value TSRMLS_DC); -extern void mapscript_create_cluster(clusterObj *cluster, parent_object php_parent, zval *return_value TSRMLS_DC); + parent_object parent, zval *return_value); +extern void mapscript_create_line(lineObj *line, parent_object parent, zval *return_value); +extern void mapscript_create_shape(shapeObj *shape, parent_object parent, php_layer_object *php_layer, zval *return_value); +extern void mapscript_create_shapefile(shapefileObj *shapefile, zval *return_value); +extern void mapscript_create_layer(layerObj *layer, parent_object parent, zval *return_value); +extern void mapscript_create_map(mapObj *map, zval *return_value); +extern void mapscript_create_cluster(clusterObj *cluster, parent_object php_parent, zval *return_value); /* Exported functions for PHP Mapscript API */ /* throw a MapScriptException */ #if PHP_VERSION_ID >= 70000 -extern zend_object * mapscript_throw_exception(char *format TSRMLS_DC, ...); +extern zend_object * mapscript_throw_exception(char *format, ...); #else -extern zval * mapscript_throw_exception(char *format TSRMLS_DC, ...); +extern zval * mapscript_throw_exception(char *format, ...); #endif /* print all MapServer errors (as Warning) and throw a MapScriptException */ #if PHP_VERSION_ID >= 70000 -extern zend_object* mapscript_throw_mapserver_exception(char *format TSRMLS_DC, ...); +extern zend_object* mapscript_throw_mapserver_exception(char *format, ...); #else -extern zval* mapscript_throw_mapserver_exception(char *format TSRMLS_DC, ...); +extern zval* mapscript_throw_mapserver_exception(char *format, ...); #endif -extern void mapscript_report_mapserver_error(int error_type TSRMLS_DC); -extern void mapscript_report_php_error(int error_type, char *format TSRMLS_DC, ...); +extern void mapscript_report_mapserver_error(int error_type); +extern void mapscript_report_php_error(int error_type, char *format, ...); /*===================================================================== * Internal functions from mapscript_i.c diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/php_mapscript_util.c MapServer-rel-7-6-4-new/mapscript/php/php_mapscript_util.c --- MapServer-rel-7-6-4/mapscript/php/php_mapscript_util.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/php_mapscript_util.c 2021-11-23 13:07:29.488507159 +0100 @@ -34,7 +34,7 @@ #if PHP_VERSION_ID < 70000 zend_object_value mapscript_object_new(zend_object *zobj, zend_class_entry *ce, - void (*zend_objects_free_object) TSRMLS_DC) + void (*zend_objects_free_object)) { zend_object_value retval; #if PHP_VERSION_ID < 50399 @@ -50,7 +50,7 @@ zend_object_value mapscript_object_new(z #else object_properties_init(zobj, ce); #endif - retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL); retval.handlers = &mapscript_std_object_handlers; return retval; } @@ -58,7 +58,7 @@ zend_object_value mapscript_object_new(z zend_object_value mapscript_object_new_ex(zend_object *zobj, zend_class_entry *ce, void (*zend_objects_free_object), - zend_object_handlers *object_handlers TSRMLS_DC) + zend_object_handlers *object_handlers) { zend_object_value retval; #if PHP_VERSION_ID < 50399 @@ -74,7 +74,7 @@ zend_object_value mapscript_object_new_e #else object_properties_init(zobj, ce); #endif - retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(zobj, NULL, (zend_objects_free_object_storage_t)zend_objects_free_object, NULL); retval.handlers = object_handlers; return retval; } @@ -122,7 +122,7 @@ int mapscript_extract_associative_array( otherwise it creates it */ void mapscript_fetch_object(zend_class_entry *ce, zval* zval_parent, php_layer_object* layer, void *internal_object, - MAPSCRIPT_ZVAL_P php_object_storage TSRMLS_DC) + MAPSCRIPT_ZVAL_P php_object_storage) { parent_object p; @@ -138,54 +138,54 @@ void mapscript_fetch_object(zend_class_e MAKE_STD_ZVAL(*php_object_storage); if (ce == mapscript_ce_outputformat) - mapscript_create_outputformat((outputFormatObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_outputformat((outputFormatObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_color) - mapscript_create_color((colorObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_color((colorObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_rect) - mapscript_create_rect((rectObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_rect((rectObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_class) - mapscript_create_class((classObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_class((classObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_hashtable) - mapscript_create_hashtable((hashTableObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_hashtable((hashTableObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_label) - mapscript_create_label((labelObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_label((labelObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_style) - mapscript_create_style((styleObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_style((styleObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_symbol) - mapscript_create_symbol((symbolObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_symbol((symbolObj*)internal_object, p, mapscript_fetch_object_return_value); #ifdef disabled else if (ce == mapscript_ce_labelcachemember) - mapscript_create_labelcachemember((labelCacheMemberObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_labelcachemember((labelCacheMemberObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_labelcache) - mapscript_create_labelcache((labelCacheObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_labelcache((labelCacheObj*)internal_object, p, mapscript_fetch_object_return_value); #endif else if (ce == mapscript_ce_result) - mapscript_create_result((resultObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_result((resultObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_scalebar) - mapscript_create_scalebar((scalebarObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_scalebar((scalebarObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_web) - mapscript_create_web((webObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_web((webObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_legend) - mapscript_create_legend((legendObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_legend((legendObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_querymap) - mapscript_create_querymap((queryMapObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_querymap((queryMapObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_grid) - mapscript_create_grid((graticuleObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_grid((graticuleObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_referencemap) - mapscript_create_referencemap((referenceMapObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_referencemap((referenceMapObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_point) - mapscript_create_point((pointObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_point((pointObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_projection) - mapscript_create_projection((projectionObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_projection((projectionObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_line) - mapscript_create_line((lineObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_line((lineObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_shape) - mapscript_create_shape((shapeObj*)internal_object, p, layer, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_shape((shapeObj*)internal_object, p, layer, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_layer) - mapscript_create_layer((layerObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_layer((layerObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_cluster) - mapscript_create_cluster((clusterObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_cluster((clusterObj*)internal_object, p, mapscript_fetch_object_return_value); else if (ce == mapscript_ce_labelleader) - mapscript_create_labelleader((labelLeaderObj*)internal_object, p, mapscript_fetch_object_return_value TSRMLS_CC); + mapscript_create_labelleader((labelLeaderObj*)internal_object, p, mapscript_fetch_object_return_value); } diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/php_mapscript_util.h MapServer-rel-7-6-4-new/mapscript/php/php_mapscript_util.h --- MapServer-rel-7-6-4/mapscript/php/php_mapscript_util.h 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/php_mapscript_util.h 2021-11-23 13:07:29.488507159 +0100 @@ -40,9 +40,9 @@ #if ZEND_MODULE_API_NO < 20010901 #define TSRMLS_D void -#define TSRMLS_DC -#define TSRMLS_C -#define TSRMLS_CC +#define +#define +#define #endif /* Add pseudo refcount macros for PHP version < 5.3 */ @@ -134,7 +134,7 @@ static zend_always_inline zend_bool zval #define MAPSCRIPT_REGISTER_CLASS(name, functions, class_entry, constructor) \ INIT_CLASS_ENTRY(ce, name, functions); \ - class_entry = zend_register_internal_class(&ce TSRMLS_CC); \ + class_entry = zend_register_internal_class(&ce); \ class_entry->create_object = constructor; #define MAPSCRIPT_ALLOC_OBJECT(zobj, object_type) \ @@ -280,7 +280,7 @@ static zend_always_inline zend_bool zval { \ if (Z_ISUNDEF(php_object_storage)) { \ mapscript_fetch_object(mapscript_ce, zobj, NULL, (void*)internal_object, \ - &php_object_storage TSRMLS_CC); \ + &php_object_storage); \ } \ RETURN_ZVAL(&php_object_storage, 1, 0); \ } @@ -290,7 +290,7 @@ static zend_always_inline zend_bool zval { \ if (!php_object_storage) { \ mapscript_fetch_object(mapscript_ce, zobj, NULL, (void*)internal_object, \ - &php_object_storage TSRMLS_CC); \ + &php_object_storage); \ } \ RETURN_ZVAL(php_object_storage, 1, 0); \ } @@ -300,13 +300,13 @@ static zend_always_inline zend_bool zval #define CHECK_OBJECT(mapscript_ce, php_object_storage, internal_object) \ if (Z_ISUNDEF(php_object_storage)) { \ mapscript_fetch_object(mapscript_ce, zobj, NULL, (void*)internal_object, \ - &php_object_storage TSRMLS_CC); \ + &php_object_storage); \ } #else #define CHECK_OBJECT(mapscript_ce, php_object_storage, internal_object) \ if (!php_object_storage) { \ mapscript_fetch_object(mapscript_ce, zobj, NULL, (void*)internal_object, \ - &php_object_storage TSRMLS_CC); \ + &php_object_storage); \ } #endif @@ -347,7 +347,7 @@ static zend_always_inline zend_bool zval convert_to_long(value); \ /* validate the color value */ \ if (Z_LVAL_P(value) < 0 || Z_LVAL_P(value) > 255) { \ - mapscript_throw_exception("Invalid color value. It must be between 0 and 255." TSRMLS_CC); \ + mapscript_throw_exception("Invalid color value. It must be between 0 and 255."); \ return; \ } \ internal = Z_LVAL_P(value); \ @@ -356,7 +356,7 @@ static zend_always_inline zend_bool zval #if PHP_VERSION_ID < 70000 zend_object_value mapscript_object_new(zend_object *zobj, zend_class_entry *ce, - void (*zend_objects_free_object) TSRMLS_DC); + void (*zend_objects_free_object)); #endif /* PHP_VERSION_ID < 70000 */ int mapscript_extract_associative_array(HashTable *php, char **array); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/point.c MapServer-rel-7-6-4-new/mapscript/php/point.c --- MapServer-rel-7-6-4/mapscript/php/point.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/point.c 2021-11-23 13:07:29.488507159 +0100 @@ -100,7 +100,7 @@ PHP_METHOD(pointObj, __construct) php_point = MAPSCRIPT_OBJ_P(php_point_object, getThis()); if ((php_point->point = pointObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct pointObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct pointObj."); return; } @@ -121,7 +121,7 @@ PHP_METHOD(pointObj, __get) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -137,7 +137,7 @@ PHP_METHOD(pointObj, __get) else IF_GET_DOUBLE("m", php_point->point->m) #endif else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -150,7 +150,7 @@ PHP_METHOD(pointObj, __set) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -166,7 +166,7 @@ PHP_METHOD(pointObj, __set) else IF_SET_DOUBLE("m", php_point->point->m, value) #endif else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -180,7 +180,7 @@ PHP_METHOD(pointObj, setXY) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dd|d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dd|d", &x, &y, &m) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -212,7 +212,7 @@ PHP_METHOD(pointObj, setXYZ) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ddd|d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ddd|d", &x, &y, &z, &m) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -248,7 +248,7 @@ PHP_METHOD(pointObj, project) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &zobj_proj_in, mapscript_ce_projection, &zobj_proj_out, mapscript_ce_projection) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -262,7 +262,7 @@ PHP_METHOD(pointObj, project) status = pointObj_project(php_point->point, php_proj_in->projection, php_proj_out->projection); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -279,7 +279,7 @@ PHP_METHOD(pointObj, distanceToPoint) double distance = -1; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zobj_point2, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -306,7 +306,7 @@ PHP_METHOD(pointObj, distanceToLine) double distance = -1; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &zobj_line_point, mapscript_ce_point, &zobj_line_point2, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -335,7 +335,7 @@ PHP_METHOD(pointObj, distanceToShape) double distance = -1; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -367,7 +367,7 @@ PHP_METHOD(pointObj, draw) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOOl|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOOl|s", &zmap, mapscript_ce_map, &zlayer, mapscript_ce_layer, &zimage, mapscript_ce_image, @@ -384,7 +384,7 @@ PHP_METHOD(pointObj, draw) if ((status = pointObj_draw(php_point->point, php_map->map, php_layer->layer, php_image->image, classIndex, text)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -409,7 +409,7 @@ zend_function_entry point_functions[] = }; -void mapscript_create_point(pointObj *point, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_point(pointObj *point, parent_object parent, zval *return_value) { php_point_object * php_point; object_init_ex(return_value, mapscript_ce_point); @@ -425,13 +425,13 @@ void mapscript_create_point(pointObj *po #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_point_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_point_create_object(zend_class_entry *ce) { php_point_object *php_point; php_point = ecalloc(1, sizeof(*php_point) + zend_object_properties_size(ce)); - zend_object_std_init(&php_point->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_point->zobj, ce); object_properties_init(&php_point->zobj, ce); php_point->zobj.handlers = &mapscript_point_object_handlers; @@ -470,7 +470,7 @@ static zend_object* mapscript_point_clon zend_objects_clone_members(&php_point_new->zobj, &php_point_old->zobj); if ((php_point_new->point = pointObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct pointObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct pointObj."); return NULL; } memcpy(php_point_new->point, php_point_old->point, sizeof(pointObj)); @@ -483,7 +483,7 @@ PHP_MINIT_FUNCTION(point) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "pointObj", point_functions); - mapscript_ce_point = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_point = zend_register_internal_class(&ce); mapscript_ce_point->create_object = mapscript_point_create_object; mapscript_ce_point->ce_flags |= ZEND_ACC_FINAL; @@ -498,7 +498,7 @@ PHP_MINIT_FUNCTION(point) #else /* PHP5 */ -static void mapscript_point_object_destroy(void *object TSRMLS_DC) +static void mapscript_point_object_destroy(void *object) { php_point_object *php_point = (php_point_object *)object; @@ -513,7 +513,7 @@ static void mapscript_point_object_destr efree(object); } -static zend_object_value mapscript_point_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_point_object_new(zend_class_entry *ce) { zend_object_value retval; php_point_object *php_point; @@ -521,7 +521,7 @@ static zend_object_value mapscript_point MAPSCRIPT_ALLOC_OBJECT(php_point, php_point_object); retval = mapscript_object_new(&php_point->std, ce, - &mapscript_point_object_destroy TSRMLS_CC); + &mapscript_point_object_destroy); php_point->is_ref = 0; MAPSCRIPT_INIT_PARENT(php_point->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/projection.c MapServer-rel-7-6-4-new/mapscript/php/projection.c --- MapServer-rel-7-6-4/mapscript/php/projection.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/projection.c 2021-11-23 13:07:29.489507237 +0100 @@ -51,7 +51,7 @@ PHP_METHOD(projectionObj, __construct) php_projection_object *php_projection; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &projString, &projString_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &projString, &projString_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; } @@ -60,7 +60,7 @@ PHP_METHOD(projectionObj, __construct) php_projection = MAPSCRIPT_OBJ_P(php_projection_object, getThis()); if ((php_projection->projection = projectionObj_new(projString)) == NULL) { - mapscript_throw_mapserver_exception("Unable to construct projectionObj." TSRMLS_CC); + mapscript_throw_mapserver_exception("Unable to construct projectionObj."); return; } } @@ -75,7 +75,7 @@ PHP_METHOD(projectionObj, setWKTProjecti php_projection_object *php_projection; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &wkt, &wkt_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -116,7 +116,7 @@ zend_function_entry projection_functions }; -void mapscript_create_projection(projectionObj *projection, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_projection(projectionObj *projection, parent_object parent, zval *return_value) { php_projection_object * php_projection; object_init_ex(return_value, mapscript_ce_projection); @@ -132,13 +132,13 @@ void mapscript_create_projection(project #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_projection_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_projection_create_object(zend_class_entry *ce) { php_projection_object *php_projection; php_projection = ecalloc(1, sizeof(*php_projection) + zend_object_properties_size(ce)); - zend_object_std_init(&php_projection->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_projection->zobj, ce); object_properties_init(&php_projection->zobj, ce); php_projection->zobj.handlers = &mapscript_projection_object_handlers; @@ -186,7 +186,7 @@ PHP_MINIT_FUNCTION(projection) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "projectionObj", projection_functions); - mapscript_ce_projection = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_projection = zend_register_internal_class(&ce); mapscript_ce_projection->create_object = mapscript_projection_create_object; mapscript_ce_projection->ce_flags |= ZEND_ACC_FINAL; @@ -200,7 +200,7 @@ PHP_MINIT_FUNCTION(projection) } #else /* PHP5 */ -static void mapscript_projection_object_destroy(void *object TSRMLS_DC) +static void mapscript_projection_object_destroy(void *object) { php_projection_object *php_projection = (php_projection_object *)object; @@ -215,7 +215,7 @@ static void mapscript_projection_object_ efree(object); } -static zend_object_value mapscript_projection_object_new_ex(zend_class_entry *ce, php_projection_object **ptr TSRMLS_DC) +static zend_object_value mapscript_projection_object_new_ex(zend_class_entry *ce, php_projection_object **ptr) { zend_object_value retval; php_projection_object *php_projection; @@ -224,7 +224,7 @@ static zend_object_value mapscript_proje retval = mapscript_object_new_ex(&php_projection->std, ce, &mapscript_projection_object_destroy, - &mapscript_projection_object_handlers TSRMLS_CC); + &mapscript_projection_object_handlers); if (ptr) *ptr = php_projection; @@ -235,20 +235,20 @@ static zend_object_value mapscript_proje return retval; } -static zend_object_value mapscript_projection_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_projection_object_new(zend_class_entry *ce) { - return mapscript_projection_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_projection_object_new_ex(ce, NULL); } -static zend_object_value mapscript_projection_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_projection_object_clone(zval *zobj) { php_projection_object *php_projection_old, *php_projection_new; zend_object_value new_ov; php_projection_old = MAPSCRIPT_OBJ_P(php_projection_object, zobj); - new_ov = mapscript_projection_object_new_ex(mapscript_ce_projection, &php_projection_new TSRMLS_CC); - zend_objects_clone_members(&php_projection_new->std, new_ov, &php_projection_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_projection_object_new_ex(mapscript_ce_projection, &php_projection_new); + zend_objects_clone_members(&php_projection_new->std, new_ov, &php_projection_old->std, Z_OBJ_HANDLE_P(zobj)); php_projection_new->projection = projectionObj_clone(php_projection_old->projection); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/querymap.c MapServer-rel-7-6-4-new/mapscript/php/querymap.c --- MapServer-rel-7-6-4/mapscript/php/querymap.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/querymap.c 2021-11-23 13:07:29.489507237 +0100 @@ -53,7 +53,7 @@ ZEND_END_ARG_INFO() queryMapObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(queryMapObj, __construct) { - mapscript_throw_exception("queryMapObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("queryMapObj cannot be constructed"); } /* }}} */ @@ -65,7 +65,7 @@ PHP_METHOD(queryMapObj, __get) php_querymap_object *php_querymap; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -80,7 +80,7 @@ PHP_METHOD(queryMapObj, __get) else IF_GET_LONG("status", php_querymap->querymap->status) else IF_GET_OBJECT("color", mapscript_ce_color, php_querymap->color, &php_querymap->querymap->color) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -93,7 +93,7 @@ PHP_METHOD(queryMapObj, __set) php_querymap_object *php_querymap; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -107,9 +107,9 @@ PHP_METHOD(queryMapObj, __set) else IF_SET_LONG("style", php_querymap->querymap->style, value) else IF_SET_LONG("status", php_querymap->querymap->status, value) else if ( (STRING_EQUAL("color", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -124,7 +124,7 @@ PHP_METHOD(queryMapObj, updateFromString int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -136,7 +136,7 @@ PHP_METHOD(queryMapObj, updateFromString status = queryMapObj_updateFromString(php_querymap->querymap, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -203,7 +203,7 @@ zend_function_entry querymap_functions[] } }; -void mapscript_create_querymap(queryMapObj *querymap, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_querymap(queryMapObj *querymap, parent_object parent, zval *return_value) { php_querymap_object * php_querymap; object_init_ex(return_value, mapscript_ce_querymap); @@ -217,13 +217,13 @@ void mapscript_create_querymap(queryMapO #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_querymap_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_querymap_create_object(zend_class_entry *ce) { php_querymap_object *php_querymap; php_querymap = ecalloc(1, sizeof(*php_querymap) + zend_object_properties_size(ce)); - zend_object_std_init(&php_querymap->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_querymap->zobj, ce); object_properties_init(&php_querymap->zobj, ce); php_querymap->zobj.handlers = &mapscript_querymap_object_handlers; @@ -255,7 +255,7 @@ PHP_MINIT_FUNCTION(querymap) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "queryMapObj", querymap_functions); - mapscript_ce_querymap = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_querymap = zend_register_internal_class(&ce); mapscript_ce_querymap->create_object = mapscript_querymap_create_object; mapscript_ce_querymap->ce_flags |= ZEND_ACC_FINAL; @@ -268,7 +268,7 @@ PHP_MINIT_FUNCTION(querymap) } #else /* PHP5 */ -static void mapscript_querymap_object_destroy(void *object TSRMLS_DC) +static void mapscript_querymap_object_destroy(void *object) { php_querymap_object *php_querymap = (php_querymap_object *)object; @@ -282,7 +282,7 @@ static void mapscript_querymap_object_de efree(object); } -static zend_object_value mapscript_querymap_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_querymap_object_new(zend_class_entry *ce) { zend_object_value retval; php_querymap_object *php_querymap; @@ -290,7 +290,7 @@ static zend_object_value mapscript_query MAPSCRIPT_ALLOC_OBJECT(php_querymap, php_querymap_object); retval = mapscript_object_new(&php_querymap->std, ce, - &mapscript_querymap_object_destroy TSRMLS_CC); + &mapscript_querymap_object_destroy); MAPSCRIPT_INIT_PARENT(php_querymap->parent); php_querymap->color = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/rect.c MapServer-rel-7-6-4-new/mapscript/php/rect.c --- MapServer-rel-7-6-4/mapscript/php/rect.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/rect.c 2021-11-23 13:07:29.489507237 +0100 @@ -86,7 +86,7 @@ PHP_METHOD(rectObj, __construct) php_rect = MAPSCRIPT_OBJ_P(php_rect_object, getThis()); if ((php_rect->rect = rectObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct rectObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct rectObj."); return; } } @@ -100,7 +100,7 @@ PHP_METHOD(rectObj, __get) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -114,7 +114,7 @@ PHP_METHOD(rectObj, __get) else IF_GET_DOUBLE("maxx", php_rect->rect->maxx) else IF_GET_DOUBLE("maxy", php_rect->rect->maxy) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -134,7 +134,7 @@ PHP_METHOD(rectObj, draw) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOOl|s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOOl|s", &zmap, mapscript_ce_map, &zlayer, mapscript_ce_layer, &zimage, mapscript_ce_image, @@ -151,7 +151,7 @@ PHP_METHOD(rectObj, draw) if ((status = rectObj_draw(php_rect->rect, php_map->map, php_layer->layer, php_image->image, classIndex, text)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -168,7 +168,7 @@ PHP_METHOD(rectObj, __set) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -182,7 +182,7 @@ PHP_METHOD(rectObj, __set) else IF_SET_DOUBLE("maxx", php_rect->rect->maxx, value) else IF_SET_DOUBLE("maxy", php_rect->rect->maxy, value) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -197,7 +197,7 @@ PHP_METHOD(rectObj, project) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &zobj_proj_in, mapscript_ce_projection, &zobj_proj_out, mapscript_ce_projection) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -211,7 +211,7 @@ PHP_METHOD(rectObj, project) status = rectObj_project(php_rect->rect, php_proj_in->projection, php_proj_out->projection); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -227,7 +227,7 @@ PHP_METHOD(rectObj, setExtent) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "dddd", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "dddd", &minx, &miny, &maxx, &maxy) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -255,7 +255,7 @@ PHP_METHOD(rectObj, fit) php_rect_object *php_rect; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll", &width, &height) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -289,7 +289,7 @@ PHP_METHOD(rectObj, getCenter) center = (pointObj *)calloc(1, sizeof(pointObj)); if (!center) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); RETURN_NULL(); } @@ -298,7 +298,7 @@ PHP_METHOD(rectObj, getCenter) /* Return result object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(center, parent, return_value TSRMLS_CC); + mapscript_create_point(center, parent, return_value); } /* }}} */ @@ -317,7 +317,7 @@ zend_function_entry rect_functions[] = { }; -void mapscript_create_rect(rectObj *rect, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_rect(rectObj *rect, parent_object parent, zval *return_value) { php_rect_object * php_rect; object_init_ex(return_value, mapscript_ce_rect); @@ -333,13 +333,13 @@ void mapscript_create_rect(rectObj *rect #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_rect_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_rect_create_object(zend_class_entry *ce) { php_rect_object *php_rect; php_rect = ecalloc(1, sizeof(*php_rect) + zend_object_properties_size(ce)); - zend_object_std_init(&php_rect->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_rect->zobj, ce); object_properties_init(&php_rect->zobj, ce); php_rect->zobj.handlers = &mapscript_rect_object_handlers; @@ -378,7 +378,7 @@ static zend_object* mapscript_rect_clone zend_objects_clone_members(&php_rect_new->zobj, &php_rect_old->zobj); if ((php_rect_new->rect = rectObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct rectObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct rectObj."); return NULL; } memcpy(php_rect_new->rect, php_rect_old->rect, sizeof(rectObj)); @@ -391,7 +391,7 @@ PHP_MINIT_FUNCTION(rect) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "rectObj", rect_functions); - mapscript_ce_rect = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_rect = zend_register_internal_class(&ce); mapscript_ce_rect->create_object = mapscript_rect_create_object; mapscript_ce_rect->ce_flags |= ZEND_ACC_FINAL; @@ -405,7 +405,7 @@ PHP_MINIT_FUNCTION(rect) } #else /* PHP5 */ -static void mapscript_rect_object_destroy(void *object TSRMLS_DC) +static void mapscript_rect_object_destroy(void *object) { php_rect_object *php_rect = (php_rect_object *)object; @@ -420,7 +420,7 @@ static void mapscript_rect_object_destro efree(object); } -static zend_object_value mapscript_rect_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_rect_object_new(zend_class_entry *ce) { zend_object_value retval; php_rect_object *php_rect; @@ -428,7 +428,7 @@ static zend_object_value mapscript_rect_ MAPSCRIPT_ALLOC_OBJECT(php_rect, php_rect_object); retval = mapscript_object_new(&php_rect->std, ce, - &mapscript_rect_object_destroy TSRMLS_CC); + &mapscript_rect_object_destroy); php_rect->is_ref = 0; MAPSCRIPT_INIT_PARENT(php_rect->parent) diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/referencemap.c MapServer-rel-7-6-4-new/mapscript/php/referencemap.c --- MapServer-rel-7-6-4/mapscript/php/referencemap.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/referencemap.c 2021-11-23 13:07:29.490507315 +0100 @@ -53,7 +53,7 @@ ZEND_END_ARG_INFO() referenceMapObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(referenceMapObj, __construct) { - mapscript_throw_exception("referenceMapObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("referenceMapObj cannot be constructed"); } /* }}} */ @@ -65,7 +65,7 @@ PHP_METHOD(referenceMapObj, __get) php_referencemap_object *php_referencemap; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -87,7 +87,7 @@ PHP_METHOD(referenceMapObj, __get) else IF_GET_OBJECT("color", mapscript_ce_color, php_referencemap->color, &php_referencemap->referencemap->color) else IF_GET_OBJECT("outlinecolor", mapscript_ce_color, php_referencemap->outlinecolor, &php_referencemap->referencemap->outlinecolor) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -100,7 +100,7 @@ PHP_METHOD(referenceMapObj, __set) php_referencemap_object *php_referencemap; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -121,9 +121,9 @@ PHP_METHOD(referenceMapObj, __set) else if ( (STRING_EQUAL("extent", property)) || (STRING_EQUAL("color", property)) || (STRING_EQUAL("outlinecolor", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -138,7 +138,7 @@ PHP_METHOD(referenceMapObj, updateFromSt int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -150,7 +150,7 @@ PHP_METHOD(referenceMapObj, updateFromSt status = referenceMapObj_updateFromString(php_referencemap->referencemap, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -219,7 +219,7 @@ zend_function_entry referencemap_functio } }; -void mapscript_create_referencemap(referenceMapObj *referencemap, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_referencemap(referenceMapObj *referencemap, parent_object parent, zval *return_value) { php_referencemap_object * php_referencemap; object_init_ex(return_value, mapscript_ce_referencemap); @@ -232,13 +232,13 @@ void mapscript_create_referencemap(refer #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_referencemap_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_referencemap_create_object(zend_class_entry *ce) { php_referencemap_object *php_referencemap; php_referencemap = ecalloc(1, sizeof(*php_referencemap) + zend_object_properties_size(ce)); - zend_object_std_init(&php_referencemap->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_referencemap->zobj, ce); object_properties_init(&php_referencemap->zobj, ce); php_referencemap->zobj.handlers = &mapscript_referencemap_object_handlers; @@ -272,7 +272,7 @@ PHP_MINIT_FUNCTION(referencemap) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "referenceMapObj", referencemap_functions); - mapscript_ce_referencemap = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_referencemap = zend_register_internal_class(&ce); mapscript_ce_referencemap->create_object = mapscript_referencemap_create_object; mapscript_ce_referencemap->ce_flags |= ZEND_ACC_FINAL; @@ -285,7 +285,7 @@ PHP_MINIT_FUNCTION(referencemap) } #else /* PHP5 */ -static void mapscript_referencemap_object_destroy(void *object TSRMLS_DC) +static void mapscript_referencemap_object_destroy(void *object) { php_referencemap_object *php_referencemap = (php_referencemap_object *)object; @@ -301,7 +301,7 @@ static void mapscript_referencemap_objec efree(object); } -static zend_object_value mapscript_referencemap_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_referencemap_object_new(zend_class_entry *ce) { zend_object_value retval; php_referencemap_object *php_referencemap; @@ -309,7 +309,7 @@ static zend_object_value mapscript_refer MAPSCRIPT_ALLOC_OBJECT(php_referencemap, php_referencemap_object); retval = mapscript_object_new(&php_referencemap->std, ce, - &mapscript_referencemap_object_destroy TSRMLS_CC); + &mapscript_referencemap_object_destroy); MAPSCRIPT_INIT_PARENT(php_referencemap->parent); php_referencemap->extent = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/result.c MapServer-rel-7-6-4-new/mapscript/php/result.c --- MapServer-rel-7-6-4/mapscript/php/result.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/result.c 2021-11-23 13:07:29.490507315 +0100 @@ -58,7 +58,7 @@ PHP_METHOD(resultObj, __construct) php_result_object *php_result; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &shapeindex) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -68,7 +68,7 @@ PHP_METHOD(resultObj, __construct) php_result = MAPSCRIPT_OBJ_P(php_result_object, getThis()); if ((php_result->result = resultObj_new()) == NULL) { - mapscript_throw_exception("Unable to construct resultObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct resultObj."); return; } @@ -84,7 +84,7 @@ PHP_METHOD(resultObj, __get) php_result_object *php_result; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -98,7 +98,7 @@ PHP_METHOD(resultObj, __get) else IF_GET_LONG("classindex", php_result->result->classindex) else IF_GET_LONG("resultindex", php_result->result->resultindex) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -109,7 +109,7 @@ PHP_METHOD(resultObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -120,9 +120,9 @@ PHP_METHOD(resultObj, __set) (STRING_EQUAL("tileindex", property)) || (STRING_EQUAL("resultindex", property)) || (STRING_EQUAL("classindex", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -135,7 +135,7 @@ zend_function_entry result_functions[] = }; void mapscript_create_result(resultObj *result, parent_object parent, - zval *return_value TSRMLS_DC) + zval *return_value) { php_result_object * php_result; object_init_ex(return_value, mapscript_ce_result); @@ -148,13 +148,13 @@ void mapscript_create_result(resultObj * #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_result_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_result_create_object(zend_class_entry *ce) { php_result_object *php_result; php_result = ecalloc(1, sizeof(*php_result) + zend_object_properties_size(ce)); - zend_object_std_init(&php_result->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_result->zobj, ce); object_properties_init(&php_result->zobj, ce); php_result->zobj.handlers = &mapscript_result_object_handlers; @@ -182,7 +182,7 @@ PHP_MINIT_FUNCTION(result) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "resultObj", result_functions); - mapscript_ce_result = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_result = zend_register_internal_class(&ce); mapscript_ce_result->create_object = mapscript_result_create_object; mapscript_ce_result->ce_flags |= ZEND_ACC_FINAL; @@ -195,7 +195,7 @@ PHP_MINIT_FUNCTION(result) } #else /* PHP5 */ -static void mapscript_result_object_destroy(void *object TSRMLS_DC) +static void mapscript_result_object_destroy(void *object) { php_result_object *php_result = (php_result_object *)object; @@ -208,7 +208,7 @@ static void mapscript_result_object_dest efree(object); } -static zend_object_value mapscript_result_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_result_object_new(zend_class_entry *ce) { zend_object_value retval; php_result_object *php_result; @@ -216,7 +216,7 @@ static zend_object_value mapscript_resul MAPSCRIPT_ALLOC_OBJECT(php_result, php_result_object); retval = mapscript_object_new(&php_result->std, ce, - &mapscript_result_object_destroy TSRMLS_CC); + &mapscript_result_object_destroy); MAPSCRIPT_INIT_PARENT(php_result->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/scalebar.c MapServer-rel-7-6-4-new/mapscript/php/scalebar.c --- MapServer-rel-7-6-4/mapscript/php/scalebar.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/scalebar.c 2021-11-23 13:07:29.490507315 +0100 @@ -59,7 +59,7 @@ ZEND_END_ARG_INFO() scalebarObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(scalebarObj, __construct) { - mapscript_throw_exception("scalebarObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("scalebarObj cannot be constructed"); } /* }}} */ @@ -71,7 +71,7 @@ PHP_METHOD(scalebarObj, __get) php_scalebar_object *php_scalebar; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -95,7 +95,7 @@ PHP_METHOD(scalebarObj, __get) else IF_GET_OBJECT("label", mapscript_ce_label, php_scalebar->label, &php_scalebar->scalebar->label) else IF_GET_OBJECT("imagecolor", mapscript_ce_color, php_scalebar->imagecolor, &php_scalebar->scalebar->imagecolor) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -108,7 +108,7 @@ PHP_METHOD(scalebarObj, __set) php_scalebar_object *php_scalebar; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -131,9 +131,9 @@ PHP_METHOD(scalebarObj, __set) (STRING_EQUAL("outlinecolor", property)) || (STRING_EQUAL("label", property)) || (STRING_EQUAL("imagecolor", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -148,7 +148,7 @@ PHP_METHOD(scalebarObj, updateFromString int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -160,7 +160,7 @@ PHP_METHOD(scalebarObj, updateFromString status = scalebarObj_updateFromString(php_scalebar->scalebar, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -204,7 +204,7 @@ PHP_METHOD(scalebarObj, setImageColor) php_scalebar_object *php_scalebar; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll", &red, &green, &blue) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -261,7 +261,7 @@ zend_function_entry scalebar_functions[] } }; -void mapscript_create_scalebar(scalebarObj *scalebar, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_scalebar(scalebarObj *scalebar, parent_object parent, zval *return_value) { php_scalebar_object * php_scalebar; object_init_ex(return_value, mapscript_ce_scalebar); @@ -274,13 +274,13 @@ void mapscript_create_scalebar(scalebarO #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_scalebar_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_scalebar_create_object(zend_class_entry *ce) { php_scalebar_object *php_scalebar; php_scalebar = ecalloc(1, sizeof(*php_scalebar) + zend_object_properties_size(ce)); - zend_object_std_init(&php_scalebar->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_scalebar->zobj, ce); object_properties_init(&php_scalebar->zobj, ce); php_scalebar->zobj.handlers = &mapscript_scalebar_object_handlers; @@ -318,7 +318,7 @@ PHP_MINIT_FUNCTION(scalebar) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "scalebarObj", scalebar_functions); - mapscript_ce_scalebar = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_scalebar = zend_register_internal_class(&ce); mapscript_ce_scalebar->create_object = mapscript_scalebar_create_object; mapscript_ce_scalebar->ce_flags |= ZEND_ACC_FINAL; @@ -331,7 +331,7 @@ PHP_MINIT_FUNCTION(scalebar) } #else /* PHP5 */ -static void mapscript_scalebar_object_destroy(void *object TSRMLS_DC) +static void mapscript_scalebar_object_destroy(void *object) { php_scalebar_object *php_scalebar = (php_scalebar_object *)object; @@ -349,7 +349,7 @@ static void mapscript_scalebar_object_de efree(object); } -static zend_object_value mapscript_scalebar_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_scalebar_object_new(zend_class_entry *ce) { zend_object_value retval; php_scalebar_object *php_scalebar; @@ -357,7 +357,7 @@ static zend_object_value mapscript_scale MAPSCRIPT_ALLOC_OBJECT(php_scalebar, php_scalebar_object); retval = mapscript_object_new(&php_scalebar->std, ce, - &mapscript_scalebar_object_destroy TSRMLS_CC); + &mapscript_scalebar_object_destroy); MAPSCRIPT_INIT_PARENT(php_scalebar->parent); php_scalebar->color = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/shape.c MapServer-rel-7-6-4-new/mapscript/php/shape.c --- MapServer-rel-7-6-4/mapscript/php/shape.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/shape.c 2021-11-23 13:07:29.491507393 +0100 @@ -162,7 +162,7 @@ PHP_METHOD(shapeObj, __construct) long type; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &type) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -172,7 +172,7 @@ PHP_METHOD(shapeObj, __construct) php_shape = MAPSCRIPT_OBJ_P(php_shape_object, zobj); if ((php_shape->shape = shapeObj_new(type)) == NULL) { - mapscript_throw_exception("Unable to construct shapeObj." TSRMLS_CC); + mapscript_throw_exception("Unable to construct shapeObj."); return; } @@ -189,7 +189,7 @@ PHP_METHOD(shapeObj, __get) php_shape_object *php_shape; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -209,7 +209,7 @@ PHP_METHOD(shapeObj, __get) else IF_GET_OBJECT("bounds", mapscript_ce_rect, php_shape->bounds, &php_shape->shape->bounds) else IF_GET_OBJECT("values", NULL, php_shape->values, NULL) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -222,7 +222,7 @@ PHP_METHOD(shapeObj, __set) php_shape_object *php_shape; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -241,9 +241,9 @@ PHP_METHOD(shapeObj, __set) (STRING_EQUAL("bounds", property)) || (STRING_EQUAL("values", property)) || (STRING_EQUAL("numvalues", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -258,7 +258,7 @@ PHP_METHOD(shapeObj, add) int retval = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zline, mapscript_ce_line) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -284,7 +284,7 @@ PHP_METHOD(shapeObj, line) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -295,12 +295,12 @@ PHP_METHOD(shapeObj, line) if (index < 0 || index >= php_shape->shape->numlines) { - mapscript_throw_exception("Line '%d' does not exist in this object." TSRMLS_CC, index); + mapscript_throw_exception("Line '%d' does not exist in this object.", index); return; } MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_line(&(php_shape->shape->line[index]), parent, return_value TSRMLS_CC); + mapscript_create_line(&(php_shape->shape->line[index]), parent, return_value); } /* }}} */ @@ -314,7 +314,7 @@ PHP_METHOD(shapeObj, contains) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zpoint, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -340,7 +340,7 @@ PHP_METHOD(shapeObj, intersects) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -368,7 +368,7 @@ PHP_METHOD(shapeObj, project) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OO", &zobj_proj_in, mapscript_ce_projection, &zobj_proj_out, mapscript_ce_projection) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -382,7 +382,7 @@ PHP_METHOD(shapeObj, project) status = shapeObj_project(php_shape->shape, php_proj_in->projection, php_proj_out->projection); if (status != MS_SUCCESS) { - mapscript_report_mapserver_error(E_WARNING TSRMLS_CC); + mapscript_report_mapserver_error(E_WARNING); } RETURN_LONG(status); @@ -401,7 +401,7 @@ PHP_METHOD(shapeObj, getPointUsingMeasur parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &measure) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -415,7 +415,7 @@ PHP_METHOD(shapeObj, getPointUsingMeasur RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(zobj, NULL); - mapscript_create_point(point, parent, return_value TSRMLS_CC); + mapscript_create_point(point, parent, return_value); } /* }}} */ @@ -433,7 +433,7 @@ PHP_METHOD(shapeObj, getMeasureUsingPoin parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zpoint, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -448,7 +448,7 @@ PHP_METHOD(shapeObj, getMeasureUsingPoin RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(intersection, parent, return_value TSRMLS_CC); + mapscript_create_point(intersection, parent, return_value); } /* }}} */ @@ -465,7 +465,7 @@ PHP_METHOD(shapeObj, getValue) php_shape_object *php_shape; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &zlayer, mapscript_ce_layer, &fieldName, &fieldName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -499,7 +499,7 @@ PHP_METHOD(shapeObj, buffer) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &width) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -513,7 +513,7 @@ PHP_METHOD(shapeObj, buffer) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -541,7 +541,7 @@ PHP_METHOD(shapeObj, convexhull) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -569,7 +569,7 @@ PHP_METHOD(shapeObj, boundary) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -583,7 +583,7 @@ PHP_METHOD(shapeObj, containsShape) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -613,7 +613,7 @@ PHP_METHOD(shapeObj, union) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -629,7 +629,7 @@ PHP_METHOD(shapeObj, union) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -645,7 +645,7 @@ PHP_METHOD(shapeObj, intersection) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -661,7 +661,7 @@ PHP_METHOD(shapeObj, intersection) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -677,7 +677,7 @@ PHP_METHOD(shapeObj, difference) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -693,7 +693,7 @@ PHP_METHOD(shapeObj, difference) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -709,7 +709,7 @@ PHP_METHOD(shapeObj, symdifference) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -725,7 +725,7 @@ PHP_METHOD(shapeObj, symdifference) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -739,7 +739,7 @@ PHP_METHOD(shapeObj, overlaps) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -766,7 +766,7 @@ PHP_METHOD(shapeObj, within) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -794,7 +794,7 @@ PHP_METHOD(shapeObj, crosses) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -821,7 +821,7 @@ PHP_METHOD(shapeObj, touches) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -848,7 +848,7 @@ PHP_METHOD(shapeObj, equals) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -875,7 +875,7 @@ PHP_METHOD(shapeObj, disjoint) php_shape_object *php_shape, *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -916,7 +916,7 @@ PHP_METHOD(shapeObj, getCentroid) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(point, parent, return_value TSRMLS_CC); + mapscript_create_point(point, parent, return_value); } /* }}} */ @@ -990,7 +990,7 @@ PHP_METHOD(shapeObj, getLabelPoint) RETURN_FALSE; MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(point, parent, return_value TSRMLS_CC); + mapscript_create_point(point, parent, return_value); } /* }}} */ @@ -1058,7 +1058,7 @@ PHP_METHOD(shapeObj, simplify) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &tolerance) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1072,7 +1072,7 @@ PHP_METHOD(shapeObj, simplify) RETURN_NULL(); MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -1088,7 +1088,7 @@ PHP_METHOD(shapeObj, topologyPreservingS parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "d", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "d", &tolerance) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1102,7 +1102,7 @@ PHP_METHOD(shapeObj, topologyPreservingS RETURN_NULL(); MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -1119,7 +1119,7 @@ PHP_METHOD(shapeObj, draw) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "OOO", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "OOO", &zmap, mapscript_ce_map, &zlayer, mapscript_ce_layer, &zimage, mapscript_ce_image) == FAILURE) { @@ -1135,7 +1135,7 @@ PHP_METHOD(shapeObj, draw) if ((status = shapeObj_draw(php_shape->shape, php_map->map, php_layer->layer, php_image->image)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -1173,7 +1173,7 @@ PHP_METHOD(shapeObj, distanceToPoint) php_point_object *php_point; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zpoint, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1197,7 +1197,7 @@ PHP_METHOD(shapeObj, distanceToShape) php_shape_object *php_shape2; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -1255,7 +1255,7 @@ zend_function_entry shape_functions[] = }; -void mapscript_create_shape(shapeObj *shape, parent_object parent, php_layer_object *php_layer, zval *return_value TSRMLS_DC) +void mapscript_create_shape(shapeObj *shape, parent_object parent, php_layer_object *php_layer, zval *return_value) { php_shape_object *php_shape; @@ -1275,7 +1275,7 @@ void mapscript_create_shape(shapeObj *sh mapscript_add_assoc_string(php_shape->values, php_layer->layer->items[i], php_shape->shape->values[i], 1); } } else { - mapscript_throw_exception("Assertion failed, Could not set shape values: %d, %d" TSRMLS_CC, + mapscript_throw_exception("Assertion failed, Could not set shape values: %d, %d", php_shape->shape->numvalues, php_layer->layer->numitems); return; } @@ -1290,13 +1290,13 @@ void mapscript_create_shape(shapeObj *sh #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_shape_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_shape_create_object(zend_class_entry *ce) { php_shape_object *php_shape; php_shape = ecalloc(1, sizeof(*php_shape) + zend_object_properties_size(ce)); - zend_object_std_init(&php_shape->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_shape->zobj, ce); object_properties_init(&php_shape->zobj, ce); php_shape->zobj.handlers = &mapscript_shape_object_handlers; @@ -1332,7 +1332,7 @@ PHP_MINIT_FUNCTION(shape) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "shapeObj", shape_functions); - mapscript_ce_shape = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_shape = zend_register_internal_class(&ce); mapscript_ce_shape->create_object = mapscript_shape_create_object; mapscript_ce_shape->ce_flags |= ZEND_ACC_FINAL; @@ -1345,7 +1345,7 @@ PHP_MINIT_FUNCTION(shape) } #else /* PHP5 */ -static void mapscript_shape_object_destroy(void *object TSRMLS_DC) +static void mapscript_shape_object_destroy(void *object) { php_shape_object *php_shape = (php_shape_object *)object; @@ -1362,7 +1362,7 @@ static void mapscript_shape_object_destr efree(object); } -static zend_object_value mapscript_shape_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_shape_object_new(zend_class_entry *ce) { zend_object_value retval; php_shape_object *php_shape; @@ -1370,7 +1370,7 @@ static zend_object_value mapscript_shape MAPSCRIPT_ALLOC_OBJECT(php_shape, php_shape_object); retval = mapscript_object_new(&php_shape->std, ce, - &mapscript_shape_object_destroy TSRMLS_CC); + &mapscript_shape_object_destroy); php_shape->is_ref = 0; MAPSCRIPT_INIT_PARENT(php_shape->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/shapefile.c MapServer-rel-7-6-4-new/mapscript/php/shapefile.c --- MapServer-rel-7-6-4/mapscript/php/shapefile.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/shapefile.c 2021-11-23 13:07:29.491507393 +0100 @@ -86,7 +86,7 @@ PHP_METHOD(shapeFileObj, __construct) long type; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl", &filename, &filename_len, &type) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -98,7 +98,7 @@ PHP_METHOD(shapeFileObj, __construct) php_shapefile->shapefile = shapefileObj_new(filename, type); if (php_shapefile->shapefile == NULL) { - mapscript_throw_mapserver_exception("Failed to open shapefile %s" TSRMLS_CC, filename); + mapscript_throw_mapserver_exception("Failed to open shapefile %s", filename); return; } } @@ -112,7 +112,7 @@ PHP_METHOD(shapeFileObj, __get) php_shapefile_object *php_shapefile; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -128,7 +128,7 @@ PHP_METHOD(shapeFileObj, __get) else IF_GET_STRING("source", php_shapefile->shapefile->source) else IF_GET_OBJECT("bounds", mapscript_ce_rect, php_shapefile->bounds, &php_shapefile->shapefile->bounds) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -139,7 +139,7 @@ PHP_METHOD(shapeFileObj, __set) zval *value; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -152,9 +152,9 @@ PHP_METHOD(shapeFileObj, __set) (STRING_EQUAL("isopen", property)) || (STRING_EQUAL("lastshape", property)) || (STRING_EQUAL("bounds", property)) ) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -169,7 +169,7 @@ PHP_METHOD(shapeFileObj, getShape) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -183,18 +183,18 @@ PHP_METHOD(shapeFileObj, getShape) * at this point since it will be set by SHPReadShape(). */ if ((shape = shapeObj_new(MS_SHAPE_NULL)) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)"); return; } if (shapefileObj_get(php_shapefile->shapefile, index, shape) != MS_SUCCESS) { shapeObj_destroy(shape); - mapscript_throw_mapserver_exception("Failed reading shape %ld." TSRMLS_CC, index); + mapscript_throw_mapserver_exception("Failed reading shape %ld.", index); return; } MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -209,7 +209,7 @@ PHP_METHOD(shapeFileObj, getPoint) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -224,19 +224,19 @@ PHP_METHOD(shapeFileObj, getPoint) */ /* Create a new PointObj to hold the result */ if ((point = pointObj_new()) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new point (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new point (out of memory?)"); return; } /* Read from the file */ if (shapefileObj_getPoint(php_shapefile->shapefile, index, point) != MS_SUCCESS) { pointObj_destroy(point); - mapscript_throw_mapserver_exception("Failed reading point %ld." TSRMLS_CC, index); + mapscript_throw_mapserver_exception("Failed reading point %ld.", index); return; } MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_point(point, parent, return_value TSRMLS_CC); + mapscript_create_point(point, parent, return_value); } /* }}} */ @@ -252,7 +252,7 @@ PHP_METHOD(shapeFileObj, getExtent) parent_object p; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -263,7 +263,7 @@ PHP_METHOD(shapeFileObj, getExtent) /* Create a new rectObj to hold the result */ if ((rect = rectObj_new()) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new rectObj (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new rectObj (out of memory?)"); return; } @@ -274,7 +274,7 @@ PHP_METHOD(shapeFileObj, getExtent) /* Return rectObj */ MAPSCRIPT_INIT_PARENT(p); - mapscript_create_rect(rect, p, return_value TSRMLS_CC); + mapscript_create_rect(rect, p, return_value); } /* }}} */ @@ -289,7 +289,7 @@ PHP_METHOD(shapeFileObj, addShape) int retval = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zshape, mapscript_ce_shape) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -316,7 +316,7 @@ PHP_METHOD(shapeFileObj, addPoint) int retval = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zpoint, mapscript_ce_point) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -345,7 +345,7 @@ PHP_METHOD(shapeFileObj, getTransformed) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Ol", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ol", &zmap, mapscript_ce_map, &index) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -360,7 +360,7 @@ PHP_METHOD(shapeFileObj, getTransformed) * at this point since it will be set by SHPReadShape(). */ if ((shape = shapeObj_new(MS_SHAPE_NULL)) == NULL) { - mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)" TSRMLS_CC); + mapscript_throw_mapserver_exception("Failed creating new shape (out of memory?)"); return; } @@ -368,13 +368,13 @@ PHP_METHOD(shapeFileObj, getTransformed) if (shapefileObj_getTransformed(php_shapefile->shapefile, php_map->map, index, shape) != MS_SUCCESS) { shapeObj_destroy(shape); - mapscript_throw_mapserver_exception("Failed reading shape %ld." TSRMLS_CC, index); + mapscript_throw_mapserver_exception("Failed reading shape %ld.", index); return; } /* Return shape object */ MAPSCRIPT_MAKE_PARENT(NULL, NULL); - mapscript_create_shape(shape, parent, NULL, return_value TSRMLS_CC); + mapscript_create_shape(shape, parent, NULL, return_value); } /* }}} */ @@ -414,7 +414,7 @@ zend_function_entry shapefile_functions[ }; -void mapscript_create_shapefile(shapefileObj *shapefile, zval *return_value TSRMLS_DC) +void mapscript_create_shapefile(shapefileObj *shapefile, zval *return_value) { php_shapefile_object * php_shapefile; @@ -425,13 +425,13 @@ void mapscript_create_shapefile(shapefil #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_shapefile_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_shapefile_create_object(zend_class_entry *ce) { php_shapefile_object *php_shapefile; php_shapefile = ecalloc(1, sizeof(*php_shapefile) + zend_object_properties_size(ce)); - zend_object_std_init(&php_shapefile->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_shapefile->zobj, ce); object_properties_init(&php_shapefile->zobj, ce); php_shapefile->zobj.handlers = &mapscript_shapefile_object_handlers; @@ -459,7 +459,7 @@ PHP_MINIT_FUNCTION(shapefile) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "shapefileObj", shapefile_functions); - mapscript_ce_shapefile = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_shapefile = zend_register_internal_class(&ce); mapscript_ce_shapefile->create_object = mapscript_shapefile_create_object; mapscript_ce_shapefile->ce_flags |= ZEND_ACC_FINAL; @@ -472,7 +472,7 @@ PHP_MINIT_FUNCTION(shapefile) } #else /* PHP5 */ -static void mapscript_shapefile_object_destroy(void *object TSRMLS_DC) +static void mapscript_shapefile_object_destroy(void *object) { php_shapefile_object *php_shapefile = (php_shapefile_object *)object; @@ -485,7 +485,7 @@ static void mapscript_shapefile_object_d efree(object); } -static zend_object_value mapscript_shapefile_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_shapefile_object_new(zend_class_entry *ce) { zend_object_value retval; php_shapefile_object *php_shapefile; @@ -493,7 +493,7 @@ static zend_object_value mapscript_shape MAPSCRIPT_ALLOC_OBJECT(php_shapefile, php_shapefile_object); retval = mapscript_object_new(&php_shapefile->std, ce, - &mapscript_shapefile_object_destroy TSRMLS_CC); + &mapscript_shapefile_object_destroy); php_shapefile->bounds = NULL; diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/style.c MapServer-rel-7-6-4-new/mapscript/php/style.c --- MapServer-rel-7-6-4/mapscript/php/style.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/style.c 2021-11-23 13:07:29.492507470 +0100 @@ -86,7 +86,7 @@ PHP_METHOD(styleObj, __construct) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|O", &zparent, &zstyle, mapscript_ce_style) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -101,7 +101,7 @@ PHP_METHOD(styleObj, __construct) else if (Z_TYPE_P(zparent) == IS_OBJECT && Z_OBJCE_P(zparent) == mapscript_ce_label) php_label = MAPSCRIPT_OBJ_P(php_label_object, zparent); else { - mapscript_throw_mapserver_exception("Invalid argument 1: should be a classObj or labelObj" TSRMLS_CC); + mapscript_throw_mapserver_exception("Invalid argument 1: should be a classObj or labelObj"); return; } @@ -110,12 +110,12 @@ PHP_METHOD(styleObj, __construct) if (php_class) { if ((style = styleObj_new(php_class->class, (zstyle ? php_style2->style : NULL))) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } } else { if ((style = styleObj_label_new(php_label->label, (zstyle ? php_style2->style : NULL))) == NULL) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } } @@ -136,7 +136,7 @@ PHP_METHOD(styleObj, __get) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -181,7 +181,7 @@ PHP_METHOD(styleObj, __get) else IF_GET_OBJECT("mincolor", mapscript_ce_color, php_style->mincolor, &php_style->style->mincolor) else IF_GET_OBJECT("maxcolor", mapscript_ce_color, php_style->maxcolor, &php_style->style->maxcolor) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -200,7 +200,7 @@ PHP_METHOD(styleObj, __set) #endif PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -264,7 +264,7 @@ PHP_METHOD(styleObj, __set) /* Can a class have no layer object ? */ php_layer = MAPSCRIPT_OBJ(php_layer_object, php_class->parent.val); if (ZVAL_IS_UNDEF(php_layer->parent.val)) { - mapscript_throw_exception("No map object associated with this style object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this style object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_layer->parent.val); @@ -273,7 +273,7 @@ PHP_METHOD(styleObj, __set) /* The parent is always a map */ php_labelcachemember = MAPSCRIPT_OBJ(php_labelcachemember_object, php_style->parent.val); if (ZVAL_NOT_UNDEF(php_labelcachemember->parent.val)) { - mapscript_throw_exception("No map object associated with this style object." TSRMLS_CC); + mapscript_throw_exception("No map object associated with this style object."); return; } php_map = MAPSCRIPT_OBJ(php_map_object, php_labelcachemember->parent.val); @@ -283,7 +283,7 @@ PHP_METHOD(styleObj, __set) if (styleObj_setSymbolByName(php_style->style, php_map->map, php_style->style->symbolname) == -1) { - mapscript_throw_exception("Symbol not found." TSRMLS_CC); + mapscript_throw_exception("Symbol not found."); return; } } else if ( (STRING_EQUAL("color", property)) || @@ -291,11 +291,11 @@ PHP_METHOD(styleObj, __set) (STRING_EQUAL("backgroundcolor", property)) || (STRING_EQUAL("maxcolor", property)) || (STRING_EQUAL("mincolor", property))) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else if ( (STRING_EQUAL("patternlength", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -313,7 +313,7 @@ PHP_METHOD(styleObj, updateFromString) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -323,7 +323,7 @@ PHP_METHOD(styleObj, updateFromString) php_style = MAPSCRIPT_OBJ_P(php_style_object, zobj); if ((status = styleObj_updateFromString(php_style->style, snippet)) != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -378,7 +378,7 @@ PHP_METHOD(styleObj, setBinding) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ls", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "ls", &bindingId, &value, &value_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -388,12 +388,12 @@ PHP_METHOD(styleObj, setBinding) php_style = MAPSCRIPT_OBJ_P(php_style_object, zobj); if (bindingId < 0 || bindingId > MS_STYLE_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } if (!value || strlen(value) <= 0) { - mapscript_throw_exception("Invalid binding value." TSRMLS_CC); + mapscript_throw_exception("Invalid binding value."); return; } @@ -421,7 +421,7 @@ PHP_METHOD(styleObj, getBinding) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &bindingId) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -431,7 +431,7 @@ PHP_METHOD(styleObj, getBinding) php_style = MAPSCRIPT_OBJ_P(php_style_object, zobj); if (bindingId < 0 || bindingId > MS_STYLE_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } @@ -453,7 +453,7 @@ PHP_METHOD(styleObj, removeBinding) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &bindingId) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -463,7 +463,7 @@ PHP_METHOD(styleObj, removeBinding) php_style = MAPSCRIPT_OBJ_P(php_style_object, zobj); if (bindingId < 0 || bindingId > MS_STYLE_BINDING_LENGTH) { - mapscript_throw_exception("Invalid binding id." TSRMLS_CC); + mapscript_throw_exception("Invalid binding id."); return; } @@ -536,7 +536,7 @@ PHP_METHOD(styleObj, setGeomTransform) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &transform, &transform_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -561,7 +561,7 @@ PHP_METHOD(styleObj, setPattern) php_style_object *php_style; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &zpattern) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -574,7 +574,7 @@ PHP_METHOD(styleObj, setPattern) numelements = zend_hash_num_elements(pattern_hash); if (numelements == 0) { mapscript_report_php_error(E_WARNING, - "style->setpoints : invalid array of %d element(s) as parameter." TSRMLS_CC, numelements); + "style->setpoints : invalid array of %d element(s) as parameter.", numelements); RETURN_LONG(MS_FAILURE); } @@ -649,7 +649,7 @@ zend_function_entry style_functions[] = }; -void mapscript_create_style(styleObj *style, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_style(styleObj *style, parent_object parent, zval *return_value) { php_style_object * php_style; object_init_ex(return_value, mapscript_ce_style); @@ -663,13 +663,13 @@ void mapscript_create_style(styleObj *st #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_style_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_style_create_object(zend_class_entry *ce) { php_style_object *php_style; php_style = ecalloc(1, sizeof(*php_style) + zend_object_properties_size(ce)); - zend_object_std_init(&php_style->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_style->zobj, ce); object_properties_init(&php_style->zobj, ce); php_style->zobj.handlers = &mapscript_style_object_handlers; @@ -720,7 +720,7 @@ PHP_MINIT_FUNCTION(style) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "styleObj", style_functions); - mapscript_ce_style = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_style = zend_register_internal_class(&ce); mapscript_ce_style->create_object = mapscript_style_create_object; mapscript_ce_style->ce_flags |= ZEND_ACC_FINAL; @@ -734,7 +734,7 @@ PHP_MINIT_FUNCTION(style) } #else /* PHP5 */ -static void mapscript_style_object_destroy(void *object TSRMLS_DC) +static void mapscript_style_object_destroy(void *object) { php_style_object *php_style = (php_style_object *)object; @@ -749,7 +749,7 @@ static void mapscript_style_object_destr efree(object); } -static zend_object_value mapscript_style_object_new_ex(zend_class_entry *ce, php_style_object **ptr TSRMLS_DC) +static zend_object_value mapscript_style_object_new_ex(zend_class_entry *ce, php_style_object **ptr) { zend_object_value retval; php_style_object *php_style; @@ -758,7 +758,7 @@ static zend_object_value mapscript_style retval = mapscript_object_new_ex(&php_style->std, ce, &mapscript_style_object_destroy, - &mapscript_style_object_handlers TSRMLS_CC); + &mapscript_style_object_handlers); if (ptr) *ptr = php_style; @@ -771,20 +771,20 @@ static zend_object_value mapscript_style return retval; } -static zend_object_value mapscript_style_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_style_object_new(zend_class_entry *ce) { - return mapscript_style_object_new_ex(ce, NULL TSRMLS_CC); + return mapscript_style_object_new_ex(ce, NULL); } -static zend_object_value mapscript_style_object_clone(zval *zobj TSRMLS_DC) +static zend_object_value mapscript_style_object_clone(zval *zobj) { php_style_object *php_style_old, *php_style_new; zend_object_value new_ov; php_style_old = MAPSCRIPT_OBJ_P(php_style_object, zobj); - new_ov = mapscript_style_object_new_ex(mapscript_ce_style, &php_style_new TSRMLS_CC); - zend_objects_clone_members(&php_style_new->std, new_ov, &php_style_old->std, Z_OBJ_HANDLE_P(zobj) TSRMLS_CC); + new_ov = mapscript_style_object_new_ex(mapscript_ce_style, &php_style_new); + zend_objects_clone_members(&php_style_new->std, new_ov, &php_style_old->std, Z_OBJ_HANDLE_P(zobj)); php_style_new->style = styleObj_clone(php_style_old->style); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/symbol.c MapServer-rel-7-6-4-new/mapscript/php/symbol.c --- MapServer-rel-7-6-4/mapscript/php/symbol.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/symbol.c 2021-11-23 13:07:29.492507470 +0100 @@ -79,7 +79,7 @@ PHP_METHOD(symbolObj, __construct) parent_object parent; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Os", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "Os", &zmap, mapscript_ce_map, &symbolName, &symbolName_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); @@ -93,7 +93,7 @@ PHP_METHOD(symbolObj, __construct) symbolId = msAddNewSymbol(php_map->map, symbolName); if (symbolId == -1) { - mapscript_throw_mapserver_exception("Unable to construct symbolObj" TSRMLS_CC); + mapscript_throw_mapserver_exception("Unable to construct symbolObj"); return; } @@ -113,7 +113,7 @@ PHP_METHOD(symbolObj, __get) php_symbol_object *php_symbol; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -141,7 +141,7 @@ PHP_METHOD(symbolObj, __get) else IF_GET_DOUBLE("maxy", php_symbol->symbol->maxy) else IF_GET_STRING("font", php_symbol->symbol->font) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -154,7 +154,7 @@ PHP_METHOD(symbolObj, __set) php_symbol_object *php_symbol; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -181,9 +181,9 @@ PHP_METHOD(symbolObj, __set) else IF_SET_DOUBLE("miny", php_symbol->symbol->miny, value) else if ( (STRING_EQUAL("numpoints", property)) || (STRING_EQUAL("imagepath", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -199,7 +199,7 @@ PHP_METHOD(symbolObj, setPoints) php_symbol_object *php_symbol; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "a", &zpoints) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -212,7 +212,7 @@ PHP_METHOD(symbolObj, setPoints) numelements = zend_hash_num_elements(points_hash); if ((numelements == 0) || (numelements % 2 != 0)) { mapscript_report_php_error(E_WARNING, - "symbol->setpoints : invalid array of %d element(s) as parameter." TSRMLS_CC, numelements); + "symbol->setpoints : invalid array of %d element(s) as parameter.", numelements); RETURN_LONG(MS_FAILURE); } @@ -290,7 +290,7 @@ PHP_METHOD(symbolObj, setImagePath) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &filename, &filename_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -302,7 +302,7 @@ PHP_METHOD(symbolObj, setImagePath) status = msLoadImageSymbol(php_symbol->symbol, filename); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -319,7 +319,7 @@ PHP_METHOD(symbolObj, setImage) php_image_object *php_image; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zimage, mapscript_ce_image) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -344,7 +344,7 @@ PHP_METHOD(symbolObj, getImage) php_outputformat_object *php_outputformat; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "O", &zoutputformat, mapscript_ce_outputformat) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -357,7 +357,7 @@ PHP_METHOD(symbolObj, getImage) image = symbolObj_getImage(php_symbol->symbol, php_outputformat->outputformat); if (image == NULL) { - mapscript_throw_exception("Unable to get the symbol image" TSRMLS_CC); + mapscript_throw_exception("Unable to get the symbol image"); return; } @@ -366,7 +366,7 @@ PHP_METHOD(symbolObj, getImage) if (msGetOutputFormatIndex(php_map->map, php_outputformat->outputformat->name) == -1) msAppendOutputFormat(php_map->map, php_outputformat->outputformat); - mapscript_create_image(image, return_value TSRMLS_CC); + mapscript_create_image(image, return_value); } /* }}} */ zend_function_entry symbol_functions[] = { @@ -383,7 +383,7 @@ zend_function_entry symbol_functions[] = } }; -void mapscript_create_symbol(symbolObj *symbol, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_symbol(symbolObj *symbol, parent_object parent, zval *return_value) { php_symbol_object * php_symbol; object_init_ex(return_value, mapscript_ce_symbol); @@ -397,13 +397,13 @@ void mapscript_create_symbol(symbolObj * #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_symbol_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_symbol_create_object(zend_class_entry *ce) { php_symbol_object *php_symbol; php_symbol = ecalloc(1, sizeof(*php_symbol) + zend_object_properties_size(ce)); - zend_object_std_init(&php_symbol->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_symbol->zobj, ce); object_properties_init(&php_symbol->zobj, ce); php_symbol->zobj.handlers = &mapscript_symbol_object_handlers; @@ -431,7 +431,7 @@ PHP_MINIT_FUNCTION(symbol) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "symbolObj", symbol_functions); - mapscript_ce_symbol = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_symbol = zend_register_internal_class(&ce); mapscript_ce_symbol->create_object = mapscript_symbol_create_object; mapscript_ce_symbol->ce_flags |= ZEND_ACC_FINAL; @@ -444,7 +444,7 @@ PHP_MINIT_FUNCTION(symbol) } #else /* PHP5 */ -static void mapscript_symbol_object_destroy(void *object TSRMLS_DC) +static void mapscript_symbol_object_destroy(void *object) { php_symbol_object *php_symbol = (php_symbol_object *)object; @@ -457,7 +457,7 @@ static void mapscript_symbol_object_dest efree(object); } -static zend_object_value mapscript_symbol_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_symbol_object_new(zend_class_entry *ce) { zend_object_value retval; php_symbol_object *php_symbol; @@ -465,7 +465,7 @@ static zend_object_value mapscript_symbo MAPSCRIPT_ALLOC_OBJECT(php_symbol, php_symbol_object); retval = mapscript_object_new(&php_symbol->std, ce, - &mapscript_symbol_object_destroy TSRMLS_CC); + &mapscript_symbol_object_destroy); MAPSCRIPT_INIT_PARENT(php_symbol->parent); diff -rupN --no-dereference MapServer-rel-7-6-4/mapscript/php/web.c MapServer-rel-7-6-4-new/mapscript/php/web.c --- MapServer-rel-7-6-4/mapscript/php/web.c 2021-07-12 22:16:21.000000000 +0200 +++ MapServer-rel-7-6-4-new/mapscript/php/web.c 2021-11-23 13:07:29.492507470 +0100 @@ -53,7 +53,7 @@ ZEND_END_ARG_INFO() webObj CANNOT be instanciated, this will throw an exception on use */ PHP_METHOD(webObj, __construct) { - mapscript_throw_exception("webObj cannot be constructed" TSRMLS_CC); + mapscript_throw_exception("webObj cannot be constructed"); } /* }}} */ @@ -65,7 +65,7 @@ PHP_METHOD(webObj, __get) php_web_object *php_web; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &property, &property_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -94,7 +94,7 @@ PHP_METHOD(webObj, __get) else IF_GET_OBJECT("metadata", mapscript_ce_hashtable, php_web->metadata, &php_web->web->metadata) else IF_GET_OBJECT("validation", mapscript_ce_hashtable, php_web->validation, &php_web->web->validation) else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -107,7 +107,7 @@ PHP_METHOD(webObj, __set) php_web_object *php_web; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sz", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz", &property, &property_len, &value) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -133,12 +133,12 @@ PHP_METHOD(webObj, __set) else if ( (STRING_EQUAL("empty", property)) || (STRING_EQUAL("error", property)) || (STRING_EQUAL("extent", property))) { - mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is read-only and cannot be set.", property); } else if ( (STRING_EQUAL("metadata", property)) || (STRING_EQUAL("validation", property)) ) { - mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' is an object and can only be modified through its accessors.", property); } else { - mapscript_throw_exception("Property '%s' does not exist in this object." TSRMLS_CC, property); + mapscript_throw_exception("Property '%s' does not exist in this object.", property); } } @@ -153,7 +153,7 @@ PHP_METHOD(webObj, updateFromString) int status = MS_FAILURE; PHP_MAPSCRIPT_ERROR_HANDLING(TRUE); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", + if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &snippet, &snippet_len) == FAILURE) { PHP_MAPSCRIPT_RESTORE_ERRORS(TRUE); return; @@ -165,7 +165,7 @@ PHP_METHOD(webObj, updateFromString) status = webObj_updateFromString(php_web->web, snippet); if (status != MS_SUCCESS) { - mapscript_throw_mapserver_exception("" TSRMLS_CC); + mapscript_throw_mapserver_exception(""); return; } @@ -234,7 +234,7 @@ zend_function_entry web_functions[] = { } }; -void mapscript_create_web(webObj *web, parent_object parent, zval *return_value TSRMLS_DC) +void mapscript_create_web(webObj *web, parent_object parent, zval *return_value) { php_web_object * php_web; object_init_ex(return_value, mapscript_ce_web); @@ -247,13 +247,13 @@ void mapscript_create_web(webObj *web, p #if PHP_VERSION_ID >= 70000 /* PHP7 - Modification by Bjoern Boldt */ -static zend_object *mapscript_web_create_object(zend_class_entry *ce TSRMLS_DC) +static zend_object *mapscript_web_create_object(zend_class_entry *ce) { php_web_object *php_web; php_web = ecalloc(1, sizeof(*php_web) + zend_object_properties_size(ce)); - zend_object_std_init(&php_web->zobj, ce TSRMLS_CC); + zend_object_std_init(&php_web->zobj, ce); object_properties_init(&php_web->zobj, ce); php_web->zobj.handlers = &mapscript_web_object_handlers; @@ -287,7 +287,7 @@ PHP_MINIT_FUNCTION(web) zend_class_entry ce; INIT_CLASS_ENTRY(ce, "webObj", web_functions); - mapscript_ce_web = zend_register_internal_class(&ce TSRMLS_CC); + mapscript_ce_web = zend_register_internal_class(&ce); mapscript_ce_web->create_object = mapscript_web_create_object; mapscript_ce_web->ce_flags |= ZEND_ACC_FINAL; @@ -300,7 +300,7 @@ PHP_MINIT_FUNCTION(web) } #else /* PHP5 */ -static void mapscript_web_object_destroy(void *object TSRMLS_DC) +static void mapscript_web_object_destroy(void *object) { php_web_object *php_web = (php_web_object *)object; @@ -316,7 +316,7 @@ static void mapscript_web_object_destroy efree(object); } -static zend_object_value mapscript_web_object_new(zend_class_entry *ce TSRMLS_DC) +static zend_object_value mapscript_web_object_new(zend_class_entry *ce) { zend_object_value retval; php_web_object *php_web; @@ -324,7 +324,7 @@ static zend_object_value mapscript_web_o MAPSCRIPT_ALLOC_OBJECT(php_web, php_web_object); retval = mapscript_object_new(&php_web->std, ce, - &mapscript_web_object_destroy TSRMLS_CC); + &mapscript_web_object_destroy); MAPSCRIPT_INIT_PARENT(php_web->parent); php_web->extent = NULL;