Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 242d42b

Browse files
committed
Do not silently fail to get sizeof basic types.
1 parent b74d11b commit 242d42b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

numpy/core/setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,15 @@ def check_types(config, ext, build_dir):
146146
res = config_cmd.check_type_size(type)
147147
if res >= 0:
148148
private_defines.append(('SIZEOF_%s' % sym2def(type), '%d' % res))
149+
else:
150+
raise SystemError("Checking sizeof (%s) failed !" % type)
149151

150152
for type in ('Py_intptr_t',):
151153
res = config_cmd.check_type_size(type, headers=["Python.h"])
152154
if res >= 0:
153155
private_defines.append(('SIZEOF_%s' % sym2def(type), '%d' % res))
156+
else:
157+
raise SystemError("Checking sizeof (%s) failed !" % type)
154158

155159
# We check declaration AND type because that's how distutils does it.
156160
if config_cmd.check_decl('PY_LONG_LONG', headers=['Python.h']):

0 commit comments

Comments
 (0)