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
55af254c
Commit
55af254c
authored
Mar 28, 2017
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More determinism in fused types.
parent
b390a172
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
Cython/Compiler/FusedNode.py
Cython/Compiler/FusedNode.py
+2
-1
Cython/Utils.py
Cython/Utils.py
+16
-0
No files found.
Cython/Compiler/FusedNode.py
View file @
55af254c
...
...
@@ -6,6 +6,7 @@ from . import (ExprNodes, PyrexTypes, MemoryView,
ParseTreeTransforms
,
StringEncoding
,
Errors
)
from
.ExprNodes
import
CloneNode
,
ProxyNode
,
TupleNode
from
.Nodes
import
FuncDefNode
,
CFuncDefNode
,
StatListNode
,
DefNode
from
..Utils
import
OrderedSet
class
FusedCFuncDefNode
(
StatListNode
):
...
...
@@ -576,7 +577,7 @@ class FusedCFuncDefNode(StatListNode):
fused_index
=
0
default_idx
=
0
all_buffer_types
=
s
et
()
all_buffer_types
=
OrderedS
et
()
seen_fused_types
=
set
()
for
i
,
arg
in
enumerate
(
self
.
node
.
args
):
if
arg
.
type
.
is_fused
:
...
...
Cython/Utils.py
View file @
55af254c
...
...
@@ -449,6 +449,22 @@ class LazyStr:
return
left
+
self
.
callback
()
class
OrderedSet
(
object
):
def
__init__
(
self
,
elements
=
()):
self
.
_list
=
[]
self
.
_set
=
set
()
self
.
update
(
elements
)
def
__iter__
(
self
):
return
iter
(
self
.
_list
)
def
update
(
self
,
elements
):
for
e
in
elements
:
self
.
add
(
e
)
def
add
(
self
,
e
):
if
e
not
in
self
.
_set
:
self
.
_list
.
append
(
e
)
self
.
_set
.
add
(
e
)
# Class decorator that adds a metaclass and recreates the class with it.
# Copied from 'six'.
def
add_metaclass
(
metaclass
):
...
...
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