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
9610ed34
Commit
9610ed34
authored
Jul 14, 2014
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add dynamic cast and friends.
parent
5ee84d80
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGES.rst
CHANGES.rst
+2
-0
Cython/Includes/libcpp/__init__.pxd
Cython/Includes/libcpp/__init__.pxd
+0
-2
Cython/Includes/libcpp/cast.pxd
Cython/Includes/libcpp/cast.pxd
+12
-0
No files found.
CHANGES.rst
View file @
9610ed34
...
...
@@ -56,6 +56,8 @@ Features added
* New directive ``use_switch`` (defaults to True) to optionally disable
the optimization of chained if statement to C switch statements.
* Defines dynamic_cast et al. in `libcpp.cast`.
Bugs fixed
----------
...
...
Cython/Includes/libcpp/__init__.pxd
View file @
9610ed34
# empty file
cdef
extern
from
*
:
ctypedef
bint
bool
Cython/Includes/libcpp/cast.pxd
0 → 100644
View file @
9610ed34
# Defines the standard C++ cast operators.
#
# Due to type restrictions, these are only defined for pointer parameters,
# however that is the only case where they are significantly more interesting
# than the standard C cast operator which can be written "<T>(expression)" in
# Cython.
cdef
extern
from
*
:
cdef
T
dynamic_cast
[
T
](
void
*
)
except
+
# nullptr may also indicate failure
cdef
T
static_cast
[
T
](
void
*
)
cdef
T
reinterpret_cast
[
T
](
void
*
)
cdef
T
const_cast
[
T
](
void
*
)
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