From e9e9085bac02f6ef8284263f9f1220023a46d7ed Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sat, 28 Aug 2010 14:19:13 +0200 Subject: [PATCH] Create Py_UNICODE_strcat() function --- Include/unicodeobject.h | 3 +++ Objects/unicodeobject.c | 7 +++++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 8476a55..9be88b7 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -1620,6 +1620,9 @@ PyAPI_FUNC(size_t) Py_UNICODE_strlen(const Py_UNICODE *u); 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, size_t n); diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index c4ac30c..93288f0 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -9980,6 +9980,13 @@ 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) +{ + s1 += Py_UNICODE_strlen(s1); + return Py_UNICODE_strcpy(s1, s2); +} + int Py_UNICODE_strcmp(const Py_UNICODE *s1, const Py_UNICODE *s2) { -- 1.6.2.5