This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author JunyiXie
Recipients JunyiXie, vstinner
Date 2021-03-22.09:58:12
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1616407092.82.0.595206675131.issue43588@roundup.psfhosted.org>
In-reply-to
Content
grep -E 'static (\w+) \*(\w+) =' $(find . -name "*.c") | wc -l
67 static variable may need fix
➜  cpython git:(master) grep -E 'static (\w+) \*(\w+) =' $(find . -name "*.c")
./PC/winreg.c:static char *failMsg = "bad operand type";
./Python/codecs.c:static _PyUnicode_Name_CAPI *ucnhash_capi = NULL;
./Python/initconfig.c:static char *_Py_StandardStreamEncoding = NULL;
./Python/initconfig.c:static char *_Py_StandardStreamErrors = NULL;
./Python/import.c:static PyObject *extensions = NULL;
./Python/import.c:    static PyObject *builtins_str = NULL;
./Python/import.c:    static PyObject *import_str = NULL;
./Python/sysmodule.c:    static PyObject *newline = NULL;
./Python/_warnings.c:    static PyObject *importlib_string = NULL;
./Python/_warnings.c:    static PyObject *bootstrap_string = NULL;
./Objects/unicodeobject.c:static _PyUnicode_Name_CAPI *ucnhash_capi = NULL;
./Objects/codeobject.c:    static PyObject *emptystring = NULL;
./Objects/codeobject.c:    static PyObject *nulltuple = NULL;
./Objects/listobject.c:static PyObject *indexerr = NULL;
./Objects/exceptions.c:    static PyObject *print_prefix = NULL;
./Objects/exceptions.c:    static PyObject *exec_prefix = NULL;
./Objects/boolobject.c:static PyObject *false_str = NULL;
./Objects/boolobject.c:static PyObject *true_str = NULL;
./Parser/pegen.c:    static void *cache = NULL;
./Modules/_cursesmodule.c:static char *screen_encoding = NULL;
./Modules/arraymodule.c:    static PyObject *array_reconstructor = NULL;
./Modules/_tkinter.c:    static PyObject *tcl_library_path = NULL;
./Modules/_tkinter.c:static PyThreadState *tcl_tstate = NULL;
./Modules/_tkinter.c:static PyThreadState *event_tstate = NULL;
./Modules/syslogmodule.c:static PyObject *S_ident_o = NULL;                      /*  identifier, held by openlog()  */
./Modules/_tracemalloc.c:static PyObject *unknown_filename = NULL;
./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_filenames = NULL;
./Modules/_tracemalloc.c:static traceback_t *tracemalloc_traceback = NULL;
./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_tracebacks = NULL;
./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_traces = NULL;
./Modules/_tracemalloc.c:static _Py_hashtable_t *tracemalloc_domains = NULL;
./Modules/_ssl.c:    static PyObject *x509_asn = NULL;
./Modules/_ssl.c:    static PyObject *pkcs_7_asn = NULL;
./Modules/_ssl.c:static PyThread_type_lock *_ssl_locks = NULL;
./Modules/_testbuffer.c:static PyObject *structmodule = NULL;
./Modules/_testbuffer.c:static PyObject *Struct = NULL;
./Modules/_testbuffer.c:static PyObject *calcsize = NULL;
./Modules/_testbuffer.c:static PyObject *simple_format = NULL;
./Modules/_testbuffer.c:static char *infobuf = NULL;
./Modules/_io/bufferedio.c:    static PyObject *eintr_int = NULL;
./Modules/_asynciomodule.c:static futureiterobject *fi_freelist = NULL;
./Modules/_zoneinfo.c:static PyObject *io_open = NULL;
./Modules/_zoneinfo.c:static PyObject *_tzpath_find_tzfile = NULL;
./Modules/_zoneinfo.c:static PyObject *_common_mod = NULL;
./Modules/_zoneinfo.c:static PyObject *TIMEDELTA_CACHE = NULL;
./Modules/_zoneinfo.c:static PyObject *ZONEINFO_WEAK_CACHE = NULL;
./Modules/_zoneinfo.c:static StrongCacheNode *ZONEINFO_STRONG_CACHE = NULL;
./Modules/_sqlite/microprotocols.c:static PyObject *psyco_adapters = NULL;
./Modules/_ssl/debughelpers.c:    static PyThread_type_lock *lock = NULL;
./Modules/_datetimemodule.c:static PyObject *us_per_ms = NULL;      /* 1000 */
./Modules/_datetimemodule.c:static PyObject *us_per_second = NULL;  /* 1000000 */
./Modules/_datetimemodule.c:static PyObject *us_per_minute = NULL;  /* 1e6 * 60 as Python int */
./Modules/_datetimemodule.c:static PyObject *us_per_hour = NULL;    /* 1e6 * 3600 as Python int */
./Modules/_datetimemodule.c:static PyObject *us_per_day = NULL;     /* 1e6 * 3600 * 24 as Python int */
./Modules/_datetimemodule.c:static PyObject *us_per_week = NULL;    /* 1e6*3600*24*7 as Python int */
./Modules/_datetimemodule.c:static PyObject *seconds_per_day = NULL; /* 3600*24 as Python int */
./Modules/_datetimemodule.c:    static PyObject *module = NULL;
./Modules/_decimal/_decimal.c:static PyObject *tls_context_key = NULL;
./Modules/_decimal/_decimal.c:static PyDecContextObject *cached_context = NULL;
./Modules/_decimal/_decimal.c:static PyObject *current_context_var = NULL;
./Modules/_decimal/_decimal.c:static PyObject *default_context_template = NULL;
./Modules/_decimal/_decimal.c:static PyObject *basic_context_template = NULL;
./Modules/_decimal/_decimal.c:static PyObject *extended_context_template = NULL;
./Modules/_decimal/_decimal.c:static PyObject *DecimalException = NULL;
./Modules/_decimal/_decimal.c:static PyObject *Rational = NULL;
./Modules/_decimal/_decimal.c:static PyTypeObject *DecimalTuple = NULL;
./Modules/_decimal/_decimal.c:    static PyObject *capsule = NULL;
History
Date User Action Args
2021-03-22 09:58:12JunyiXiesetrecipients: + JunyiXie, vstinner
2021-03-22 09:58:12JunyiXiesetmessageid: <1616407092.82.0.595206675131.issue43588@roundup.psfhosted.org>
2021-03-22 09:58:12JunyiXielinkissue43588 messages
2021-03-22 09:58:12JunyiXiecreate