6#include "nuitka/prelude.h"
9#if _NUITKA_STANDALONE_MODE
11static char const *uncompiled_sources_dict_attribute_name =
"_uncompiled_function_sources_dict";
13void SET_UNCOMPILED_FUNCTION_SOURCE_DICT(PyObject *name, PyObject *source) {
14 PyObject *uncompiled_function_sources_dict =
15 PyObject_GetAttrString((PyObject *)builtin_module, uncompiled_sources_dict_attribute_name);
17 if (uncompiled_function_sources_dict == NULL) {
18 PyThreadState *tstate = PyThreadState_GET();
20 DROP_ERROR_OCCURRED(tstate);
22 uncompiled_function_sources_dict = MAKE_DICT_EMPTY(tstate);
24 PyObject_SetAttrString((PyObject *)builtin_module, uncompiled_sources_dict_attribute_name,
25 uncompiled_function_sources_dict);
28 bool res = DICT_SET_ITEM(uncompiled_function_sources_dict, name, source);
29 if (unlikely(res ==
false)) {
30 NUITKA_CANNOT_GET_HERE(
"Failed to update uncompiled function sources");