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
2f9ba8d2
Commit
2f9ba8d2
authored
Jan 17, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix py24-py25 memoryview compilation errors
parent
ed516fb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
Cython/Utility/MemoryView.pyx
Cython/Utility/MemoryView.pyx
+4
-1
Cython/Utility/MemoryView_C.c
Cython/Utility/MemoryView_C.c
+2
-2
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+2
-0
No files found.
Cython/Utility/MemoryView.pyx
View file @
2f9ba8d2
...
...
@@ -1047,7 +1047,10 @@ cdef Py_ssize_t slice_get_size({{memviewslice_name}} *src, int ndim) nogil:
cdef
Py_ssize_t
fill_contig_strides_array
(
Py_ssize_t
*
shape
,
Py_ssize_t
*
strides
,
Py_ssize_t
stride
,
int
ndim
,
char
order
)
nogil
:
"Fill the strides array for a slice with C or F contiguous strides"
"""
Fill the strides array for a slice with C or F contiguous strides.
This is like PyBuffer_FillContiguousStrides, but compatible with py < 2.6
"""
cdef
int
idx
if
order
==
'F'
:
...
...
Cython/Utility/MemoryView_C.c
View file @
2f9ba8d2
...
...
@@ -222,8 +222,8 @@ static int __Pyx_ValidateAndInit_memviewslice(
if
((
unsigned
)
buf
->
itemsize
!=
dtype
->
size
)
{
PyErr_Format
(
PyExc_ValueError
,
"Item size of buffer (%"
PY_FORMAT_SIZE_T
"
d
byte%s) "
"does not match size of '%s' (%"
PY_FORMAT_SIZE_T
"
d
byte%s)"
,
"Item size of buffer (%"
PY_FORMAT_SIZE_T
"
u
byte%s) "
"does not match size of '%s' (%"
PY_FORMAT_SIZE_T
"
u
byte%s)"
,
buf
->
itemsize
,
(
buf
->
itemsize
>
1
)
?
"s"
:
""
,
dtype
->
name
,
...
...
Cython/Utility/ModuleSetupCode.c
View file @
2f9ba8d2
...
...
@@ -71,6 +71,8 @@
#define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
#define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
#define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
#define PyBUF_RECORDS (PyBUF_STRIDES | PyBUF_FORMAT | PyBUF_WRITABLE)
#define PyBUF_FULL (PyBUF_INDIRECT | PyBUF_FORMAT | PyBUF_WRITABLE)
#endif
...
...
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