MCPcopy Create free account
hub / github.com/numpy/numpy / get_swig_target

Function get_swig_target

numpy/distutils/command/build_src.py:727–735  ·  view source on GitHub ↗
(source)

Source from the content-addressed store, hash-verified

725_has_cpp_header = re.compile(r'-\*-\s*c\+\+\s*-\*-', re.I).search
726
727def get_swig_target(source):
728 with open(source) as f:
729 result = None
730 line = f.readline()
731 if _has_cpp_header(line):
732 result = 'c++'
733 if _has_c_header(line):
734 result = 'c'
735 return result
736
737def get_swig_modulename(source):
738 with open(source) as f:

Callers 1

swig_sourcesMethod · 0.85

Calls 1

openFunction · 0.85

Tested by

no test coverage detected