Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
c4928553
Commit
c4928553
authored
9 years ago
by
Simon Désaulniers
Committed by
Adrien Béraud
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
python: fix successive deref on cython object
parent
48b0cff0
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
python/opendht.pyx
+1
-1
1 addition, 1 deletion
python/opendht.pyx
with
1 addition
and
1 deletion
python/opendht.pyx
+
1
−
1
View file @
c4928553
...
@@ -50,7 +50,6 @@ cdef inline void lookup_callback(cpp.vector[cpp.shared_ptr[cpp.IndexValue]]* val
...
@@ -50,7 +50,6 @@ cdef inline void lookup_callback(cpp.vector[cpp.shared_ptr[cpp.IndexValue]]* val
v
.
_value
=
val
v
.
_value
=
val
vals
.
append
(
v
)
vals
.
append
(
v
)
cbs
[
'
lookup
'
](
vals
,
p
.
toString
())
cbs
[
'
lookup
'
](
vals
,
p
.
toString
())
ref
.
Py_DECREF
(
cbs
)
cdef
inline
void
shutdown_callback
(
void
*
user_data
)
with
gil
:
cdef
inline
void
shutdown_callback
(
void
*
user_data
)
with
gil
:
cbs
=
<
object
>
user_data
cbs
=
<
object
>
user_data
...
@@ -435,6 +434,7 @@ cdef class Pht(object):
...
@@ -435,6 +434,7 @@ cdef class Pht(object):
done_cb -- Called when the operation is completed.
done_cb -- Called when the operation is completed.
"""
"""
cb_obj
=
{
'
done
'
:
done_cb
}
cb_obj
=
{
'
done
'
:
done_cb
}
ref
.
Py_INCREF
(
cb_obj
)
cdef
cpp
.
IndexKey
cppk
cdef
cpp
.
IndexKey
cppk
for
kk
,
v
in
key
.
items
():
for
kk
,
v
in
key
.
items
():
cppk
[
bytes
(
kk
,
'
utf-8
'
)]
=
cpp
.
Prefix
(
bytes
(
v
))
cppk
[
bytes
(
kk
,
'
utf-8
'
)]
=
cpp
.
Prefix
(
bytes
(
v
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment