diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-01 23:43:50 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-09-01 23:43:50 (GMT) |
commit | c4eb765fc1c1fb90c9de90917e167d2e0f907b8d (patch) | |
tree | 722a2c02d53eb328a4ae9b660f89e1df41bc12dc | |
parent | f37ca3c8bebf6aedbdaf96368c709d5c25ca7002 (diff) | |
download | cpython-c4eb765fc1c1fb90c9de90917e167d2e0f907b8d.zip cpython-c4eb765fc1c1fb90c9de90917e167d2e0f907b8d.tar.gz cpython-c4eb765fc1c1fb90c9de90917e167d2e0f907b8d.tar.bz2 |
Create Py_UNICODE_strcat() function
-rw-r--r-- | Include/unicodeobject.h | 3 | ||||
-rw-r--r-- | Objects/unicodeobject.c | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 5fadb99..afef5d0 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -1573,6 +1573,9 @@ PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcpy( Py_UNICODE *s1, const Py_UNICODE *s2); +PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strcat( + Py_UNICODE *s1, const Py_UNICODE *s2); + PyAPI_FUNC(Py_UNICODE*) Py_UNICODE_strncpy( Py_UNICODE *s1, const Py_UNICODE *s2, diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9cabd11..95823ad 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -9951,6 +9951,15 @@ Py_UNICODE_strncpy(Py_UNICODE *s1, const Py_UNICODE *s2, size_t n) return s1; } +Py_UNICODE* +Py_UNICODE_strcat(Py_UNICODE *s1, const Py_UNICODE *s2) +{ + Py_UNICODE *u1 = s1; + u1 += Py_UNICODE_strlen(u1); + Py_UNICODE_strcpy(u1, s2); + return s1; +} + int Py_UNICODE_strcmp(const Py_UNICODE *s1, const Py_UNICODE *s2) { |