Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
049ebe24
Commit
049ebe24
authored
Oct 26, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove usages of CYTHON_FORMAT_SSIZE_T (which is always 'z')
parent
3ad62f34
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
16 deletions
+11
-16
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-4
Cython/Utility/Buffer.c
Cython/Utility/Buffer.c
+1
-1
Cython/Utility/FunctionArguments.c
Cython/Utility/FunctionArguments.c
+1
-1
Cython/Utility/MemoryView_C.c
Cython/Utility/MemoryView_C.c
+1
-2
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+2
-4
Cython/Utility/TypeConversion.c
Cython/Utility/TypeConversion.c
+3
-4
No files found.
Cython/Compiler/ExprNodes.py
View file @
049ebe24
...
...
@@ -4210,10 +4210,9 @@ class SliceIndexNode(ExprNode):
if
runtime_check
:
code
.
putln
(
"if (unlikely((%s) != (%s))) {"
%
(
runtime_check
,
target_size
))
code
.
putln
(
'PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length,'
' expected %%" CYTHON_FORMAT_SSIZE_T "d, got %%" CYTHON_FORMAT_SSIZE_T "d",'
' (Py_ssize_t)(%s), (Py_ssize_t)(%s));'
%
(
target_size
,
runtime_check
))
'PyErr_Format(PyExc_ValueError,'
' "Assignment to slice of wrong length, expected %%zd, got %%zd",'
' (Py_ssize_t)(%s), (Py_ssize_t)(%s));'
%
(
target_size
,
runtime_check
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
"}"
)
...
...
Cython/Utility/Buffer.c
View file @
049ebe24
...
...
@@ -481,7 +481,7 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
offset
=
ctx
->
head
->
parent_offset
+
field
->
offset
;
if
(
ctx
->
fmt_offset
!=
offset
)
{
PyErr_Format
(
PyExc_ValueError
,
"Buffer dtype mismatch; next field is at offset %
"
CYTHON_FORMAT_SSIZE_T
"d but %"
CYTHON_FORMAT_SSIZE_T
"
d expected"
,
"Buffer dtype mismatch; next field is at offset %
zd but %z
d expected"
,
(
Py_ssize_t
)
ctx
->
fmt_offset
,
(
Py_ssize_t
)
offset
);
return
-
1
;
}
...
...
Cython/Utility/FunctionArguments.c
View file @
049ebe24
...
...
@@ -64,7 +64,7 @@ static void __Pyx_RaiseArgtupleInvalid(
more_or_less
=
"exactly"
;
}
PyErr_Format
(
PyExc_TypeError
,
"%.200s() takes %.8s %
"
CYTHON_FORMAT_SSIZE_T
"d positional argument%.1s (%"
CYTHON_FORMAT_SSIZE_T
"
d given)"
,
"%.200s() takes %.8s %
zd positional argument%.1s (%z
d given)"
,
func_name
,
more_or_less
,
num_expected
,
(
num_expected
==
1
)
?
""
:
"s"
,
num_found
);
}
...
...
Cython/Utility/MemoryView_C.c
View file @
049ebe24
...
...
@@ -331,8 +331,7 @@ static int __Pyx_ValidateAndInit_memviewslice(
if
((
unsigned
)
buf
->
itemsize
!=
dtype
->
size
)
{
PyErr_Format
(
PyExc_ValueError
,
"Item size of buffer (%"
CYTHON_FORMAT_SSIZE_T
"u byte%s) "
"does not match size of '%s' (%"
CYTHON_FORMAT_SSIZE_T
"u byte%s)"
,
"Item size of buffer (%zu byte%s) does not match size of '%s' (%zu byte%s)"
,
buf
->
itemsize
,
(
buf
->
itemsize
>
1
)
?
"s"
:
""
,
dtype
->
name
,
...
...
Cython/Utility/ObjectHandling.c
View file @
049ebe24
...
...
@@ -24,8 +24,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
/////////////// RaiseTooManyValuesToUnpack ///////////////
static
CYTHON_INLINE
void
__Pyx_RaiseTooManyValuesError
(
Py_ssize_t
expected
)
{
PyErr_Format
(
PyExc_ValueError
,
"too many values to unpack (expected %"
CYTHON_FORMAT_SSIZE_T
"d)"
,
expected
);
PyErr_Format
(
PyExc_ValueError
,
"too many values to unpack (expected %zd)"
,
expected
);
}
/////////////// RaiseNeedMoreValuesToUnpack.proto ///////////////
...
...
@@ -35,8 +34,7 @@ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
/////////////// RaiseNeedMoreValuesToUnpack ///////////////
static
CYTHON_INLINE
void
__Pyx_RaiseNeedMoreValuesError
(
Py_ssize_t
index
)
{
PyErr_Format
(
PyExc_ValueError
,
"need more than %"
CYTHON_FORMAT_SSIZE_T
"d value%.1s to unpack"
,
PyErr_Format
(
PyExc_ValueError
,
"need more than %zd value%.1s to unpack"
,
index
,
(
index
==
1
)
?
""
:
"s"
);
}
...
...
Cython/Utility/TypeConversion.c
View file @
049ebe24
...
...
@@ -344,8 +344,7 @@ static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject* x) {
#endif
#endif
PyErr_Format
(
PyExc_ValueError
,
"only single character unicode strings can be converted to Py_UCS4, "
"got length %"
CYTHON_FORMAT_SSIZE_T
"d"
,
length
);
"only single character unicode strings can be converted to Py_UCS4, got length %zd"
,
length
);
return
(
Py_UCS4
)
-
1
;
}
ival
=
__Pyx_PyInt_As_long
(
x
);
...
...
@@ -382,8 +381,8 @@ static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) {
if
(
PyUnicode_Check
(
x
))
{
if
(
unlikely
(
__Pyx_PyUnicode_GET_LENGTH
(
x
)
!=
1
))
{
PyErr_Format
(
PyExc_ValueError
,
"only single character unicode strings can be converted to Py_UNICODE,
"
"got length %"
CYTHON_FORMAT_SSIZE_T
"d"
,
__Pyx_PyUnicode_GET_LENGTH
(
x
));
"only single character unicode strings can be converted to Py_UNICODE,
got length %zd"
,
__Pyx_PyUnicode_GET_LENGTH
(
x
));
return
(
Py_UNICODE
)
-
1
;
}
#if CYTHON_PEP393_ENABLED
...
...
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