MCPcopy Index your code
hub / github.com/nodejs/node / render_ffi_header

Function render_ffi_header

deps/libffi/generate-headers.py:87–102  ·  view source on GitHub ↗
(base_dir, os_name, target_arch, target)

Source from the content-addressed store, hash-verified

85
86
87def render_ffi_header(base_dir, os_name, target_arch, target):
88 template = (base_dir / 'include' / 'ffi.h.in').read_text(encoding='utf-8')
89 replacements = {
90 '@FFI_EXEC_TRAMPOLINE_TABLE@':
91 '1' if uses_exec_trampoline_table(os_name, target_arch) else '0',
92 '@FFI_VERSION_NUMBER@': LIBFFI_VERSION_NUMBER,
93 '@FFI_VERSION_STRING@': LIBFFI_VERSION,
94 '@HAVE_LONG_DOUBLE@': has_long_double(os_name, target_arch),
95 '@TARGET@': target,
96 '@VERSION@': LIBFFI_VERSION,
97 }
98
99 for source, replacement in replacements.items():
100 template = template.replace(source, replacement)
101
102 return template
103
104
105def render_fficonfig(os_name, target_arch):

Callers 1

generate_headersFunction · 0.85

Calls 3

has_long_doubleFunction · 0.85
itemsMethod · 0.45

Tested by

no test coverage detected