From nobody Sun Jul 09 10:36:22 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QzNpZ45T2z4llWq; Sun, 9 Jul 2023 10:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QzNpZ3pnhz46Lm; Sun, 9 Jul 2023 10:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688898982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQ6J4oCssJZWI9PNFdDTsm6Bmqe8sdxqx6n2ZrLheAA=; b=CVzbZ5HRqc44821hV1fHc6t8aSJQhVDcSfjkSBWx1bQ3QZJ1ZzquXjbhUk6PHhaUxvSiwx oWQDL3GTxsL0Yx7i6CL8Je69bJm8rRLRH+zD4V6GvSJjsYa4YRemmCZQ8Z6A0/2vZk/RaG basY7EqpO7wJq4MekkpZOLXYU/QehVPE9jMeAiG0YgMEpwhjgeG9UBk8xbaWaGr/yEWSHA qRcQDF/HwAIomQm2pel8RMTCJpyHZ/oEqjF4VBTfCGVVAlRRLswm4MRgLpgeYrDEpggGid NGzE8NHOIQ943ywFlpGJFdK85TTXvPqu0P+m6ZN6iz/JxHSny80NNLUo5zVbyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688898982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IQ6J4oCssJZWI9PNFdDTsm6Bmqe8sdxqx6n2ZrLheAA=; b=woeYF2Df1UdoxKvscbi2yrgGw4j6Y9/XO4qLerQ5duqBQFGHXqaMU0KpfJP7wskT/1Z9A6 34/ZvarO8gB0PI76fYbiPivwkGMoD2NTEKBZTuqTNgxugvX5eO0IPLJtQTBFF0886Jfb8e XSk5KF/FciC2Jzk7aAhAHKYTAVRzlcPD4EeINQkafmrNH5LyiqWRHLuWx0Qb/EpZJAbhQx GYdQ7IH/POc3oHdKBhrgmOHJ6J83ko6TwZZl/UJKegDtYfiiFkri9xsfCCZkCalBcB8FTw TXt/5rwXysKikdqLo84k7aUhYmH3HEBxpq3QisuRiFMTKDjX7YFGxMGajQNL4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688898982; a=rsa-sha256; cv=none; b=RKaCmthWl1pg2+3Kc/HvxFXd4xC8WCQt7ne67D36rcV35PCJVAANlkLpT6ELxGZNVMG3W2 EdnRMxUCuZ6OLrfsfaMYeOsTYjDaP2jkz/PzPRkLGCyzTK2pLxBb+Ux8Zc4OY5WsJ8RusB 3cpRHDCyulY6CV+sdJKtnh1GdUc6M+daFOSfR0rg90wiErvC0FAgO7mlLTGtJStMI11Plb b3Mo8Bl91qrUIRP0Ib3FCVeZoYwkmxMKqfeA/Fr74i46QARH/1kcQZ64O//fEbd5qpCuY4 ArcYjBVsckgd7+nXeNmwg3P0vlz4DlPWzFWRJ0XN6dWIHXs1SK/BTpHnCWbm5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QzNpZ2SgKz100w; Sun, 9 Jul 2023 10:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369AaMKO058352; Sun, 9 Jul 2023 10:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369AaMiW058351; Sun, 9 Jul 2023 10:36:22 GMT (envelope-from git) Date: Sun, 9 Jul 2023 10:36:22 GMT Message-Id: <202307091036.369AaMiW058351@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 7e5a28401279 - main - graphics/py-pygeos: Fix build with Clang 16 and remove the workaround List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7e5a28401279485c1ef8eddd533c96eb3cb3ffc7 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=7e5a28401279485c1ef8eddd533c96eb3cb3ffc7 commit 7e5a28401279485c1ef8eddd533c96eb3cb3ffc7 Author: Po-Chuan Hsieh AuthorDate: 2023-07-09 10:19:37 +0000 Commit: Po-Chuan Hsieh CommitDate: 2023-07-09 10:19:37 +0000 graphics/py-pygeos: Fix build with Clang 16 and remove the workaround src/ufuncs.c:166:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Y_b_funcs[1] = {&Y_b_func}; ^~~~~~~~~ src/ufuncs.c:198:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction O_b_funcs[1] = {&O_b_func}; ^~~~~~~~~ src/ufuncs.c:239:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YY_b_funcs[1] = {&YY_b_func}; ^~~~~~~~~~ src/ufuncs.c:320:50: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YY_b_p_funcs[1] = {&YY_b_p_func}; ^~~~~~~~~~~~ src/ufuncs.c:341:55: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction is_prepared_funcs[1] = {&is_prepared_func}; ^~~~~~~~~~~~~~~~~ src/ufuncs.c:458:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Y_Y_funcs[1] = {&Y_Y_func}; ^~~~~~~~~ src/ufuncs.c:507:45: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Y_funcs[1] = {&Y_func}; ^~~~~~~ src/ufuncs.c:593:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Yd_Y_funcs[1] = {&Yd_Y_func}; ^~~~~~~~~~ src/ufuncs.c:729:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Yi_Y_funcs[1] = {&Yi_Y_func}; ^~~~~~~~~~ src/ufuncs.c:877:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YY_Y_funcs[1] = {&YY_Y_func}; ^~~~~~~~~~ src/ufuncs.c:981:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Y_d_funcs[1] = {&Y_d_func}; ^~~~~~~~~ src/ufuncs.c:1066:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction Y_i_funcs[1] = {&Y_i_func}; ^~~~~~~~~ src/ufuncs.c:1159:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YY_d_funcs[1] = {&YY_d_func}; ^~~~~~~~~~ src/ufuncs.c:1200:49: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YYd_d_funcs[1] = {&YYd_d_func}; ^~~~~~~~~~~ src/ufuncs.c:1253:49: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction YYd_Y_funcs[1] = {&YYd_Y_func}; ^~~~~~~~~~~ src/ufuncs.c:1298:47: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction box_funcs[1] = {&box_func}; ^~~~~~~~~ src/ufuncs.c:1389:50: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction buffer_funcs[1] = {&buffer_func}; ^~~~~~~~~~~~ src/ufuncs.c:1451:56: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction offset_curve_funcs[1] = {&offset_curve_func}; ^~~~~~~~~~~~~~~~~~ src/ufuncs.c:1496:48: error: incompatible function pointer types initializing 'PyUFuncGenericFunction' (aka 'void (*)(char **, const long *, const long *, void *)') with an expression of type 'void (*)(char **, npy_intp *, npy_intp *, void *)' (aka 'void (*)(char **, long *, long *, void *)') [-Wincompatible-function-pointer-types] static PyUFuncGenericFunction snap_funcs[1] = {&snap_func}; ^~~~~~~~~~ fatal error: too many errors emitted, stopping now [-ferror-limit=] 2 warnings and 20 errors generated. Reference: https://github.com/numpy/numpy/commit/e94cec800304a6a467cf90ce4e7d3e207770b4b4 --- graphics/py-pygeos/Makefile | 6 - graphics/py-pygeos/files/patch-clang16 | 398 +++++++++++++++++++++++++++++++++ 2 files changed, 398 insertions(+), 6 deletions(-) diff --git a/graphics/py-pygeos/Makefile b/graphics/py-pygeos/Makefile index 3beddab7ae46..791ed7d9f2e6 100644 --- a/graphics/py-pygeos/Makefile +++ b/graphics/py-pygeos/Makefile @@ -20,12 +20,6 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=1.13,1:math/py-numpy@${PY_FLAVOR} USES= python USE_PYTHON= autoplist concurrent cython pep517 -.include - -.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1400091 -CFLAGS+= -Wno-error=incompatible-function-pointer-types -.endif - post-install: ${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR} -name '*.so' -exec ${STRIP_CMD} {} + diff --git a/graphics/py-pygeos/files/patch-clang16 b/graphics/py-pygeos/files/patch-clang16 new file mode 100644 index 000000000000..d5f1d76adc14 --- /dev/null +++ b/graphics/py-pygeos/files/patch-clang16 @@ -0,0 +1,398 @@ +--- src/ufuncs.c.orig 2022-12-12 08:21:17 UTC ++++ src/ufuncs.c +@@ -132,7 +132,7 @@ static void* is_ccw_data[1] = {GEOSGeom_isCCW_r}; + + typedef char FuncGEOS_Y_b(void* context, void* a); + static char Y_b_dtypes[2] = {NPY_OBJECT, NPY_BOOL}; +-static void Y_b_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Y_b_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Y_b* func = (FuncGEOS_Y_b*)data; + GEOSGeometry* in1 = NULL; + char ret; +@@ -189,7 +189,7 @@ static char IsValidInput(void* context, PyObject* obj) + static void* is_valid_input_data[1] = {IsValidInput}; + typedef char FuncGEOS_O_b(void* context, PyObject* obj); + static char O_b_dtypes[2] = {NPY_OBJECT, NPY_BOOL}; +-static void O_b_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void O_b_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_O_b* func = (FuncGEOS_O_b*)data; + GEOS_INIT_THREADS; + UNARY_LOOP { *(npy_bool*)op1 = func(ctx, *(PyObject**)ip1); } +@@ -201,7 +201,7 @@ static PyUFuncGenericFunction O_b_funcs[1] = {&O_b_fun + static void* equals_data[1] = {GEOSEquals_r}; + typedef char FuncGEOS_YY_b(void* context, void* a, void* b); + static char YY_b_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_BOOL}; +-static void YY_b_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YY_b_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_YY_b* func = (FuncGEOS_YY_b*)data; + GEOSGeometry *in1 = NULL, *in2 = NULL; + char ret; +@@ -273,7 +273,7 @@ static void* touches_data[1] = {touches_func_tuple}; + static void* within_func_tuple[2] = {GEOSWithin_r, GEOSPreparedWithin_r}; + static void* within_data[1] = {within_func_tuple}; + static char YY_b_p_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_BOOL}; +-static void YY_b_p_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YY_b_p_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_YY_b* func = ((FuncGEOS_YY_b**)data)[0]; + FuncGEOS_YY_b* func_prepared = ((FuncGEOS_YY_b**)data)[1]; + +@@ -320,7 +320,7 @@ finish: + static PyUFuncGenericFunction YY_b_p_funcs[1] = {&YY_b_p_func}; + + static char is_prepared_dtypes[2] = {NPY_OBJECT, NPY_BOOL}; +-static void is_prepared_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void is_prepared_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* in1 = NULL; + GEOSPreparedGeometry* in1_prepared = NULL; +@@ -411,7 +411,7 @@ static void* oriented_envelope_data[1] = {GEOSMinimumR + #endif + typedef void* FuncGEOS_Y_Y(void* context, void* a); + static char Y_Y_dtypes[2] = {NPY_OBJECT, NPY_OBJECT}; +-static void Y_Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Y_Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Y_Y* func = (FuncGEOS_Y_Y*)data; + GEOSGeometry* in1 = NULL; + GEOSGeometry** geom_arr; +@@ -479,7 +479,7 @@ static void* prepare_data[1] = {PrepareGeometryObject} + static void* destroy_prepared_data[1] = {DestroyPreparedGeometryObject}; + typedef char FuncPyGEOS_Y(void* ctx, GeometryObject* geom); + static char Y_dtypes[1] = {NPY_OBJECT}; +-static void Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncPyGEOS_Y* func = (FuncPyGEOS_Y*)data; + GEOSGeometry* in1 = NULL; + GeometryObject* geom_obj = NULL; +@@ -546,7 +546,7 @@ static void* segmentize_data[1] = {GEOSDensify_r}; + + typedef void* FuncGEOS_Yd_Y(void* context, void* a, double b); + static char Yd_Y_dtypes[3] = {NPY_OBJECT, NPY_DOUBLE, NPY_OBJECT}; +-static void Yd_Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Yd_Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Yd_Y* func = (FuncGEOS_Yd_Y*)data; + GEOSGeometry* in1 = NULL; + GEOSGeometry** geom_arr; +@@ -681,7 +681,7 @@ static void* GEOSSetSRID_r_with_clone(void* context, v + static void* set_srid_data[1] = {GEOSSetSRID_r_with_clone}; + typedef void* FuncGEOS_Yi_Y(void* context, void* a, int b); + static char Yi_Y_dtypes[3] = {NPY_OBJECT, NPY_INT, NPY_OBJECT}; +-static void Yi_Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Yi_Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Yi_Y* func = (FuncGEOS_Yi_Y*)data; + GEOSGeometry* in1 = NULL; + GEOSGeometry** geom_arr; +@@ -817,7 +817,7 @@ static void YY_Y_func_reduce(char** args, npy_intp* di + } + } + +-static void YY_Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YY_Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + // A reduce is characterized by multiple iterations (dimension[0] > 1) that + // are output on the same place in memory (steps[2] == 0). + if ((steps[2] == 0) && (dimensions[0] > 1)) { +@@ -952,7 +952,7 @@ static void* minimum_bounding_radius_data[1] = {GEOSMi + #endif + typedef int FuncGEOS_Y_d(void* context, void* a, double* b); + static char Y_d_dtypes[2] = {NPY_OBJECT, NPY_DOUBLE}; +-static void Y_d_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Y_d_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Y_d* func = (FuncGEOS_Y_d*)data; + GEOSGeometry* in1 = NULL; + +@@ -1029,7 +1029,7 @@ static void* get_num_coordinates_data[1] = {get_num_co + + typedef int FuncGEOS_Y_i(void* context, void* a); + static char Y_i_dtypes[2] = {NPY_OBJECT, NPY_INT}; +-static void Y_i_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void Y_i_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_Y_i* func = ((FuncGEOS_Y_i**)data)[0]; + int errcode = (int)((int**)data)[1]; + int none_value = (int)((int**)data)[2]; +@@ -1119,7 +1119,7 @@ static int GEOSProjectNormalizedWrapped_r(void* contex + static void* line_locate_point_normalized_data[1] = {GEOSProjectNormalizedWrapped_r}; + typedef int FuncGEOS_YY_d(void* context, void* a, void* b, double* c); + static char YY_d_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE}; +-static void YY_d_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YY_d_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_YY_d* func = (FuncGEOS_YY_d*)data; + GEOSGeometry *in1 = NULL, *in2 = NULL; + +@@ -1165,7 +1165,7 @@ static void* frechet_distance_densify_data[1] = {GEOSF + #endif + typedef int FuncGEOS_YYd_d(void* context, void* a, void* b, double c, double* d); + static char YYd_d_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE, NPY_DOUBLE}; +-static void YYd_d_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YYd_d_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_YYd_d* func = (FuncGEOS_YYd_d*)data; + GEOSGeometry *in1 = NULL, *in2 = NULL; + +@@ -1209,7 +1209,7 @@ static void* union_prec_data[1] = {GEOSUnionPrec_r}; + typedef void* FuncGEOS_YYd_Y(void* context, void* a, void* b, double c); + static char YYd_Y_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE, NPY_OBJECT}; + +-static void YYd_Y_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void YYd_Y_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + FuncGEOS_YYd_Y* func = (FuncGEOS_YYd_Y*)data; + GEOSGeometry *in1 = NULL, *in2 = NULL; + GEOSGeometry** geom_arr; +@@ -1256,7 +1256,7 @@ static PyUFuncGenericFunction YYd_Y_funcs[1] = {&YYd_Y + /* Define functions with unique call signatures */ + static char box_dtypes[6] = {NPY_DOUBLE, NPY_DOUBLE, NPY_DOUBLE, + NPY_DOUBLE, NPY_BOOL, NPY_OBJECT}; +-static void box_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void box_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4]; + npy_intp n = dimensions[0]; +@@ -1321,7 +1321,7 @@ static char buffer_inner(void* ctx, GEOSBufferParams* + + static char buffer_dtypes[8] = {NPY_OBJECT, NPY_DOUBLE, NPY_INT, NPY_INT, + NPY_INT, NPY_DOUBLE, NPY_BOOL, NPY_OBJECT}; +-static void buffer_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void buffer_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4], + *ip6 = args[5], *ip7 = args[6]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4], +@@ -1390,7 +1390,7 @@ static PyUFuncGenericFunction buffer_funcs[1] = {&buff + + static char offset_curve_dtypes[6] = {NPY_OBJECT, NPY_DOUBLE, NPY_INT, + NPY_INT, NPY_DOUBLE, NPY_OBJECT}; +-static void offset_curve_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void offset_curve_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4]; +@@ -1451,7 +1451,7 @@ static void offset_curve_func(char** args, npy_intp* d + static PyUFuncGenericFunction offset_curve_funcs[1] = {&offset_curve_func}; + + static char snap_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE, NPY_OBJECT}; +-static void snap_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void snap_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + GEOSGeometry *in1 = NULL, *in2 = NULL; + GEOSGeometry** geom_arr; + +@@ -1497,7 +1497,7 @@ static PyUFuncGenericFunction snap_funcs[1] = {&snap_f + + static char clip_by_rect_dtypes[6] = {NPY_OBJECT, NPY_DOUBLE, NPY_DOUBLE, + NPY_DOUBLE, NPY_DOUBLE, NPY_OBJECT}; +-static void clip_by_rect_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void clip_by_rect_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4]; +@@ -1557,7 +1557,7 @@ static void clip_by_rect_func(char** args, npy_intp* d + static PyUFuncGenericFunction clip_by_rect_funcs[1] = {&clip_by_rect_func}; + + static char equals_exact_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE, NPY_BOOL}; +-static void equals_exact_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void equals_exact_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *in1 = NULL, *in2 = NULL; + double in3; +@@ -1597,7 +1597,7 @@ static PyUFuncGenericFunction equals_exact_funcs[1] = + #if GEOS_SINCE_3_10_0 + + static char dwithin_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_DOUBLE, NPY_BOOL}; +-static void dwithin_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void dwithin_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + GEOSGeometry *in1 = NULL, *in2 = NULL; + GEOSPreparedGeometry* in1_prepared = NULL; + double in3; +@@ -1645,7 +1645,7 @@ static PyUFuncGenericFunction dwithin_funcs[1] = {&dwi + #endif // GEOS_SINCE_3_10_0 + + static char delaunay_triangles_dtypes[4] = {NPY_OBJECT, NPY_DOUBLE, NPY_BOOL, NPY_OBJECT}; +-static void delaunay_triangles_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void delaunay_triangles_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* in1 = NULL; + GEOSGeometry** geom_arr; +@@ -1692,7 +1692,7 @@ static PyUFuncGenericFunction delaunay_triangles_funcs + + static char voronoi_polygons_dtypes[5] = {NPY_OBJECT, NPY_DOUBLE, NPY_OBJECT, NPY_BOOL, + NPY_OBJECT}; +-static void voronoi_polygons_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void voronoi_polygons_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *in1 = NULL, *in3 = NULL; + GEOSGeometry** geom_arr; +@@ -1739,7 +1739,7 @@ static void voronoi_polygons_func(char** args, npy_int + static PyUFuncGenericFunction voronoi_polygons_funcs[1] = {&voronoi_polygons_func}; + + static char is_valid_reason_dtypes[2] = {NPY_OBJECT, NPY_OBJECT}; +-static void is_valid_reason_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void is_valid_reason_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char* reason; + GEOSGeometry* in1 = NULL; +@@ -1777,7 +1777,7 @@ finish: + static PyUFuncGenericFunction is_valid_reason_funcs[1] = {&is_valid_reason_func}; + + static char relate_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_OBJECT}; +-static void relate_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void relate_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + char* pattern; + GEOSGeometry *in1 = NULL, *in2 = NULL; + +@@ -1818,7 +1818,7 @@ finish: + static PyUFuncGenericFunction relate_funcs[1] = {&relate_func}; + + static char relate_pattern_dtypes[4] = {NPY_OBJECT, NPY_OBJECT, NPY_OBJECT, NPY_BOOL}; +-static void relate_pattern_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void relate_pattern_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *in1 = NULL, *in2 = NULL; + const char* pattern = NULL; +@@ -1878,7 +1878,7 @@ finish: + static PyUFuncGenericFunction relate_pattern_funcs[1] = {&relate_pattern_func}; + + static char polygonize_dtypes[2] = {NPY_OBJECT, NPY_OBJECT}; +-static void polygonize_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void polygonize_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* geom = NULL; + unsigned int n_geoms; +@@ -1923,7 +1923,7 @@ static PyUFuncGenericFunction polygonize_funcs[1] = {& + + static char polygonize_full_dtypes[5] = {NPY_OBJECT, NPY_OBJECT, NPY_OBJECT, NPY_OBJECT, + NPY_OBJECT}; +-static void polygonize_full_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void polygonize_full_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* geom = NULL; + GEOSGeometry* geom_copy = NULL; +@@ -1999,7 +1999,7 @@ finish: + static PyUFuncGenericFunction polygonize_full_funcs[1] = {&polygonize_full_func}; + + static char shortest_line_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_OBJECT}; +-static void shortest_line_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void shortest_line_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* in1 = NULL; + GEOSGeometry* in2 = NULL; +@@ -2072,7 +2072,7 @@ static PyUFuncGenericFunction shortest_line_funcs[1] = + + #if GEOS_SINCE_3_6_0 + static char set_precision_dtypes[4] = {NPY_OBJECT, NPY_DOUBLE, NPY_INT, NPY_OBJECT}; +-static void set_precision_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void set_precision_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry* in1 = NULL; + GEOSGeometry** geom_arr; +@@ -2140,7 +2140,7 @@ static PyUFuncGenericFunction set_precision_funcs[1] = + + /* define double -> geometry construction functions */ + static char points_dtypes[2] = {NPY_DOUBLE, NPY_OBJECT}; +-static void points_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void points_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + GEOSCoordSequence* coord_seq = NULL; + GEOSGeometry** geom_arr; + +@@ -2194,7 +2194,7 @@ finish: + static PyUFuncGenericFunction points_funcs[1] = {&points_func}; + + static char linestrings_dtypes[2] = {NPY_DOUBLE, NPY_OBJECT}; +-static void linestrings_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void linestrings_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSCoordSequence* coord_seq = NULL; + GEOSGeometry** geom_arr; +@@ -2234,7 +2234,7 @@ finish: + static PyUFuncGenericFunction linestrings_funcs[1] = {&linestrings_func}; + + static char linearrings_dtypes[2] = {NPY_DOUBLE, NPY_OBJECT}; +-static void linearrings_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void linearrings_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSCoordSequence* coord_seq = NULL; + GEOSGeometry** geom_arr; +@@ -2298,7 +2298,7 @@ finish: + static PyUFuncGenericFunction linearrings_funcs[1] = {&linearrings_func}; + + static char polygons_dtypes[3] = {NPY_OBJECT, NPY_OBJECT, NPY_OBJECT}; +-static void polygons_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void polygons_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *hole, *shell, *hole_copy, *shell_copy; + GEOSGeometry **holes, **geom_arr; +@@ -2410,7 +2410,7 @@ finish: + static PyUFuncGenericFunction polygons_funcs[1] = {&polygons_func}; + + static char create_collection_dtypes[3] = {NPY_OBJECT, NPY_INT, NPY_OBJECT}; +-static void create_collection_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void create_collection_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *g, *g_copy; + int n_geoms, type, actual_type, expected_type, alt_expected_type; +@@ -2513,7 +2513,7 @@ finish: + static PyUFuncGenericFunction create_collection_funcs[1] = {&create_collection_func}; + + static char bounds_dtypes[2] = {NPY_OBJECT, NPY_DOUBLE}; +-static void bounds_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void bounds_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + GEOSGeometry *envelope = NULL, *in1; + const GEOSGeometry* ring; + const GEOSCoordSequence* coord_seq; +@@ -2609,7 +2609,7 @@ static PyUFuncGenericFunction bounds_funcs[1] = {&boun + /* Define the object -> geom functions (O_Y) */ + + static char from_wkb_dtypes[3] = {NPY_OBJECT, NPY_UINT8, NPY_OBJECT}; +-static void from_wkb_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void from_wkb_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *op1 = args[2]; + npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2]; +@@ -2700,7 +2700,7 @@ finish: + static PyUFuncGenericFunction from_wkb_funcs[1] = {&from_wkb_func}; + + static char from_wkt_dtypes[3] = {NPY_OBJECT, NPY_UINT8, NPY_OBJECT}; +-static void from_wkt_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void from_wkt_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *op1 = args[2]; + npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2]; +@@ -2777,7 +2777,7 @@ finish: + static PyUFuncGenericFunction from_wkt_funcs[1] = {&from_wkt_func}; + + static char from_shapely_dtypes[2] = {NPY_OBJECT, NPY_OBJECT}; +-static void from_shapely_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void from_shapely_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + GEOSGeometry *in_ptr, *ret_ptr; + PyObject *in1, *attr; +@@ -2832,7 +2832,7 @@ static PyUFuncGenericFunction from_shapely_funcs[1] = + + static char to_wkb_dtypes[6] = {NPY_OBJECT, NPY_BOOL, NPY_INT, + NPY_INT, NPY_BOOL, NPY_OBJECT}; +-static void to_wkb_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void to_wkb_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4], + *op1 = args[5]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4], +@@ -2937,7 +2937,7 @@ static PyUFuncGenericFunction to_wkb_funcs[1] = {&to_w + + static char to_wkt_dtypes[6] = {NPY_OBJECT, NPY_INT, NPY_BOOL, + NPY_INT, NPY_BOOL, NPY_OBJECT}; +-static void to_wkt_func(char** args, npy_intp* dimensions, npy_intp* steps, void* data) { ++static void to_wkt_func(char** args, const npy_intp* dimensions, const npy_intp* steps, void* data) { + char *ip1 = args[0], *ip2 = args[1], *ip3 = args[2], *ip4 = args[3], *ip5 = args[4], + *op1 = args[5]; + npy_intp is1 = steps[0], is2 = steps[1], is3 = steps[2], is4 = steps[3], is5 = steps[4], +@@ -3022,7 +3022,7 @@ static PyUFuncGenericFunction to_wkt_funcs[1] = {&to_w + #if GEOS_SINCE_3_10_0 + + static char from_geojson_dtypes[3] = {NPY_OBJECT, NPY_UINT8, NPY_OBJECT}; +-static void from_geojson_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void from_geojson_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *op1 = args[2]; + npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2]; +@@ -3100,7 +3100,7 @@ finish: + static PyUFuncGenericFunction from_geojson_funcs[1] = {&from_geojson_func}; + + static char to_geojson_dtypes[3] = {NPY_OBJECT, NPY_INT, NPY_OBJECT}; +-static void to_geojson_func(char** args, npy_intp* dimensions, npy_intp* steps, ++static void to_geojson_func(char** args, const npy_intp* dimensions, const npy_intp* steps, + void* data) { + char *ip1 = args[0], *ip2 = args[1], *op1 = args[2]; + npy_intp is1 = steps[0], is2 = steps[1], os1 = steps[2];