Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
persistent
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
persistent
Commits
81467021
Commit
81467021
authored
May 19, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a better name for the output of the FFI verify call to signal its constant/global nature.
parent
f711686e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
persistent/ring.py
persistent/ring.py
+4
-4
No files found.
persistent/ring.py
View file @
81467021
...
...
@@ -156,7 +156,7 @@ else:
with
open
(
os
.
path
.
join
(
this_dir
,
'ring.h'
))
as
f
:
ffi
.
cdef
(
f
.
read
())
ring
=
ffi
.
verify
(
"""
_FFI_RING
=
ffi
.
verify
(
"""
#include "ring.c"
"""
,
include_dirs
=
[
this_dir
])
...
...
@@ -191,7 +191,7 @@ else:
def
add
(
self
,
pobj
):
node
=
ffi
.
new
(
"CPersistentRing*"
)
ring
.
ring_add
(
self
.
ring_home
,
node
)
_FFI_RING
.
ring_add
(
self
.
ring_home
,
node
)
self
.
ring_to_obj
[
node
]
=
pobj
_OSA
(
pobj
,
'_Persistent__ring'
,
node
)
...
...
@@ -199,12 +199,12 @@ else:
its_node
=
getattr
(
pobj
,
'_Persistent__ring'
,
None
)
our_obj
=
self
.
ring_to_obj
.
pop
(
its_node
,
None
)
if
its_node
is
not
None
and
our_obj
is
not
None
and
its_node
.
r_next
:
ring
.
ring_del
(
its_node
)
_FFI_RING
.
ring_del
(
its_node
)
return
1
def
move_to_head
(
self
,
pobj
):
node
=
_OGA
(
pobj
,
'_Persistent__ring'
)
ring
.
ring_move_to_head
(
self
.
ring_home
,
node
)
_FFI_RING
.
ring_move_to_head
(
self
.
ring_home
,
node
)
def
delete_all
(
self
,
indexes_and_values
):
for
_
,
value
in
indexes_and_values
:
...
...
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