MCPcopy Index your code
hub / github.com/python/mypy / native_function_call

Method native_function_call

mypyc/codegen/emit.py:396–403  ·  view source on GitHub ↗

Return the C expression for a call to `fn`'s native (CPyDef_) entry. For cross-group references under `separate=True`, this prepends the exports-table indirection (e.g. `exports_other.CPyDef_foo`). Same as `native_function_name()` for in-group calls.

(self, fn: FuncDecl)

Source from the content-addressed store, hash-verified

394 return f"{NATIVE_PREFIX}{fn.cname(self.names)}"
395
396 def native_function_call(self, fn: FuncDecl) -> str:
397 """Return the C expression for a call to `fn`'s native (CPyDef_) entry.
398
399 For cross-group references under `separate=True`, this prepends the
400 exports-table indirection (e.g. `exports_other.CPyDef_foo`). Same as
401 `native_function_name()` for in-group calls.
402 """
403 return f"{self.get_group_prefix(fn)}{self.native_function_name(fn)}"
404
405 def wrapper_function_call(self, fn: FuncDecl) -> str:
406 """Return the C expression for a call to `fn`'s Python-wrapper (CPyPy_) entry.

Callers 8

generate_get_wrapperFunction · 0.80
generate_bool_wrapperFunction · 0.80
set_targetMethod · 0.80
emit_method_callMethod · 0.80

Calls 2

get_group_prefixMethod · 0.95
native_function_nameMethod · 0.95

Tested by

no test coverage detected