mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Added 'preprocess()' method to CCompiler interface, and implemented
it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and whatever other compiler classes are lurking out there, waiting to be checked in).
This commit is contained in:
parent
a4ca07cc8c
commit
3ff3b039ac
2 changed files with 48 additions and 0 deletions
|
@ -414,6 +414,22 @@ class CCompiler:
|
|||
# -- Worker methods ------------------------------------------------
|
||||
# (must be implemented by subclasses)
|
||||
|
||||
def preprocess (self,
|
||||
source,
|
||||
output_file=None,
|
||||
macros=None,
|
||||
include_dirs=None,
|
||||
extra_preargs=None,
|
||||
extra_postargs=None):
|
||||
"""Preprocess a single C/C++ source file, named in 'source'.
|
||||
Output will be written to file named 'output_file', or stdout if
|
||||
'output_file' not supplied. 'macros' is a list of macro
|
||||
definitions as for 'compile()', which will augment the macros set
|
||||
with 'define_macro()' and 'undefine_macro()'. 'include_dirs' is a
|
||||
list of directory names that will be added to the default list.
|
||||
"""
|
||||
pass
|
||||
|
||||
def compile (self,
|
||||
sources,
|
||||
output_dir=None,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue