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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
aaedcdea
Commit
aaedcdea
authored
Jul 26, 2008
by
Dag Sverre Seljebotn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Includes/python_buffer.pxd
parent
7147f66b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
Includes/python_buffer.pxd
Includes/python_buffer.pxd
+61
-0
No files found.
Includes/python_buffer.pxd
0 → 100644
View file @
aaedcdea
# Please see the Python header files (object.h) for docs
cdef
extern
from
"Python.h"
:
ctypedef
void
PyObject
ctypedef
struct
bufferinfo
:
void
*
buf
Py_ssize_t
len
Py_ssize_t
itemsize
int
readonly
int
ndim
char
*
format
Py_ssize_t
*
shape
Py_ssize_t
*
strides
Py_ssize_t
*
suboffsets
void
*
internal
ctypedef
bufferinfo
Py_buffer
cdef
enum
:
PyBUF_SIMPLE
,
PyBUF_WRITABLE
,
PyBUF_WRITEABLE
,
# backwards compatability
PyBUF_FORMAT
,
PyBUF_ND
,
PyBUF_STRIDES
,
PyBUF_C_CONTIGUOUS
,
PyBUF_F_CONTIGUOUS
,
PyBUF_ANY_CONTIGUOUS
,
PyBUF_INDIRECT
,
PyBUF_CONTIG
,
PyBUF_CONTIG_RO
,
PyBUF_STRIDED
,
PyBUF_STRIDED_RO
,
PyBUF_RECORDS
,
PyBUF_RECORDS_RO
,
PyBUF_FULL
,
PyBUF_FULL_RO
,
PyBUF_READ
,
PyBUF_WRITE
,
PyBUF_SHADOW
int
PyObject_CheckBuffer
(
PyObject
*
obj
)
int
PyObject_GetBuffer
(
PyObject
*
obj
,
Py_buffer
*
view
,
int
flags
)
void
PyObject_ReleaseBuffer
(
PyObject
*
obj
,
Py_buffer
*
view
)
void
*
PyBuffer_GetPointer
(
Py_buffer
*
view
,
Py_ssize_t
*
indices
)
int
PyBuffer_SizeFromFormat
(
char
*
)
# actually const char
int
PyBuffer_ToContiguous
(
void
*
buf
,
Py_buffer
*
view
,
Py_ssize_t
len
,
char
fort
)
int
PyBuffer_FromContiguous
(
Py_buffer
*
view
,
void
*
buf
,
Py_ssize_t
len
,
char
fort
)
int
PyObject_CopyData
(
PyObject
*
dest
,
PyObject
*
src
)
int
PyBuffer_IsContiguous
(
Py_buffer
*
view
,
char
fort
)
void
PyBuffer_FillContiguousStrides
(
int
ndims
,
Py_ssize_t
*
shape
,
Py_ssize_t
*
strides
,
int
itemsize
,
char
fort
)
int
PyBuffer_FillInfo
(
Py_buffer
*
view
,
void
*
buf
,
Py_ssize_t
len
,
int
readonly
,
int
flags
)
PyObject
*
PyObject_Format
(
PyObject
*
obj
,
PyObject
*
format_spec
)
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