Mercurial > cpython-lru_cache-weakref
diff Include/moduleobject.h @ 7401:8c01cfee14ba legacy-trunk
Add internal routine _PyModule_Clear(), which does approximately what
clear_carefully() used to do in import.c. Differences: leave only
__builtins__ alone in the 2nd pass; and don't clear the dictionary (on
the theory that as long as there are references left to the
dictionary, those might be destructors that might expect __builtins__
to be alive when they run; and __builtins__ can't normally be part of
a cycle).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 19 Feb 1998 20:51:52 +0000 |
| parents | 65d2d8e67da3 |
| children | 60fdb1db1175 |
line wrap: on
line diff
--- a/Include/moduleobject.h Thu Feb 19 20:50:52 1998 +0000 +++ b/Include/moduleobject.h Thu Feb 19 20:51:52 1998 +0000 @@ -44,6 +44,7 @@ extern PyObject *PyModule_New Py_PROTO((char *)); extern PyObject *PyModule_GetDict Py_PROTO((PyObject *)); extern char *PyModule_GetName Py_PROTO((PyObject *)); +extern void _PyModule_Clear Py_PROTO((PyObject *)); #ifdef __cplusplus }
