netgen/python/pyngcore/__init__.py
Drew Parsons 84fc680e72 fix 32-bit usage of size_t
On 32-bit systems size_t is identical unsigned in, causing
redefinition errors in tables (Array_I_S).

This patch guards against the 32-bit redefinition and defines
Array_I_S = Array_I_U for the python interface if not already defined.

Applies debian patch size_t_int32.patch
d7ca1c564d/debian/patches/size_t_int32.patch

Fixes #168
2025-01-05 13:28:18 +01:00

8 lines
249 B
Python

from .pyngcore import *
# <size_t> is the same as <unsigned int> on 32 bit arches
# in which case Array_I_S is not defined by python_ngcore_export.cpp.
# In this case identify it with Array_I_U.
try: Array_I_S
except NameError: Array_I_S=Array_I_U