Skip to content

Commit 2388358

Browse files
committed
Fix "make smelly"
1 parent f590f2c commit 2388358

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Tools/build/smelly.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
if sys.platform == 'darwin':
1212
ALLOWED_PREFIXES += ('__Py',)
1313

14+
# "Legacy": some old symbols are prefixed by "PY_".
15+
EXCEPTIONS = frozenset({
16+
'PY_TIMEOUT_MAX',
17+
})
18+
1419
IGNORED_EXTENSION = "_ctypes_test"
1520
# Ignore constructor and destructor functions
1621
IGNORED_SYMBOLS = {'_init', '_fini'}
@@ -72,7 +77,7 @@ def get_smelly_symbols(stdout):
7277
symbol = parts[-1]
7378
result = '%s (type: %s)' % (symbol, symtype)
7479

75-
if symbol.startswith(ALLOWED_PREFIXES):
80+
if symbol.startswith(ALLOWED_PREFIXES) or symbol in EXCEPTIONS:
7681
python_symbols.append(result)
7782
continue
7883

0 commit comments

Comments
 (0)