From 8ad1d0bb99ec03c0a233df74aff986c4d49a762b Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Thu, 13 Feb 2003 04:37:41 +0000 Subject: [PATCH] clear the stringlist before populating it --- src/python.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python.cc b/src/python.cc index 10bcbdb7..64398e38 100644 --- a/src/python.cc +++ b/src/python.cc @@ -74,6 +74,8 @@ bool python_get_stringlist(const char *name, std::vector *value) PyObject *val = PyDict_GetItemString(obdict, const_cast(name)); if (!(val && PyList_Check(val))) return false; + value->clear(); + for (int i = 0, end = PyList_Size(val); i < end; ++i) { PyObject *str = PyList_GetItem(val, i); if (PyString_Check(str)) -- 2.45.2