diff options
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r-- | Objects/stringobject.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Objects/stringobject.c b/Objects/stringobject.c index bcf51474ec..24443d8323 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -1031,6 +1031,23 @@ string_join(PyStringObject *self, PyObject *args) return res; } +PyObject *_PyString_Join(PyObject *sep, PyObject *x) +{ + PyObject* args; + PyObject* result = NULL; + + assert(sep != NULL && PyString_Check(sep)); + assert(x != NULL); + args = PyTuple_New(1); + if (args != NULL) { + Py_INCREF(x); + PyTuple_SET_ITEM(args, 0, x); + result = string_join((PyStringObject *)sep, args); + Py_DECREF(args); + } + return result; +} + static long string_find_internal(PyStringObject *self, PyObject *args, int dir) { |