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

Function wrapper_function_header

mypyc/codegen/emitwrapper.py:59–68  ·  view source on GitHub ↗

Return header of a vectorcall wrapper function. See comment above for a summary of the arguments.

(fn: FuncIR, names: NameGenerator)

Source from the content-addressed store, hash-verified

57
58
59def wrapper_function_header(fn: FuncIR, names: NameGenerator) -> str:
60 """Return header of a vectorcall wrapper function.
61
62 See comment above for a summary of the arguments.
63 """
64 assert not fn.internal
65 return (
66 "PyObject *{prefix}{name}("
67 "PyObject *self, PyObject *const *args, size_t nargs, PyObject *kwnames)"
68 ).format(prefix=PREFIX, name=fn.cname(names))
69
70
71def generate_traceback_code(

Callers 2

Calls 2

formatMethod · 0.45
cnameMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…