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
dbf697ae
Commit
dbf697ae
authored
Oct 06, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compilation warnings under 64-bit Windows
parent
45d9c91d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Include/unicodeobject.h
Include/unicodeobject.h
+3
-2
Objects/stringlib/unicode_format.h
Objects/stringlib/unicode_format.h
+1
-1
No files found.
Include/unicodeobject.h
View file @
dbf697ae
...
...
@@ -441,7 +441,7 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
See also PyUnicode_KIND_SIZE(). */
#define PyUnicode_CHARACTER_SIZE(op) \
(
1 << (PyUnicode_KIND(op) - 1
))
(
(Py_ssize_t) (1 << (PyUnicode_KIND(op) - 1)
))
/* Return pointers to the canonical representation cast to unsigned char,
Py_UCS2, or Py_UCS4 for direct character access.
...
...
@@ -477,7 +477,8 @@ PyAPI_DATA(PyTypeObject) PyUnicodeIter_Type;
The index is a character index, the result is a size in bytes.
See also PyUnicode_CHARACTER_SIZE(). */
#define PyUnicode_KIND_SIZE(kind, index) ((index) << ((kind) - 1))
#define PyUnicode_KIND_SIZE(kind, index) \
((Py_ssize_t) ((index) << ((kind) - 1)))
/* In the access macros below, "kind" may be evaluated more than once.
All other macro parameters are evaluated exactly once, so it is safe
...
...
Objects/stringlib/unicode_format.h
View file @
dbf697ae
...
...
@@ -56,7 +56,7 @@ AutoNumber_Init(AutoNumber *auto_number)
/* fill in a SubString from a pointer and length */
Py_LOCAL_INLINE
(
void
)
SubString_init
(
SubString
*
str
,
PyObject
*
s
,
int
start
,
in
t
end
)
SubString_init
(
SubString
*
str
,
PyObject
*
s
,
Py_ssize_t
start
,
Py_ssize_
t
end
)
{
str
->
str
=
s
;
str
->
start
=
start
;
...
...
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