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
b0bf40a8
Commit
b0bf40a8
authored
Oct 14, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PyCObject C-API declarations
parent
73e40bad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
Cython/Includes/python_cobject.pxd
Cython/Includes/python_cobject.pxd
+36
-0
No files found.
Cython/Includes/python_cobject.pxd
0 → 100644
View file @
b0bf40a8
cdef
extern
from
"Python.h"
:
ctypedef
void
PyObject
###########################################################################
# Warning:
#
# The CObject API is deprecated as of Python 3.1. Please switch to
# the new Capsules API.
###########################################################################
int
PyCObject_Check
(
object
p
)
¶
# Return true if its argument is a PyCObject.
object
PyCObject_FromVoidPtr
(
void
*
cobj
,
void
(
*
destr
)(
void
*
))
¶
# Return value: New reference.
#
# Create a PyCObject from the void * cobj. The destr function will
# be called when the object is reclaimed, unless it is NULL.
object
PyCObject_FromVoidPtrAndDesc
(
void
*
cobj
,
void
*
desc
,
void
(
*
destr
)(
void
*
,
void
*
))
¶
# Return value: New reference.
#
# Create a PyCObject from the void * cobj. The destr function will
# be called when the object is reclaimed. The desc argument can be
# used to pass extra callback data for the destructor function.
void
*
PyCObject_AsVoidPtr
(
object
self
)
¶
# Return the object void * that the PyCObject self was created with.
void
*
PyCObject_GetDesc
(
object
self
)
¶
# Return the description void * that the PyCObject self was created with.
int
PyCObject_SetVoidPtr
(
object
self
,
void
*
cobj
)
¶
# Set the void pointer inside self to cobj. The PyCObject must not
# have an associated destructor. Return true on success, false on
# failure.
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