mirror of
https://github.com/python/cpython.git
synced 2025-07-20 01:35:19 +00:00
Merged revisions 84072 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r84072 | antoine.pitrou | 2010-08-15 19:38:46 +0200 (dim., 15 août 2010) | 3 lines Fix indentation and remove dead code. ........
This commit is contained in:
parent
85675994e6
commit
00d5f35b85
1 changed files with 93 additions and 127 deletions
|
@ -248,14 +248,6 @@ _Py_bytes_lower(char *result, const char *cptr, Py_ssize_t len)
|
|||
{
|
||||
Py_ssize_t i;
|
||||
|
||||
/*
|
||||
newobj = PyBytes_FromStringAndSize(NULL, len);
|
||||
if (!newobj)
|
||||
return NULL;
|
||||
|
||||
s = PyBytes_AS_STRING(newobj);
|
||||
*/
|
||||
|
||||
Py_MEMCPY(result, cptr, len);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
|
@ -276,14 +268,6 @@ _Py_bytes_upper(char *result, const char *cptr, Py_ssize_t len)
|
|||
{
|
||||
Py_ssize_t i;
|
||||
|
||||
/*
|
||||
newobj = PyBytes_FromStringAndSize(NULL, len);
|
||||
if (!newobj)
|
||||
return NULL;
|
||||
|
||||
s = PyBytes_AS_STRING(newobj);
|
||||
*/
|
||||
|
||||
Py_MEMCPY(result, cptr, len);
|
||||
|
||||
for (i = 0; i < len; i++) {
|
||||
|
@ -306,12 +290,6 @@ _Py_bytes_title(char *result, char *s, Py_ssize_t len)
|
|||
Py_ssize_t i;
|
||||
int previous_is_cased = 0;
|
||||
|
||||
/*
|
||||
newobj = PyBytes_FromStringAndSize(NULL, len);
|
||||
if (newobj == NULL)
|
||||
return NULL;
|
||||
s_new = PyBytes_AsString(newobj);
|
||||
*/
|
||||
for (i = 0; i < len; i++) {
|
||||
int c = Py_CHARMASK(*s++);
|
||||
if (Py_ISLOWER(c)) {
|
||||
|
@ -340,12 +318,6 @@ _Py_bytes_capitalize(char *result, char *s, Py_ssize_t len)
|
|||
{
|
||||
Py_ssize_t i;
|
||||
|
||||
/*
|
||||
newobj = PyBytes_FromStringAndSize(NULL, len);
|
||||
if (newobj == NULL)
|
||||
return NULL;
|
||||
s_new = PyBytes_AsString(newobj);
|
||||
*/
|
||||
if (0 < len) {
|
||||
int c = Py_CHARMASK(*s++);
|
||||
if (Py_ISLOWER(c))
|
||||
|
@ -376,12 +348,6 @@ _Py_bytes_swapcase(char *result, char *s, Py_ssize_t len)
|
|||
{
|
||||
Py_ssize_t i;
|
||||
|
||||
/*
|
||||
newobj = PyBytes_FromStringAndSize(NULL, len);
|
||||
if (newobj == NULL)
|
||||
return NULL;
|
||||
s_new = PyBytes_AsString(newobj);
|
||||
*/
|
||||
for (i = 0; i < len; i++) {
|
||||
int c = Py_CHARMASK(*s++);
|
||||
if (Py_ISLOWER(c)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue