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

Delta Between Two Patch Sets: Include/bytesobject.h

Issue 28128: Improve the warning message for invalid escape sequences
Left Patch Set: Created 3 years, 2 months ago
Right Patch Set: Created 3 years, 1 month 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:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Include/unicodeobject.h » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 1
2 /* Bytes (String) object interface */ 2 /* Bytes (String) object interface */
3 3
4 #ifndef Py_BYTESOBJECT_H 4 #ifndef Py_BYTESOBJECT_H
5 #define Py_BYTESOBJECT_H 5 #define Py_BYTESOBJECT_H
6 #ifdef __cplusplus 6 #ifdef __cplusplus
7 extern "C" { 7 extern "C" {
8 #endif 8 #endif
9 9
10 #include <stdarg.h> 10 #include <stdarg.h>
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 Py_ssize_t format_len, 67 Py_ssize_t format_len,
68 PyObject *args, 68 PyObject *args,
69 int use_bytearray); 69 int use_bytearray);
70 PyAPI_FUNC(PyObject*) _PyBytes_FromHex( 70 PyAPI_FUNC(PyObject*) _PyBytes_FromHex(
71 PyObject *string, 71 PyObject *string,
72 int use_bytearray); 72 int use_bytearray);
73 #endif 73 #endif
74 PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t, 74 PyAPI_FUNC(PyObject *) PyBytes_DecodeEscape(const char *, Py_ssize_t,
75 const char *, Py_ssize_t, 75 const char *, Py_ssize_t,
76 const char *); 76 const char *);
77 /* Helper for PyBytes_DecodeEscape that detects invalid escape chars. */
78 PyAPI_FUNC(PyObject *) _PyBytes_DecodeEscape(const char *, Py_ssize_t,
79 const char *, Py_ssize_t,
80 const char *,
81 const char **);
77 82
78 /* Macro, trading safety for speed */ 83 /* Macro, trading safety for speed */
79 #ifndef Py_LIMITED_API 84 #ifndef Py_LIMITED_API
80 #define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \ 85 #define PyBytes_AS_STRING(op) (assert(PyBytes_Check(op)), \
81 (((PyBytesObject *)(op))->ob_sval)) 86 (((PyBytesObject *)(op))->ob_sval))
82 #define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op)) 87 #define PyBytes_GET_SIZE(op) (assert(PyBytes_Check(op)),Py_SIZE(op))
83 #endif 88 #endif
84 89
85 /* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*, 90 /* _PyBytes_Join(sep, x) is like sep.join(x). sep must be PyBytesObject*,
86 x must be an iterable object. */ 91 x must be an iterable object. */
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 PyAPI_FUNC(void*) _PyBytesWriter_WriteBytes(_PyBytesWriter *writer, 213 PyAPI_FUNC(void*) _PyBytesWriter_WriteBytes(_PyBytesWriter *writer,
209 void *str, 214 void *str,
210 const void *bytes, 215 const void *bytes,
211 Py_ssize_t size); 216 Py_ssize_t size);
212 #endif /* Py_LIMITED_API */ 217 #endif /* Py_LIMITED_API */
213 218
214 #ifdef __cplusplus 219 #ifdef __cplusplus
215 } 220 }
216 #endif 221 #endif
217 #endif /* !Py_BYTESOBJECT_H */ 222 #endif /* !Py_BYTESOBJECT_H */
LEFTRIGHT

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