Skip to content
Snippets Groups Projects
Commit 80cfb889 authored by Yichao Yu's avatar Yichao Yu
Browse files

update doc of python callbacks

parent 3e503178
No related branches found
No related tags found
No related merge requests found
...@@ -187,10 +187,9 @@ def _py_deref(handle): ...@@ -187,10 +187,9 @@ def _py_deref(handle):
except: except:
pass pass
# TODO: # return a new reference of the object pointed to by the handle.
# Not sure if cffi always return the same address for the same object # The return value might be different with the input (on PyPy).
# Unless it is, this function might return a different pointer from its input # _py_deref should be called (once) when the object is not needed anymore.
# and should only be called once.
@_ffi.callback('void*(void*)') @_ffi.callback('void*(void*)')
def _py_ref(handle): def _py_ref(handle):
obj = _ffi.from_handle(handle) obj = _ffi.from_handle(handle)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment