Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
shrapnel
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
Kirill Smelkov
shrapnel
Commits
34635f63
Commit
34635f63
authored
Apr 26, 2013
by
Sam Rushing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fifo.push_front(): new method
parent
decc249a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
coro/fifo.pyx
coro/fifo.pyx
+12
-3
No files found.
coro/fifo.pyx
View file @
34635f63
...
@@ -20,8 +20,6 @@
...
@@ -20,8 +20,6 @@
# -*- Mode: Pyrex -*-
# -*- Mode: Pyrex -*-
# XXX make an iterator interface for this...
cdef
class
node
:
cdef
class
node
:
cdef
object
data
cdef
object
data
cdef
node
next
cdef
node
next
...
@@ -53,7 +51,18 @@ cdef class _fifo:
...
@@ -53,7 +51,18 @@ cdef class _fifo:
else
:
else
:
self
.
tail
.
next
=
tail
self
.
tail
.
next
=
tail
self
.
tail
=
tail
self
.
tail
=
tail
self
.
size
=
self
.
size
+
1
self
.
size
+=
1
cpdef
push_front
(
self
,
object
data
):
cdef
node
head
head
=
node
(
data
,
None
)
if
self
.
size
==
0
:
self
.
head
=
head
self
.
tail
=
head
else
:
head
.
next
=
self
.
head
self
.
head
=
head
self
.
size
+=
1
cdef
_pop
(
self
):
cdef
_pop
(
self
):
cdef
node
head
cdef
node
head
...
...
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