Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion distutils/compilers/C/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,11 @@ def _check_macro_definition(self, defn):
def _is_valid_macro(name, value=None):
"""
A valid macro is a ``name : str`` and a ``value : str | None``.
>>> Compiler._is_valid_macro('foo', None)
True
"""
return isinstance(name, str) and isinstance(value, (str, None))
return isinstance(name, str) and isinstance(value, (str, type(None)))

# -- Bookkeeping methods -------------------------------------------

Expand Down
Loading