summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/getargs.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/Python/getargs.c b/Python/getargs.c
index b96ce3a..ec2eeb15 100644
--- a/Python/getargs.c
+++ b/Python/getargs.c
@@ -2030,6 +2030,19 @@ parser_clear(struct _PyArg_Parser *parser)
if (parser->is_kwtuple_owned) {
Py_CLEAR(parser->kwtuple);
}
+
+ if (parser->format) {
+ parser->fname = NULL;
+ }
+ else {
+ assert(parser->fname != NULL);
+ }
+ parser->custom_msg = NULL;
+ parser->pos = 0;
+ parser->min = 0;
+ parser->max = 0;
+ parser->is_kwtuple_owned = 0;
+ parser->once.v = 0;
}
static PyObject*