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
e6874284
Commit
e6874284
authored
Oct 10, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tighten also the signature compatibility checks by comparing their 'except' declarations
parent
968226ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
Cython/Compiler/PyrexTypes.py
Cython/Compiler/PyrexTypes.py
+10
-11
No files found.
Cython/Compiler/PyrexTypes.py
View file @
e6874284
...
...
@@ -2442,10 +2442,14 @@ class CFuncType(CType):
return
0
if
self
.
nogil
!=
other_type
.
nogil
:
return
0
if
self
.
exception_value
!=
other_type
.
exception_value
:
return
0
if
not
self
.
exception_check
and
other_type
.
exception_check
:
# a redundant exception check doesn't make functions incompatible, but a missing one does
return
0
self
.
original_sig
=
other_type
.
original_sig
or
other_type
return
1
def
narrower_c_signature_than
(
self
,
other_type
,
as_cmethod
=
0
):
return
self
.
narrower_c_signature_than_resolved_type
(
other_type
.
resolve
(),
as_cmethod
)
...
...
@@ -2469,6 +2473,11 @@ class CFuncType(CType):
return
0
if
not
self
.
return_type
.
subtype_of_resolved_type
(
other_type
.
return_type
):
return
0
if
self
.
exception_value
!=
other_type
.
exception_value
:
return
0
if
not
self
.
exception_check
and
other_type
.
exception_check
:
# a redundant exception check doesn't make functions incompatible, but a missing one does
return
0
return
1
def
same_calling_convention_as
(
self
,
other
):
...
...
@@ -2485,22 +2494,12 @@ class CFuncType(CType):
sc2
=
other
.
calling_convention
==
'__stdcall'
return
sc1
==
sc2
def
same_exception_signature_as
(
self
,
other_type
):
return
self
.
same_exception_signature_as_resolved_type
(
other_type
.
resolve
())
def
same_exception_signature_as_resolved_type
(
self
,
other_type
):
return
self
.
exception_value
==
other_type
.
exception_value
\
and
self
.
exception_check
==
other_type
.
exception_check
def
same_as_resolved_type
(
self
,
other_type
,
as_cmethod
=
0
):
return
self
.
same_c_signature_as_resolved_type
(
other_type
,
as_cmethod
)
\
and
self
.
same_exception_signature_as_resolved_type
(
other_type
)
\
and
self
.
nogil
==
other_type
.
nogil
def
pointer_assignable_from_resolved_type
(
self
,
other_type
):
return
self
.
same_c_signature_as_resolved_type
(
other_type
)
\
and
self
.
same_exception_signature_as_resolved_type
(
other_type
)
\
and
not
(
self
.
nogil
and
not
other_type
.
nogil
)
def
declaration_code
(
self
,
entity_code
,
...
...
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