#31 Replace removed SWIG Python 2 compatibility macros
Opened by nazar01. Modified
nazar01/volume_key nazar/fix_swig  into  master

Download 31.patch

SWIG 4.5.0 removed Python 2 compatibility macros (PyInt_, PyString_)
from its runtime header pyhead.swg (see commit 79f7a2b7cb7d). Replace
them with their Python 3 C API equivalents:

  • PyString_FromString -> PyUnicode_FromString
  • PyString_AsString -> PyBytes_AsString

The replacements are safe since the macros were already aliased to
these exact functions in SWIG's Python 3 code path.

Based on dtc commit 5008d1d6a356 ("pylibfdt: Replace removed SWIG
Python 2 compatibility macros"):
https://github.com/dgibson/dtc/commit/5008d1d6a356b8d0a78060da2e1021507d529cff

Signed-off-by: Nazar Kazakov nazar.kazakov@codethink.co.uk

Metadata