tools/generate_stubs/generate_stubs.py
def CreateWindowsLibForSigFiles(sig_files, out_dir, intermediate_dir, machine,
                                export_macro):
  """For each signature file, create a Windows lib.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated libs go.
    intermediate_dir: String holding path to directory generated intermediate
                      artifacts.
    machine: String holding the machine type, 'X86' or 'X64'.
    export_macro: A preprocessor macro used to annotate stub symbols with
                  an EXPORT marking, to control visibility.
  """
  for input_path in sig_files:
    infile = open(input_path, 'r')
    try:
      signatures = ParseSignatures(infile)
      module_name = ExtractModuleName(os.path.basename(input_path))
      for sig in signatures:
        sig['export'] = export_macro
      CreateWindowsLib(module_name, signatures, intermediate_dir, out_dir,
                       machine)
    finally:
      infile.close()
For each signature file, create a Windows lib.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated libs go.
    intermediate_dir: String holding path to directory generated intermediate
                      artifacts.
    machine: String holding the machine type, 'X86' or 'X64'.
    export_macro: A preprocessor macro used to annotate stub symbols with
                  an EXPORT marking, to control visibility.
  
For each signature file, create a Windows lib.
For each signature file create a Windows lib .
def CreateWindowsLibForSigFiles(sig_files, out_dir, intermediate_dir, machine,
                                export_macro):
  for input_path in sig_files:
    infile = open(input_path, 'r')
    try:
      signatures = ParseSignatures(infile)
      module_name = ExtractModuleName(os.path.basename(input_path))
      for sig in signatures:
        sig['export'] = export_macro
      CreateWindowsLib(module_name, signatures, intermediate_dir, out_dir,
                       machine)
    finally:
      infile.close()
def CreateWindowsLibForSigFiles ( sig_files , out_dir , intermediate_dir , machine , export_macro ) : for input_path in sig_files : infile = open ( input_path , 'r' ) try : signatures = ParseSignatures ( infile ) module_name = ExtractModuleName ( os . path . basename ( input_path ) ) for sig in signatures : sig [ 'export' ] = export_macro CreateWindowsLib ( module_name , signatures , intermediate_dir , out_dir , machine ) finally : infile . close ( )
For each signature file, create a Windows lib.
For each signature file create a Windows lib .
"""For each signature file, create a Windows lib.

  Args:
    sig_files: Array of strings with the paths to each signature file.
    out_dir: String holding path to directory where the generated libs go.
    intermediate_dir: String holding path to directory generated intermediate
                      artifacts.
    machine: String holding the machine type, 'X86' or 'X64'.
    export_macro: A preprocessor macro used to annotate stub symbols with
                  an EXPORT marking, to control visibility.
  """
sig_files
Array of strings with the paths to each signature file.
Array of strings with the paths to each signature file .
out_dir
String holding path to directory where the generated libs go.
String holding path to directory where the generated libs go .
intermediate_dir
String holding path to directory generated intermediate
artifacts.
String holding path to directory generated intermediate artifacts .
machine
String holding the machine type, 'X86' or 'X64'.
String holding the machine type ' X86 ' or ' X64 ' .
export_macro
A preprocessor macro used to annotate stub symbols with
an EXPORT marking, to control visibility.
A preprocessor macro used to annotate stub symbols with an EXPORT marking to control visibility .