Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: Objects/bytes_methods.c

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/timemodule.c ('k') | Objects/codeobject.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include "Python.h" 1 #include "Python.h"
2 #include "bytes_methods.h" 2 #include "bytes_methods.h"
3 3
4 PyDoc_STRVAR_shared(_Py_isspace__doc__, 4 PyDoc_STRVAR_shared(_Py_isspace__doc__,
5 "B.isspace() -> bool\n\ 5 "B.isspace() -> bool\n\
6 \n\ 6 \n\
7 Return True if all characters in B are whitespace\n\ 7 Return True if all characters in B are whitespace\n\
8 and there is at least one character in B, False otherwise."); 8 and there is at least one character in B, False otherwise.");
9 9
10 PyObject* 10 PyObject*
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 else 359 else
360 *result = c; 360 *result = c;
361 result++; 361 result++;
362 } 362 }
363 } 363 }
364 364
365 365
366 PyDoc_STRVAR_shared(_Py_maketrans__doc__, 366 PyDoc_STRVAR_shared(_Py_maketrans__doc__,
367 "B.maketrans(frm, to) -> translation table\n\ 367 "B.maketrans(frm, to) -> translation table\n\
368 \n\ 368 \n\
369 Return a translation table (a bytes object of length 256) suitable\n\ 369 Return a translation table (a bytes object of length 256)\n\
370 for use in the bytes or bytearray translate method where each byte\n\ 370 suitable for use in bytes.translate where each byte in frm is\n\
371 in frm is mapped to the byte at the same position in to.\n\ 371 mapped to the byte at the same position in to.\n\
372 The bytes objects frm and to must be of the same length."); 372 The strings frm and to must be of the same length.");
373 373
374 static Py_ssize_t 374 static Py_ssize_t
375 _getbuffer(PyObject *obj, Py_buffer *view) 375 _getbuffer(PyObject *obj, Py_buffer *view)
376 { 376 {
377 PyBufferProcs *buffer = Py_TYPE(obj)->tp_as_buffer; 377 PyBufferProcs *buffer = Py_TYPE(obj)->tp_as_buffer;
378 378
379 if (buffer == NULL || buffer->bf_getbuffer == NULL) 379 if (buffer == NULL || buffer->bf_getbuffer == NULL)
380 { 380 {
381 PyErr_Format(PyExc_TypeError, 381 PyErr_Format(PyExc_TypeError,
382 "Type %.100s doesn't support the buffer API", 382 "Type %.100s doesn't support the buffer API",
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 p[((unsigned char *)bfrm.buf)[i]] = ((char *)bto.buf)[i]; 422 p[((unsigned char *)bfrm.buf)[i]] = ((char *)bto.buf)[i];
423 } 423 }
424 424
425 done: 425 done:
426 if (bfrm.len != -1) 426 if (bfrm.len != -1)
427 PyBuffer_Release(&bfrm); 427 PyBuffer_Release(&bfrm);
428 if (bto.len != -1) 428 if (bto.len != -1)
429 PyBuffer_Release(&bto); 429 PyBuffer_Release(&bto);
430 return res; 430 return res;
431 } 431 }
OLDNEW
« no previous file with comments | « Modules/timemodule.c ('k') | Objects/codeobject.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+