aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/c_api.cpp186
-rw-r--r--src/cs2cs.cpp16
-rw-r--r--src/pj_init.c4
-rw-r--r--src/proj.h10
-rw-r--r--src/proj_4D_api.c20
-rw-r--r--src/proj_symbol_rename.h10
-rw-r--r--test/unit/test_c_api.cpp16
7 files changed, 131 insertions, 131 deletions
diff --git a/src/c_api.cpp b/src/c_api.cpp
index ed770e15..e8ad9790 100644
--- a/src/c_api.cpp
+++ b/src/c_api.cpp
@@ -315,12 +315,12 @@ static const char *getOptionValue(const char *option,
* Technically this just increases the reference counter on the object, since
* PJ_OBJ objects are immutable.
*
- * The returned object must be unreferenced with proj_obj_unref() after use.
+ * The returned object must be unreferenced with proj_obj_destroy() after use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param obj Object to clone. Must not be NULL.
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL in
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL in
* case of error.
*/
PJ_OBJ *proj_obj_clone(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
@@ -341,7 +341,7 @@ PJ_OBJ *proj_obj_clone(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
*
* This function calls osgeo::proj::io::createFromUserInput()
*
- * The returned object must be unreferenced with proj_obj_unref() after use.
+ * The returned object must be unreferenced with proj_obj_destroy() after use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
@@ -357,7 +357,7 @@ PJ_OBJ *proj_obj_clone(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
* Orientated projection). In that mode, the epsg:XXXX syntax will be also
* interprated the same way.</li>
* </ul>
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL in
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL in
* case of error.
*/
PJ_OBJ *proj_obj_create_from_user_input(PJ_CONTEXT *ctx, const char *text,
@@ -396,13 +396,13 @@ PJ_OBJ *proj_obj_create_from_user_input(PJ_CONTEXT *ctx, const char *text,
*
* This function calls osgeo::proj::io::WKTParser::createFromWKT()
*
- * The returned object must be unreferenced with proj_obj_unref() after use.
+ * The returned object must be unreferenced with proj_obj_destroy() after use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param wkt WKT string (must not be NULL)
* @param options should be set to NULL for now
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL in
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL in
* case of error.
*/
PJ_OBJ *proj_obj_create_from_wkt(PJ_CONTEXT *ctx, const char *wkt,
@@ -433,13 +433,13 @@ PJ_OBJ *proj_obj_create_from_wkt(PJ_CONTEXT *ctx, const char *wkt,
*
* This function calls osgeo::proj::io::PROJStringParser::createFromPROJString()
*
- * The returned object must be unreferenced with proj_obj_unref() after use.
+ * The returned object must be unreferenced with proj_obj_destroy() after use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param proj_string PROJ string (must not be NULL)
* @param options should be set to NULL for now
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL in
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL in
* case of error.
*/
PJ_OBJ *proj_obj_create_from_proj_string(PJ_CONTEXT *ctx,
@@ -469,7 +469,7 @@ PJ_OBJ *proj_obj_create_from_proj_string(PJ_CONTEXT *ctx,
/** \brief Instanciate an object from a database lookup.
*
- * The returned object must be unreferenced with proj_obj_unref() after use.
+ * The returned object must be unreferenced with proj_obj_destroy() after use.
* It should be used by at most one thread at a time.
*
* @param ctx Context, or NULL for default context.
@@ -480,7 +480,7 @@ PJ_OBJ *proj_obj_create_from_proj_string(PJ_CONTEXT *ctx,
* should be substituted to the official grid names. Only used on
* transformations
* @param options should be set to NULL for now
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL in
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL in
* case of error.
*/
PJ_OBJ *proj_obj_create_from_database(PJ_CONTEXT *ctx, const char *auth_name,
@@ -610,7 +610,7 @@ int proj_uom_get_info_from_database(PJ_CONTEXT *ctx, const char *auth_name,
* @param datum_code Datum code (must not be NULL)
* @param crs_type "geographic 2D", "geographic 3D", "geocentric" or NULL
* @return a result set that must be unreferenced with
- * proj_obj_list_unref(), or NULL in case of error.
+ * proj_obj_list_destroy(), or NULL in case of error.
*/
PJ_OBJ_LIST *proj_obj_query_geodetic_crs_from_datum(PJ_CONTEXT *ctx,
const char *crs_auth_name,
@@ -645,7 +645,7 @@ PJ_OBJ_LIST *proj_obj_query_geodetic_crs_from_datum(PJ_CONTEXT *ctx,
*
* @param obj Object, or NULL.
*/
-void proj_obj_unref(PJ_OBJ *obj) { delete obj; }
+void proj_obj_destroy(PJ_OBJ *obj) { delete obj; }
// ---------------------------------------------------------------------------
@@ -769,7 +769,7 @@ convertPJObjectTypeToObjectType(PJ_OBJ_TYPE type, bool &valid) {
* Or 0 for unlimited.
* @param options should be set to NULL for now
* @return a result set that must be unreferenced with
- * proj_obj_list_unref(), or NULL in case of error.
+ * proj_obj_list_destroy(), or NULL in case of error.
*/
PJ_OBJ_LIST *proj_obj_create_from_name(PJ_CONTEXT *ctx, const char *auth_name,
const char *searchedName,
@@ -921,7 +921,7 @@ int proj_obj_is_deprecated(const PJ_OBJ *obj) {
* @param obj Object (of type CRS for now) for which non-deprecated objects
* must be searched. Must not be NULL
* @return a result set that must be unreferenced with
- * proj_obj_list_unref(), or NULL in case of error.
+ * proj_obj_list_destroy(), or NULL in case of error.
*/
PJ_OBJ_LIST *proj_obj_get_non_deprecated(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
assert(obj);
@@ -1331,13 +1331,13 @@ static const GeodeticCRS *extractGeodeticCRS(PJ_CONTEXT *ctx, const PJ_OBJ *crs,
/** \brief Get the geodeticCRS / geographicCRS from a CRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param crs Objet of type CRS (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_get_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
@@ -1354,7 +1354,7 @@ PJ_OBJ *proj_obj_crs_get_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
/** \brief Get a CRS component from a CompoundCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -1362,7 +1362,7 @@ PJ_OBJ *proj_obj_crs_get_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
* @param crs Objet of type CRS (must not be NULL)
* @param index Index of the CRS component (typically 0 = horizontal, 1 =
* vertical)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_get_sub_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs,
@@ -1385,7 +1385,7 @@ PJ_OBJ *proj_obj_crs_get_sub_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs,
/** \brief Returns a BoundCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -1393,7 +1393,7 @@ PJ_OBJ *proj_obj_crs_get_sub_crs(PJ_CONTEXT *ctx, const PJ_OBJ *crs,
* @param base_crs Base CRS (must not be NULL)
* @param hub_crs Hub CRS (must not be NULL)
* @param transformation Transformation (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_create_bound_crs(PJ_CONTEXT *ctx, const PJ_OBJ *base_crs,
@@ -1434,7 +1434,7 @@ PJ_OBJ *proj_obj_crs_create_bound_crs(PJ_CONTEXT *ctx, const PJ_OBJ *base_crs,
/** \brief Returns potentially
* a BoundCRS, with a transformation to EPSG:4326, wrapping this CRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -1450,7 +1450,7 @@ PJ_OBJ *proj_obj_crs_create_bound_crs(PJ_CONTEXT *ctx, const PJ_OBJ *base_crs,
* intermediate CRS may be considered when computing the possible
* tranformations. Slower.</li>
* </ul>
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_create_bound_crs_to_WGS84(PJ_CONTEXT *ctx,
@@ -1489,13 +1489,13 @@ PJ_OBJ *proj_obj_crs_create_bound_crs_to_WGS84(PJ_CONTEXT *ctx,
/** \brief Get the ellipsoid from a CRS or a GeodeticReferenceFrame.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param obj Objet of type CRS or GeodeticReferenceFrame (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_get_ellipsoid(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
@@ -1521,13 +1521,13 @@ PJ_OBJ *proj_obj_get_ellipsoid(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
/** \brief Get the horizontal datum from a CRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param crs Objet of type CRS (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_get_horizontal_datum(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
@@ -1603,13 +1603,13 @@ int proj_obj_ellipsoid_get_parameters(PJ_CONTEXT *ctx, const PJ_OBJ *ellipsoid,
/** \brief Get the prime meridian of a CRS or a GeodeticReferenceFrame.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param obj Objet of type CRS or GeodeticReferenceFrame (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
@@ -1677,13 +1677,13 @@ int proj_obj_prime_meridian_get_parameters(PJ_CONTEXT *ctx,
/** \brief Return the base CRS of a BoundCRS or a DerivedCRS/ProjectedCRS, or
* the source CRS of a CoordinateOperation.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param obj Objet of type BoundCRS or CoordinateOperation (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error, or missing source CRS.
*/
PJ_OBJ *proj_obj_get_source_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
@@ -1716,13 +1716,13 @@ PJ_OBJ *proj_obj_get_source_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
/** \brief Return the hub CRS of a BoundCRS or the target CRS of a
* CoordinateOperation.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param obj Objet of type BoundCRS or CoordinateOperation (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error, or missing target CRS.
*/
PJ_OBJ *proj_obj_get_target_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
@@ -1778,7 +1778,7 @@ PJ_OBJ *proj_obj_get_target_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj) {
* (0-100). There are as many elements in this array as
* proj_obj_list_get_count()
* returns on the return value of this function. *confidence should be
- * released with proj_free_int_list().
+ * released with proj_destroy_int_list().
* @return a list of matching reference CRS, or nullptr in case of error.
*/
PJ_OBJ_LIST *proj_obj_identify(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
@@ -1828,7 +1828,7 @@ PJ_OBJ_LIST *proj_obj_identify(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
// ---------------------------------------------------------------------------
/** \brief Free an array of integer. */
-void proj_free_int_list(int *list) { delete[] list; }
+void proj_destroy_int_list(int *list) { delete[] list; }
// ---------------------------------------------------------------------------
@@ -1849,12 +1849,12 @@ static PROJ_STRING_LIST set_to_string_list(std::set<std::string> &&set) {
/** \brief Return the list of authorities used in the database.
*
* The returned list is NULL terminated and must be freed with
- * proj_free_string_list().
+ * proj_destroy_string_list().
*
* @param ctx PROJ context, or NULL for default context
*
* @return a NULL terminated list of NUL-terminated strings that must be
- * freed with proj_free_string_list(), or NULL in case of error.
+ * freed with proj_destroy_string_list(), or NULL in case of error.
*/
PROJ_STRING_LIST proj_get_authorities_from_database(PJ_CONTEXT *ctx) {
SANITIZE_CTX(ctx);
@@ -1871,7 +1871,7 @@ PROJ_STRING_LIST proj_get_authorities_from_database(PJ_CONTEXT *ctx) {
/** \brief Returns the set of authority codes of the given object type.
*
* The returned list is NULL terminated and must be freed with
- * proj_free_string_list().
+ * proj_destroy_string_list().
*
* @param ctx PROJ context, or NULL for default context.
* @param auth_name Authority name (must not be NULL)
@@ -1879,7 +1879,7 @@ PROJ_STRING_LIST proj_get_authorities_from_database(PJ_CONTEXT *ctx) {
* @param allow_deprecated whether we should return deprecated objects as well.
*
* @return a NULL terminated list of NUL-terminated strings that must be
- * freed with proj_free_string_list(), or NULL in case of error.
+ * freed with proj_destroy_string_list(), or NULL in case of error.
*/
PROJ_STRING_LIST proj_get_codes_from_database(PJ_CONTEXT *ctx,
const char *auth_name,
@@ -1906,7 +1906,7 @@ PROJ_STRING_LIST proj_get_codes_from_database(PJ_CONTEXT *ctx,
// ---------------------------------------------------------------------------
/** Free a list of NULL terminated strings. */
-void proj_free_string_list(PROJ_STRING_LIST list) {
+void proj_destroy_string_list(PROJ_STRING_LIST list) {
if (list) {
for (size_t i = 0; list[i] != nullptr; i++) {
delete[] list[i];
@@ -1920,14 +1920,14 @@ void proj_free_string_list(PROJ_STRING_LIST list) {
/** \brief Return the Conversion of a DerivedCRS (such as a ProjectedCRS),
* or the Transformation from the baseCRS to the hubCRS of a BoundCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param crs Objet of type DerivedCRS or BoundCRSs (must not be NULL)
* @return Object of type SingleOperation that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_crs_get_coordoperation(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
SANITIZE_CTX(ctx);
@@ -2110,7 +2110,7 @@ static GeodeticReferenceFrameNNPtr createGeodeticReferenceFrame(
/** \brief Create a GeographicCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2131,7 +2131,7 @@ static GeodeticReferenceFrameNNPtr createGeodeticReferenceFrame(
* @param ellipsoidal_cs Coordinate system. Must not be NULL.
*
* @return Object of type GeographicCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_geographic_crs(
PJ_CONTEXT *ctx, const char *crs_name, const char *datum_name,
@@ -2163,7 +2163,7 @@ PJ_OBJ *proj_obj_create_geographic_crs(
/** \brief Create a GeographicCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2173,7 +2173,7 @@ PJ_OBJ *proj_obj_create_geographic_crs(
* @param ellipsoidal_cs Coordinate system. Must not be NULL.
*
* @return Object of type GeographicCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_geographic_crs_from_datum(PJ_CONTEXT *ctx,
const char *crs_name,
@@ -2207,7 +2207,7 @@ PJ_OBJ *proj_obj_create_geographic_crs_from_datum(PJ_CONTEXT *ctx,
/** \brief Create a GeodeticCRS of geocentric type.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2229,7 +2229,7 @@ PJ_OBJ *proj_obj_create_geographic_crs_from_datum(PJ_CONTEXT *ctx,
* 0 for Metre if linear_units == NULL. Otherwise should be not NULL
*
* @return Object of type GeodeticCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_geocentric_crs(
PJ_CONTEXT *ctx, const char *crs_name, const char *datum_name,
@@ -2261,7 +2261,7 @@ PJ_OBJ *proj_obj_create_geocentric_crs(
/** \brief Create a GeodeticCRS of geocentric type.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2273,7 +2273,7 @@ PJ_OBJ *proj_obj_create_geocentric_crs(
* 0 for Metre if linear_units == NULL. Otherwise should be not NULL
*
* @return Object of type GeodeticCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_geocentric_crs_from_datum(PJ_CONTEXT *ctx,
const char *crs_name,
@@ -2305,7 +2305,7 @@ PJ_OBJ *proj_obj_create_geocentric_crs_from_datum(PJ_CONTEXT *ctx,
/** \brief Create a VerticalCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2317,7 +2317,7 @@ PJ_OBJ *proj_obj_create_geocentric_crs_from_datum(PJ_CONTEXT *ctx,
* 0 for Metre if linear_units == NULL. Otherwise should be not NULL
*
* @return Object of type VerticalCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_vertical_crs(PJ_CONTEXT *ctx, const char *crs_name,
const char *datum_name,
@@ -2344,7 +2344,7 @@ PJ_OBJ *proj_obj_create_vertical_crs(PJ_CONTEXT *ctx, const char *crs_name,
/** \brief Create a CompoundCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2354,7 +2354,7 @@ PJ_OBJ *proj_obj_create_vertical_crs(PJ_CONTEXT *ctx, const char *crs_name,
* @param vert_crs Vertical CRS. must not be NULL.
*
* @return Object of type CompoundCRS that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_compound_crs(PJ_CONTEXT *ctx, const char *crs_name,
PJ_OBJ *horiz_crs, PJ_OBJ *vert_crs) {
@@ -2387,7 +2387,7 @@ PJ_OBJ *proj_obj_create_compound_crs(PJ_CONTEXT *ctx, const char *crs_name,
*
* Currently, only implemented on CRS objects.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2396,7 +2396,7 @@ PJ_OBJ *proj_obj_create_compound_crs(PJ_CONTEXT *ctx, const char *crs_name,
* @param name New name. Must not be NULL
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ PROJ_DLL *proj_obj_alter_name(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
const char *name) {
@@ -2423,7 +2423,7 @@ PJ_OBJ PROJ_DLL *proj_obj_alter_name(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
* CRS with new_geod_crs.
* In other cases, it returns a clone of obj.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2432,7 +2432,7 @@ PJ_OBJ PROJ_DLL *proj_obj_alter_name(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
* @param new_geod_crs Object of type GeodeticCRS. Must not be NULL
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_crs_alter_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
const PJ_OBJ *new_geod_crs) {
@@ -2465,7 +2465,7 @@ PJ_OBJ *proj_obj_crs_alter_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
*
* The CRS must be or contain a GeographicCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2477,7 +2477,7 @@ PJ_OBJ *proj_obj_crs_alter_geodetic_crs(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
* 0 for Degree if angular_units == NULL. Otherwise should be not NULL
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_crs_alter_cs_angular_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
const char *angular_units,
@@ -2490,7 +2490,7 @@ PJ_OBJ *proj_obj_crs_alter_cs_angular_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
}
auto geogCRS = dynamic_cast<const GeographicCRS *>(geodCRS->obj.get());
if (!geogCRS) {
- proj_obj_unref(geodCRS);
+ proj_obj_destroy(geodCRS);
return nullptr;
}
@@ -2502,15 +2502,15 @@ PJ_OBJ *proj_obj_crs_alter_cs_angular_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
createPropertyMapName(proj_obj_get_name(geodCRS)), geogCRS->datum(),
geogCRS->datumEnsemble(),
geogCRS->coordinateSystem()->alterAngularUnit(angUnit)));
- proj_obj_unref(geodCRS);
+ proj_obj_destroy(geodCRS);
} catch (const std::exception &e) {
proj_log_error(ctx, __FUNCTION__, e.what());
- proj_obj_unref(geodCRS);
+ proj_obj_destroy(geodCRS);
return nullptr;
}
auto ret = proj_obj_crs_alter_geodetic_crs(ctx, obj, geogCRSAltered);
- proj_obj_unref(geogCRSAltered);
+ proj_obj_destroy(geogCRSAltered);
return ret;
}
@@ -2521,7 +2521,7 @@ PJ_OBJ *proj_obj_crs_alter_cs_angular_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
*
* The CRS must be or contain a ProjectedCRS, VerticalCRS or a GeocentricCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2532,7 +2532,7 @@ PJ_OBJ *proj_obj_crs_alter_cs_angular_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
* 0 for Metre if linear_units == NULL. Otherwise should be not NULL
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_crs_alter_cs_linear_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
const char *linear_units,
@@ -2560,7 +2560,7 @@ PJ_OBJ *proj_obj_crs_alter_cs_linear_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
*
* The CRS must be or contain a ProjectedCRS, VerticalCRS or a GeocentricCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2575,7 +2575,7 @@ PJ_OBJ *proj_obj_crs_alter_cs_linear_unit(PJ_CONTEXT *ctx, const PJ_OBJ *obj,
* equivalent to the original one for reprojection purposes).
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_crs_alter_parameters_linear_unit(PJ_CONTEXT *ctx,
const PJ_OBJ *obj,
@@ -2603,7 +2603,7 @@ PJ_OBJ *proj_obj_crs_alter_parameters_linear_unit(PJ_CONTEXT *ctx,
/** \brief Instanciate a EngineeringCRS with just a name
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2611,7 +2611,7 @@ PJ_OBJ *proj_obj_crs_alter_parameters_linear_unit(PJ_CONTEXT *ctx,
* @param crs_name CRS name. Or NULL.
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ PROJ_DLL *proj_obj_create_engineering_crs(PJ_CONTEXT *ctx,
const char *crs_name) {
@@ -2702,7 +2702,7 @@ static void setSingleOperationElements(
/** \brief Instanciate a Conversion
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2717,7 +2717,7 @@ static void setSingleOperationElements(
* @param params Parameter descriptions (array of size param_count)
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_conversion(PJ_CONTEXT *ctx, const char *name,
@@ -2749,7 +2749,7 @@ PJ_OBJ *proj_obj_create_conversion(PJ_CONTEXT *ctx, const char *name,
/** \brief Instanciate a Transformation
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2772,7 +2772,7 @@ PJ_OBJ *proj_obj_create_conversion(PJ_CONTEXT *ctx, const char *name,
* values means unknown.
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_transformation(
@@ -2856,7 +2856,7 @@ PJ_OBJ *proj_obj_create_transformation(
* @param new_method_name EPSG or PROJ target method name. Or nullptr (in which
* case new_method_epsg_code must be specified).
* @return new conversion that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_convert_conversion_to_other_method(
PJ_CONTEXT *ctx, const PJ_OBJ *conversion, int new_method_epsg_code,
@@ -2944,7 +2944,7 @@ static CoordinateSystemAxisNNPtr createAxis(const PJ_AXIS_DESCRIPTION &axis) {
/** \brief Instanciate a CoordinateSystem.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -2954,7 +2954,7 @@ static CoordinateSystemAxisNNPtr createAxis(const PJ_AXIS_DESCRIPTION &axis) {
* @param axis Axis description (array of size axis_count)
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_cs(PJ_CONTEXT *ctx, PJ_COORDINATE_SYSTEM_TYPE type,
@@ -3059,7 +3059,7 @@ PJ_OBJ *proj_obj_create_cs(PJ_CONTEXT *ctx, PJ_COORDINATE_SYSTEM_TYPE type,
/** \brief Instanciate a CartesiansCS 2D
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -3069,7 +3069,7 @@ PJ_OBJ *proj_obj_create_cs(PJ_CONTEXT *ctx, PJ_COORDINATE_SYSTEM_TYPE type,
* @param unit_conv_factor Unit conversion factor to SI.
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_cartesian_2D_cs(PJ_CONTEXT *ctx,
@@ -3110,7 +3110,7 @@ PJ_OBJ *proj_obj_create_cartesian_2D_cs(PJ_CONTEXT *ctx,
/** \brief Instanciate a Ellipsoidal 2D
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -3120,7 +3120,7 @@ PJ_OBJ *proj_obj_create_cartesian_2D_cs(PJ_CONTEXT *ctx,
* @param unit_conv_factor Unit conversion factor to SI.
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_ellipsoidal_2D_cs(PJ_CONTEXT *ctx,
@@ -3147,7 +3147,7 @@ PJ_OBJ *proj_obj_create_ellipsoidal_2D_cs(PJ_CONTEXT *ctx,
/** \brief Instanciate a ProjectedCRS
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
@@ -3158,7 +3158,7 @@ PJ_OBJ *proj_obj_create_ellipsoidal_2D_cs(PJ_CONTEXT *ctx,
* @param coordinate_system Cartesian coordinate system. Must not be NULL.
*
* @return Object that must be unreferenced with
- * proj_obj_unref(), or NULL in case of error.
+ * proj_obj_destroy(), or NULL in case of error.
*/
PJ_OBJ *proj_obj_create_projected_crs(PJ_CONTEXT *ctx, const char *crs_name,
@@ -5781,7 +5781,7 @@ struct PJ_OPERATION_FACTORY_CONTEXT {
* two CRS.
*
* The returned object must be unreferenced with
- * proj_operation_factory_context_unref() after use.
+ * proj_operation_factory_context_destroy() after use.
*
* If authority is NULL or the empty string, then coordinate
* operations from any authority will be searched, with the restrictions set
@@ -5795,7 +5795,7 @@ struct PJ_OPERATION_FACTORY_CONTEXT {
* @param authority Name of authority to which to restrict the search of
* candidate operations.
* @return Object that must be unreferenced with
- * proj_operation_factory_context_unref(), or NULL in
+ * proj_operation_factory_context_destroy(), or NULL in
* case of error.
*/
PJ_OPERATION_FACTORY_CONTEXT *
@@ -5833,7 +5833,7 @@ proj_create_operation_factory_context(PJ_CONTEXT *ctx, const char *authority) {
*
* @param ctx Object, or NULL.
*/
-void proj_operation_factory_context_unref(PJ_OPERATION_FACTORY_CONTEXT *ctx) {
+void proj_operation_factory_context_destroy(PJ_OPERATION_FACTORY_CONTEXT *ctx) {
delete ctx;
}
@@ -6111,7 +6111,7 @@ void proj_operation_factory_context_set_allowed_intermediate_crs(
* @param target_crs source CRS. Must not be NULL.
* @param operationContext Search context. Must not be NULL.
* @return a result set that must be unreferenced with
- * proj_obj_list_unref(), or NULL in case of error.
+ * proj_obj_list_destroy(), or NULL in case of error.
*/
PJ_OBJ_LIST *proj_obj_create_operations(
PJ_CONTEXT *ctx, const PJ_OBJ *source_crs, const PJ_OBJ *target_crs,
@@ -6163,14 +6163,14 @@ int proj_obj_list_get_count(const PJ_OBJ_LIST *result) {
/** \brief Return an object from the result set
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param result Objet of type PJ_OBJ_LIST (must not be NULL)
* @param index Index
- * @return a new object that must be unreferenced with proj_obj_unref(),
+ * @return a new object that must be unreferenced with proj_obj_destroy(),
* or nullptr in case of error.
*/
@@ -6194,7 +6194,7 @@ PJ_OBJ *proj_obj_list_get(PJ_CONTEXT *ctx, const PJ_OBJ_LIST *result,
*
* @param result Object, or NULL.
*/
-void proj_obj_list_unref(PJ_OBJ_LIST *result) { delete result; }
+void proj_obj_list_destroy(PJ_OBJ_LIST *result) { delete result; }
// ---------------------------------------------------------------------------
@@ -6230,13 +6230,13 @@ double proj_coordoperation_get_accuracy(PJ_CONTEXT *ctx,
/** \brief Returns the datum of a SingleCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param crs Objet of type SingleCRS (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error (or if there is no datum)
*/
PJ_OBJ *proj_obj_crs_get_datum(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
@@ -6258,13 +6258,13 @@ PJ_OBJ *proj_obj_crs_get_datum(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
/** \brief Returns the coordinate system of a SingleCRS.
*
- * The returned object must be unreferenced with proj_obj_unref() after
+ * The returned object must be unreferenced with proj_obj_destroy() after
* use.
* It should be used by at most one thread at a time.
*
* @param ctx PROJ context, or NULL for default context
* @param crs Objet of type SingleCRS (must not be NULL)
- * @return Object that must be unreferenced with proj_obj_unref(), or NULL
+ * @return Object that must be unreferenced with proj_obj_destroy(), or NULL
* in case of error.
*/
PJ_OBJ *proj_obj_crs_get_coordinate_system(PJ_CONTEXT *ctx, const PJ_OBJ *crs) {
diff --git a/src/cs2cs.cpp b/src/cs2cs.cpp
index 3345bcc6..f63bedcc 100644
--- a/src/cs2cs.cpp
+++ b/src/cs2cs.cpp
@@ -226,7 +226,7 @@ static PJ_OBJ *instanciate_crs(const std::string &definition,
auto type = proj_obj_get_type(crs);
if (type == PJ_OBJ_TYPE_BOUND_CRS) {
auto base = proj_obj_get_source_crs(nullptr, crs);
- proj_obj_unref(crs);
+ proj_obj_destroy(crs);
crs = base;
type = proj_obj_get_type(crs);
}
@@ -250,7 +250,7 @@ static PJ_OBJ *instanciate_crs(const std::string &definition,
NS_PROJ::internal::ci_find(std::string(axisName), "latitude") !=
std::string::npos;
- proj_obj_unref(cs);
+ proj_obj_destroy(cs);
}
return crs;
@@ -267,7 +267,7 @@ static std::string get_geog_crs_proj_string_from_proj_crs(PJ_OBJ *src,
if (srcType == PJ_OBJ_TYPE_BOUND_CRS) {
auto base = proj_obj_get_source_crs(nullptr, src);
assert(base);
- proj_obj_unref(src);
+ proj_obj_destroy(src);
src = base;
srcType = proj_obj_get_type(src);
}
@@ -280,7 +280,7 @@ static std::string get_geog_crs_proj_string_from_proj_crs(PJ_OBJ *src,
auto baseType = proj_obj_get_type(base);
if (baseType != PJ_OBJ_TYPE_GEOGRAPHIC_2D_CRS &&
baseType != PJ_OBJ_TYPE_GEOGRAPHIC_3D_CRS) {
- proj_obj_unref(base);
+ proj_obj_destroy(base);
return std::string();
}
@@ -300,11 +300,11 @@ static std::string get_geog_crs_proj_string_from_proj_crs(PJ_OBJ *src,
isLatFirst = NS_PROJ::internal::ci_find(std::string(axisName),
"latitude") != std::string::npos;
- proj_obj_unref(cs);
+ proj_obj_destroy(cs);
auto retCStr = proj_obj_as_proj_string(nullptr, base, PJ_PROJ_5, nullptr);
std::string ret(retCStr ? retCStr : "");
- proj_obj_unref(base);
+ proj_obj_destroy(base);
return ret;
}
@@ -581,8 +581,8 @@ int main(int argc, char **argv) {
srcIsGeog = true;
}
- proj_obj_unref(src);
- proj_obj_unref(dst);
+ proj_obj_destroy(src);
+ proj_obj_destroy(dst);
transformation = proj_create_crs_to_crs(nullptr, fromStr.c_str(),
toStr.c_str(), nullptr);
diff --git a/src/pj_init.c b/src/pj_init.c
index bc81235e..36a3276f 100644
--- a/src/pj_init.c
+++ b/src/pj_init.c
@@ -292,7 +292,7 @@ Expand key from buffer or (if not in buffer) from init file
proj_string = proj_obj_as_proj_string(ctx, src, PJ_PROJ_4, NULL);
if( !proj_string ) {
- proj_obj_unref(src);
+ proj_obj_destroy(src);
return 0;
}
definition = (char*)calloc(1, strlen(proj_string)+1);
@@ -300,7 +300,7 @@ Expand key from buffer or (if not in buffer) from init file
strcpy(definition, proj_string);
}
- proj_obj_unref(src);
+ proj_obj_destroy(src);
}
}
diff --git a/src/proj.h b/src/proj.h
index c726b5ae..b73414bc 100644
--- a/src/proj.h
+++ b/src/proj.h
@@ -524,7 +524,7 @@ int PROJ_DLL proj_uom_get_info_from_database(PJ_CONTEXT *ctx,
double *out_conv_factor,
const char **out_category);
-void PROJ_DLL proj_obj_unref(PJ_OBJ *obj);
+void PROJ_DLL proj_obj_destroy(PJ_OBJ *obj);
PJ_OBJ PROJ_DLL *proj_obj_clone(PJ_CONTEXT *ctx, const PJ_OBJ *obj);
@@ -673,7 +673,7 @@ PJ_OBJ_LIST PROJ_DLL *proj_obj_identify(PJ_CONTEXT *ctx,
const char* const *options,
int **out_confidence);
-void PROJ_DLL proj_free_int_list(int* list);
+void PROJ_DLL proj_destroy_int_list(int* list);
/* ------------------------------------------------------------------------- */
@@ -687,7 +687,7 @@ PROJ_STRING_LIST PROJ_DLL proj_get_codes_from_database(PJ_CONTEXT *ctx,
PJ_OBJ_TYPE type,
int allow_deprecated);
-void PROJ_DLL proj_free_string_list(PROJ_STRING_LIST list);
+void PROJ_DLL proj_destroy_string_list(PROJ_STRING_LIST list);
/* ------------------------------------------------------------------------- */
@@ -700,7 +700,7 @@ PJ_OPERATION_FACTORY_CONTEXT PROJ_DLL *proj_create_operation_factory_context(
PJ_CONTEXT *ctx,
const char *authority);
-void PROJ_DLL proj_operation_factory_context_unref(
+void PROJ_DLL proj_operation_factory_context_destroy(
PJ_OPERATION_FACTORY_CONTEXT *ctx);
void PROJ_DLL proj_operation_factory_context_set_desired_accuracy(
@@ -806,7 +806,7 @@ PJ_OBJ PROJ_DLL *proj_obj_list_get(PJ_CONTEXT *ctx,
const PJ_OBJ_LIST *result,
int index);
-void PROJ_DLL proj_obj_list_unref(PJ_OBJ_LIST *result);
+void PROJ_DLL proj_obj_list_destroy(PJ_OBJ_LIST *result);
/* ------------------------------------------------------------------------- */
diff --git a/src/proj_4D_api.c b/src/proj_4D_api.c
index 6ba56764..75a061a0 100644
--- a/src/proj_4D_api.c
+++ b/src/proj_4D_api.c
@@ -758,14 +758,14 @@ PJ *proj_create_crs_to_crs (PJ_CONTEXT *ctx, const char *source_crs, const char
dst = proj_obj_create_from_user_input(ctx, target_crs, optionsImportCRS);
if( !dst ) {
- proj_obj_unref(src);
+ proj_obj_destroy(src);
return NULL;
}
operation_ctx = proj_create_operation_factory_context(ctx, NULL);
if( !operation_ctx ) {
- proj_obj_unref(src);
- proj_obj_unref(dst);
+ proj_obj_destroy(src);
+ proj_obj_destroy(dst);
return NULL;
}
@@ -784,28 +784,28 @@ PJ *proj_create_crs_to_crs (PJ_CONTEXT *ctx, const char *source_crs, const char
op_list = proj_obj_create_operations(ctx, src, dst, operation_ctx);
- proj_operation_factory_context_unref(operation_ctx);
- proj_obj_unref(src);
- proj_obj_unref(dst);
+ proj_operation_factory_context_destroy(operation_ctx);
+ proj_obj_destroy(src);
+ proj_obj_destroy(dst);
if( !op_list ) {
return NULL;
}
if( proj_obj_list_get_count(op_list) == 0 ) {
- proj_obj_list_unref(op_list);
+ proj_obj_list_destroy(op_list);
return NULL;
}
op = proj_obj_list_get(ctx, op_list, 0);
- proj_obj_list_unref(op_list);
+ proj_obj_list_destroy(op_list);
if( !op ) {
return NULL;
}
proj_string = proj_obj_as_proj_string(ctx, op, PJ_PROJ_5, NULL);
if( !proj_string) {
- proj_obj_unref(op);
+ proj_obj_destroy(op);
return NULL;
}
@@ -816,7 +816,7 @@ PJ *proj_create_crs_to_crs (PJ_CONTEXT *ctx, const char *source_crs, const char
P = proj_create(ctx, proj_string);
}
- proj_obj_unref(op);
+ proj_obj_destroy(op);
return P;
}
diff --git a/src/proj_symbol_rename.h b/src/proj_symbol_rename.h
index a267b97e..210dd7ed 100644
--- a/src/proj_symbol_rename.h
+++ b/src/proj_symbol_rename.h
@@ -136,8 +136,8 @@
#define proj_errno_set internal_proj_errno_set
#define proj_errno_string internal_proj_errno_string
#define proj_factors internal_proj_factors
-#define proj_free_int_list internal_proj_free_int_list
-#define proj_free_string_list internal_proj_free_string_list
+#define proj_destroy_int_list internal_proj_destroy_int_list
+#define proj_destroy_string_list internal_proj_destroy_string_list
#define proj_geod internal_proj_geod
#define proj_get_authorities_from_database internal_proj_get_authorities_from_database
#define proj_get_codes_from_database internal_proj_get_codes_from_database
@@ -253,9 +253,9 @@
#define proj_obj_is_equivalent_to internal_proj_obj_is_equivalent_to
#define proj_obj_list_get internal_proj_obj_list_get
#define proj_obj_list_get_count internal_proj_obj_list_get_count
-#define proj_obj_list_unref internal_proj_obj_list_unref
+#define proj_obj_list_destroy internal_proj_obj_list_destroy
#define proj_obj_prime_meridian_get_parameters internal_proj_obj_prime_meridian_get_parameters
-#define proj_obj_unref internal_proj_obj_unref
+#define proj_obj_destroy internal_proj_obj_destroy
#define proj_operation_factory_context_set_allowed_intermediate_crs internal_proj_operation_factory_context_set_allowed_intermediate_crs
#define proj_operation_factory_context_set_allow_use_intermediate_crs internal_proj_operation_factory_context_set_allow_use_intermediate_crs
#define proj_operation_factory_context_set_area_of_interest internal_proj_operation_factory_context_set_area_of_interest
@@ -264,7 +264,7 @@
#define proj_operation_factory_context_set_grid_availability_use internal_proj_operation_factory_context_set_grid_availability_use
#define proj_operation_factory_context_set_spatial_criterion internal_proj_operation_factory_context_set_spatial_criterion
#define proj_operation_factory_context_set_use_proj_alternative_grid_names internal_proj_operation_factory_context_set_use_proj_alternative_grid_names
-#define proj_operation_factory_context_unref internal_proj_operation_factory_context_unref
+#define proj_operation_factory_context_destroy internal_proj_operation_factory_context_destroy
#define proj_pj_info internal_proj_pj_info
#define proj_roundtrip internal_proj_roundtrip
#define proj_rtodms internal_proj_rtodms
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp
index 0e076912..36b08529 100644
--- a/test/unit/test_c_api.cpp
+++ b/test/unit/test_c_api.cpp
@@ -113,7 +113,7 @@ class CApi : public ::testing::Test {
struct ObjectKeeper {
PJ_OBJ *m_obj = nullptr;
explicit ObjectKeeper(PJ_OBJ *obj) : m_obj(obj) {}
- ~ObjectKeeper() { proj_obj_unref(m_obj); }
+ ~ObjectKeeper() { proj_obj_destroy(m_obj); }
ObjectKeeper(const ObjectKeeper &) = delete;
ObjectKeeper &operator=(const ObjectKeeper &) = delete;
@@ -123,7 +123,7 @@ class CApi : public ::testing::Test {
PJ_OPERATION_FACTORY_CONTEXT *m_op_ctxt = nullptr;
explicit ContextKeeper(PJ_OPERATION_FACTORY_CONTEXT *op_ctxt)
: m_op_ctxt(op_ctxt) {}
- ~ContextKeeper() { proj_operation_factory_context_unref(m_op_ctxt); }
+ ~ContextKeeper() { proj_operation_factory_context_destroy(m_op_ctxt); }
ContextKeeper(const ContextKeeper &) = delete;
ContextKeeper &operator=(const ContextKeeper &) = delete;
@@ -132,7 +132,7 @@ class CApi : public ::testing::Test {
struct ObjListKeeper {
PJ_OBJ_LIST *m_res = nullptr;
explicit ObjListKeeper(PJ_OBJ_LIST *res) : m_res(res) {}
- ~ObjListKeeper() { proj_obj_list_unref(m_res); }
+ ~ObjListKeeper() { proj_obj_list_destroy(m_res); }
ObjListKeeper(const ObjListKeeper &) = delete;
ObjListKeeper &operator=(const ObjListKeeper &) = delete;
@@ -142,7 +142,7 @@ class CApi : public ::testing::Test {
// ---------------------------------------------------------------------------
TEST_F(CApi, proj_obj_create_from_user_input) {
- proj_obj_unref(nullptr);
+ proj_obj_destroy(nullptr);
EXPECT_EQ(proj_obj_create_from_user_input(m_ctxt, "invalid", nullptr),
nullptr);
{
@@ -165,7 +165,7 @@ TEST_F(CApi, proj_obj_create_from_user_input) {
// ---------------------------------------------------------------------------
TEST_F(CApi, proj_obj_create_from_wkt) {
- proj_obj_unref(nullptr);
+ proj_obj_destroy(nullptr);
EXPECT_EQ(proj_obj_create_from_wkt(m_ctxt, "invalid", nullptr), nullptr);
auto obj = proj_obj_create_from_wkt(
m_ctxt,
@@ -179,7 +179,7 @@ TEST_F(CApi, proj_obj_create_from_wkt) {
// ---------------------------------------------------------------------------
TEST_F(CApi, proj_obj_create_from_proj_string) {
- proj_obj_unref(nullptr);
+ proj_obj_destroy(nullptr);
EXPECT_EQ(proj_obj_create_from_proj_string(m_ctxt, "invalid", nullptr),
nullptr);
auto obj =
@@ -927,7 +927,7 @@ TEST_F(CApi, proj_obj_get_source_target_crs_invalid_object) {
struct ListFreer {
PROJ_STRING_LIST list;
ListFreer(PROJ_STRING_LIST ptrIn) : list(ptrIn) {}
- ~ListFreer() { proj_free_string_list(list); }
+ ~ListFreer() { proj_destroy_string_list(list); }
ListFreer(const ListFreer &) = delete;
ListFreer &operator=(const ListFreer &) = delete;
};
@@ -1479,7 +1479,7 @@ TEST_F(CApi, proj_obj_identify) {
ObjListKeeper keeper_res(res);
EXPECT_EQ(proj_obj_list_get_count(res), 1);
EXPECT_EQ(confidence[0], 100);
- proj_free_int_list(confidence);
+ proj_destroy_int_list(confidence);
}
{
auto objEllps = proj_obj_create_from_wkt(