Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2d28f592
Commit
2d28f592
authored
Jun 14, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add asserts to PyBytes_AS_STRING and PyBytes_GET_SIZE.
parent
27ff74d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Include/bytesobject.h
Include/bytesobject.h
+2
-2
No files found.
Include/bytesobject.h
View file @
2d28f592
...
...
@@ -41,8 +41,8 @@ PyAPI_FUNC(char *) PyBytes_AsString(PyObject *);
PyAPI_FUNC
(
int
)
PyBytes_Resize
(
PyObject
*
,
Py_ssize_t
);
/* Macros, trading safety for speed */
#define PyBytes_AS_STRING(self) (((PyBytesObject *)(self))->ob_bytes)
#define PyBytes_GET_SIZE(self) (((PyBytesObject *)(self))->ob_size)
#define PyBytes_AS_STRING(self) (
assert(PyBytes_Check(self)),
((PyBytesObject *)(self))->ob_bytes)
#define PyBytes_GET_SIZE(self) (
assert(PyBytes_Check(self)),
((PyBytesObject *)(self))->ob_size)
#ifdef __cplusplus
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment