From: Florian Weimer Date: Fri, 26 Jan 2024 10:57:03 +0000 (+0100) Subject: 32-bit compatibility for Python SWIG bindings X-Git-Tag: release-1.8.4-rc1~29^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f91f61e10be595a6a46845112aaed7da24551bf9;p=thirdparty%2Fldns.git 32-bit compatibility for Python SWIG bindings The ssize_t type can be int instead of long, and the pointer types are incompatible. --- diff --git a/contrib/python/ldns.i b/contrib/python/ldns.i index 881ba5e8..b4a74082 100644 --- a/contrib/python/ldns.i +++ b/contrib/python/ldns.i @@ -99,12 +99,14 @@ %typemap(in, noblock=1) (ssize_t) { int $1_res = 0; - $1_res = SWIG_AsVal_long($input, &$1); + long val; + $1_res = SWIG_AsVal_long($input, &val); if (!SWIG_IsOK($1_res)) { SWIG_exception_fail(SWIG_ArgError($1_res), "in method '" "$symname" "', argument " "$argnum" " of type '" "$type""'"); } + $1 = val; }