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
Boxiang Sun
cython
Commits
6d4efb6e
Commit
6d4efb6e
authored
Apr 05, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #109 from rp-/master
Fix compile error with gcc 4.7 and using c++11
parents
39055360
4a4d5d9a
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
7 additions
and
7 deletions
+7
-7
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+1
-1
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+2
-2
Cython/Utility/Buffer.c
Cython/Utility/Buffer.c
+1
-1
Cython/Utility/FunctionArguments.c
Cython/Utility/FunctionArguments.c
+1
-1
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+2
-2
No files found.
Cython/Compiler/ExprNodes.py
View file @
6d4efb6e
...
@@ -3368,7 +3368,7 @@ class SliceIndexNode(ExprNode):
...
@@ -3368,7 +3368,7 @@ class SliceIndexNode(ExprNode):
check
=
stop
check
=
stop
if
check
:
if
check
:
code
.
putln
(
"if (unlikely((%s) != %d)) {"
%
(
check
,
target_size
))
code
.
putln
(
"if (unlikely((%s) != %d)) {"
%
(
check
,
target_size
))
code
.
putln
(
'PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %%"
PY_FORMAT_SIZE_T"d, got %%"PY_FORMAT_SIZE_T
"d", (Py_ssize_t)%d, (Py_ssize_t)(%s));'
%
(
code
.
putln
(
'PyErr_Format(PyExc_ValueError, "Assignment to slice of wrong length, expected %%"
PY_FORMAT_SIZE_T "d, got %%" PY_FORMAT_SIZE_T
"d", (Py_ssize_t)%d, (Py_ssize_t)(%s));'
%
(
target_size
,
check
))
target_size
,
check
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
code
.
error_goto
(
self
.
pos
))
code
.
putln
(
"}"
)
code
.
putln
(
"}"
)
...
...
Cython/Compiler/PyrexTypes.py
View file @
6d4efb6e
...
@@ -1534,7 +1534,7 @@ static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject* x) {
...
@@ -1534,7 +1534,7 @@ static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject* x) {
#endif
#endif
PyErr_Format(PyExc_ValueError,
PyErr_Format(PyExc_ValueError,
"only single character unicode strings can be converted to Py_UCS4, "
"only single character unicode strings can be converted to Py_UCS4, "
"got length %"
PY_FORMAT_SIZE_T
"d", length);
"got length %"
PY_FORMAT_SIZE_T
"d", length);
return (Py_UCS4)-1;
return (Py_UCS4)-1;
}
}
ival = __Pyx_PyInt_AsLong(x);
ival = __Pyx_PyInt_AsLong(x);
...
@@ -1589,7 +1589,7 @@ static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) {
...
@@ -1589,7 +1589,7 @@ static CYTHON_INLINE Py_UNICODE __Pyx_PyObject_AsPy_UNICODE(PyObject* x) {
if (unlikely(__Pyx_PyUnicode_GET_LENGTH(x) != 1)) {
if (unlikely(__Pyx_PyUnicode_GET_LENGTH(x) != 1)) {
PyErr_Format(PyExc_ValueError,
PyErr_Format(PyExc_ValueError,
"only single character unicode strings can be converted to Py_UNICODE, "
"only single character unicode strings can be converted to Py_UNICODE, "
"got length %"
PY_FORMAT_SIZE_T
"d", __Pyx_PyUnicode_GET_LENGTH(x));
"got length %"
PY_FORMAT_SIZE_T
"d", __Pyx_PyUnicode_GET_LENGTH(x));
return (Py_UNICODE)-1;
return (Py_UNICODE)-1;
}
}
#ifdef CYTHON_PEP393_ENABLED
#ifdef CYTHON_PEP393_ENABLED
...
...
Cython/Utility/Buffer.c
View file @
6d4efb6e
...
@@ -537,7 +537,7 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
...
@@ -537,7 +537,7 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
offset
=
ctx
->
head
->
parent_offset
+
field
->
offset
;
offset
=
ctx
->
head
->
parent_offset
+
field
->
offset
;
if
(
ctx
->
fmt_offset
!=
offset
)
{
if
(
ctx
->
fmt_offset
!=
offset
)
{
PyErr_Format
(
PyExc_ValueError
,
PyErr_Format
(
PyExc_ValueError
,
"Buffer dtype mismatch; next field is at offset %"
PY_FORMAT_SIZE_T
"d but %"
PY_FORMAT_SIZE_T
"d expected"
,
"Buffer dtype mismatch; next field is at offset %"
PY_FORMAT_SIZE_T
"d but %"
PY_FORMAT_SIZE_T
"d expected"
,
(
Py_ssize_t
)
ctx
->
fmt_offset
,
(
Py_ssize_t
)
offset
);
(
Py_ssize_t
)
ctx
->
fmt_offset
,
(
Py_ssize_t
)
offset
);
return
-
1
;
return
-
1
;
}
}
...
...
Cython/Utility/FunctionArguments.c
View file @
6d4efb6e
...
@@ -58,7 +58,7 @@ static void __Pyx_RaiseArgtupleInvalid(
...
@@ -58,7 +58,7 @@ static void __Pyx_RaiseArgtupleInvalid(
more_or_less
=
"exactly"
;
more_or_less
=
"exactly"
;
}
}
PyErr_Format
(
PyExc_TypeError
,
PyErr_Format
(
PyExc_TypeError
,
"%s() takes %s %"
PY_FORMAT_SIZE_T
"d positional argument%s (%"
PY_FORMAT_SIZE_T
"d given)"
,
"%s() takes %s %"
PY_FORMAT_SIZE_T
"d positional argument%s (%"
PY_FORMAT_SIZE_T
"d given)"
,
func_name
,
more_or_less
,
num_expected
,
func_name
,
more_or_less
,
num_expected
,
(
num_expected
==
1
)
?
""
:
"s"
,
num_found
);
(
num_expected
==
1
)
?
""
:
"s"
,
num_found
);
}
}
...
...
Cython/Utility/ObjectHandling.c
View file @
6d4efb6e
...
@@ -37,7 +37,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
...
@@ -37,7 +37,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
static
CYTHON_INLINE
void
__Pyx_RaiseTooManyValuesError
(
Py_ssize_t
expected
)
{
static
CYTHON_INLINE
void
__Pyx_RaiseTooManyValuesError
(
Py_ssize_t
expected
)
{
PyErr_Format
(
PyExc_ValueError
,
PyErr_Format
(
PyExc_ValueError
,
"too many values to unpack (expected %"
PY_FORMAT_SIZE_T
"d)"
,
expected
);
"too many values to unpack (expected %"
PY_FORMAT_SIZE_T
"d)"
,
expected
);
}
}
/////////////// RaiseNeedMoreValuesToUnpack.proto ///////////////
/////////////// RaiseNeedMoreValuesToUnpack.proto ///////////////
...
@@ -48,7 +48,7 @@ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
...
@@ -48,7 +48,7 @@ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
static
CYTHON_INLINE
void
__Pyx_RaiseNeedMoreValuesError
(
Py_ssize_t
index
)
{
static
CYTHON_INLINE
void
__Pyx_RaiseNeedMoreValuesError
(
Py_ssize_t
index
)
{
PyErr_Format
(
PyExc_ValueError
,
PyErr_Format
(
PyExc_ValueError
,
"need more than %"
PY_FORMAT_SIZE_T
"d value%s to unpack"
,
"need more than %"
PY_FORMAT_SIZE_T
"d value%s to unpack"
,
index
,
(
index
==
1
)
?
""
:
"s"
);
index
,
(
index
==
1
)
?
""
:
"s"
);
}
}
...
...
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