MCPcopy Index your code
hub / github.com/Nuitka/Nuitka / getCodeObjectsDeclCode

Function getCodeObjectsDeclCode

nuitka/code_generation/CodeObjectCodes.py:16–31  ·  view source on GitHub ↗
(context)

Source from the content-addressed store, hash-verified

14
15
16def getCodeObjectsDeclCode(context):
17 if isExperimental("new-code-objects"):
18 return ()
19
20 statements = []
21
22 for _code_object_key, code_identifier in context.getCodeObjects():
23 declaration = "static PyCodeObject *%s;" % code_identifier
24
25 statements.append(declaration)
26
27 if context.getOwner().getFullName() == "__main__":
28 statements.append('/* For use in "MainProgram.c". */')
29 statements.append("PyCodeObject *code_objects_main = NULL;")
30
31 return statements
32
33
34def _getMakeCodeObjectArgs(code_object_handle, context):

Callers 1

getModuleCodeFunction · 0.85

Calls 4

isExperimentalFunction · 0.90
getCodeObjectsMethod · 0.80
getFullNameMethod · 0.80
getOwnerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…