Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Python/compile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1868,14 +1868,14 @@ compiler_body(struct compiler *c, asdl_stmt_seq *stmts)
static PyCodeObject *
compiler_mod(struct compiler *c, mod_ty mod)
{
_Py_static_string(_module, "<module>");
PyCodeObject *co;
int addNone = 1;
static PyObject *module;
if (!module) {
module = PyUnicode_InternFromString("<module>");
if (!module)
return NULL;
PyObject *module = _PyUnicode_FromId(&_module); // borrowed ref
if (module == NULL) {
return NULL;
}

/* Use 0 for firstlineno initially, will fixup in assemble(). */
if (!compiler_enter_scope(c, module, COMPILER_SCOPE_MODULE, mod, 1))
return NULL;
Expand Down