diff options
author | Benjamin Peterson <benjamin@python.org> | 2014-02-11 15:09:27 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2014-02-11 15:09:27 (GMT) |
commit | 40be9e5100b652f93d6dcc2724615c8e57530e47 (patch) | |
tree | ec8aaf5d20dcb39236b0feef7eae97d2c1a8fc2f /Python/getargs.c | |
parent | 801fe934d978eff979aee8819737240dc4af577b (diff) | |
download | cpython-40be9e5100b652f93d6dcc2724615c8e57530e47.zip cpython-40be9e5100b652f93d6dcc2724615c8e57530e47.tar.gz cpython-40be9e5100b652f93d6dcc2724615c8e57530e47.tar.bz2 |
remove dynamic initializer lists for c89 compliance (closes #20595)
Diffstat (limited to 'Python/getargs.c')
-rw-r--r-- | Python/getargs.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Python/getargs.c b/Python/getargs.c index bfea111..946faf2 100644 --- a/Python/getargs.c +++ b/Python/getargs.c @@ -200,8 +200,6 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags) { char msgbuf[256]; int levels[32]; - freelistentry_t static_entries[STATIC_FREELIST_ENTRIES]; - freelist_t freelist = {static_entries, 0, 0}; const char *fname = NULL; const char *message = NULL; int min = -1; @@ -212,6 +210,12 @@ vgetargs1(PyObject *args, const char *format, va_list *p_va, int flags) Py_ssize_t i, len; char *msg; int compat = flags & FLAG_COMPAT; + freelistentry_t static_entries[STATIC_FREELIST_ENTRIES]; + freelist_t freelist; + + freelist.entries = static_entries; + freelist.first_available = 0; + freelist.entries_malloced = 0; assert(compat || (args != (PyObject*)NULL)); flags = flags & ~FLAG_COMPAT; @@ -1439,7 +1443,11 @@ vgetargskeywords(PyObject *args, PyObject *keywords, const char *format, Py_ssize_t nargs, nkeywords; PyObject *current_arg; freelistentry_t static_entries[STATIC_FREELIST_ENTRIES]; - freelist_t freelist = {static_entries, 0, 0}; + freelist_t freelist; + + freelist.entries = static_entries; + freelist.first_available = 0; + freelist.entries_malloced = 0; assert(args != NULL && PyTuple_Check(args)); assert(keywords == NULL || PyDict_Check(keywords)); |