Skip to content

Commit e22369f

Browse files
committed
Changed how compiler.preprocess() is compared to the default impl
1 parent caed4ec commit e22369f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/setuptools_dso/compiler.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ def new_compiler(**kws):
9090
if not compiler.initialized: # extra super lazy initialization...
9191
compiler.initialize() # populates self.cc among others
9292

93-
if compiler.__class__.preprocess is CCompiler.preprocess:
94-
# default impl. is a no-op...
93+
# Checks if the compiler's preprocess is a the same as CCompiler's as...
94+
if compiler.__class__.preprocess.__code__ == CCompiler.preprocess.__code__:
95+
# ... the default impl. in CCompiler is a no-op...
9596
compiler.preprocess = partial(_msvc_preprocess, compiler)
9697

9798
if getattr(compiler, 'preprocessor', None) is None:

0 commit comments

Comments
 (0)