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
04904faa
Commit
04904faa
authored
Mar 26, 2006
by
Hye-Shik Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Utilize %zd for Py_ssize_t formatting instead of casting to long.
parent
9f4b6322
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Modules/cjkcodecs/multibytecodec.c
Modules/cjkcodecs/multibytecodec.c
+4
-4
No files found.
Modules/cjkcodecs/multibytecodec.c
View file @
04904faa
...
@@ -334,8 +334,8 @@ multibytecodec_encerror(MultibyteCodec *codec,
...
@@ -334,8 +334,8 @@ multibytecodec_encerror(MultibyteCodec *codec,
if
(
newpos
<
0
||
buf
->
inbuf_top
+
newpos
>
buf
->
inbuf_end
)
{
if
(
newpos
<
0
||
buf
->
inbuf_top
+
newpos
>
buf
->
inbuf_end
)
{
PyErr_Clear
();
PyErr_Clear
();
PyErr_Format
(
PyExc_IndexError
,
PyErr_Format
(
PyExc_IndexError
,
"position %
l
d from error handler out of bounds"
,
"position %
z
d from error handler out of bounds"
,
(
long
)
newpos
);
newpos
);
goto
errorexit
;
goto
errorexit
;
}
}
buf
->
inbuf
=
buf
->
inbuf_top
+
newpos
;
buf
->
inbuf
=
buf
->
inbuf_top
+
newpos
;
...
@@ -445,8 +445,8 @@ multibytecodec_decerror(MultibyteCodec *codec,
...
@@ -445,8 +445,8 @@ multibytecodec_decerror(MultibyteCodec *codec,
if
(
newpos
<
0
||
buf
->
inbuf_top
+
newpos
>
buf
->
inbuf_end
)
{
if
(
newpos
<
0
||
buf
->
inbuf_top
+
newpos
>
buf
->
inbuf_end
)
{
PyErr_Clear
();
PyErr_Clear
();
PyErr_Format
(
PyExc_IndexError
,
PyErr_Format
(
PyExc_IndexError
,
"position %l
d from error handler out of bounds"
,
"position %z
d from error handler out of bounds"
,
(
long
)
newpos
);
newpos
);
goto
errorexit
;
goto
errorexit
;
}
}
buf
->
inbuf
=
buf
->
inbuf_top
+
newpos
;
buf
->
inbuf
=
buf
->
inbuf_top
+
newpos
;
...
...
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