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
f2a95cb5
Commit
f2a95cb5
authored
Jun 27, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow subtypes of a cypclass wrapper to be converted to that cypclass base
parent
8b80fda7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Cython/Utility/CyObjects.cpp
Cython/Utility/CyObjects.cpp
+1
-1
No files found.
Cython/Utility/CyObjects.cpp
View file @
f2a95cb5
...
@@ -208,7 +208,7 @@
...
@@ -208,7 +208,7 @@
template
<
typename
U
>
template
<
typename
U
>
static
inline
U
*
__Pyx_PyObject_AsCyObject
(
PyObject
*
ob
,
PyTypeObject
*
type
)
{
static
inline
U
*
__Pyx_PyObject_AsCyObject
(
PyObject
*
ob
,
PyTypeObject
*
type
)
{
// the PyObject is not of the expected type
// the PyObject is not of the expected type
if
(
ob
->
ob_type
!=
type
)
{
if
(
!
PyType_IsSubtype
(
ob
->
ob_type
,
type
)
)
{
PyErr_Format
(
PyExc_TypeError
,
"Cannot convert PyObject %s to CyObject %s"
,
ob
->
ob_type
->
tp_name
,
type
->
tp_name
);
PyErr_Format
(
PyExc_TypeError
,
"Cannot convert PyObject %s to CyObject %s"
,
ob
->
ob_type
->
tp_name
,
type
->
tp_name
);
return
NULL
;
return
NULL
;
}
}
...
...
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