Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pybuffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ end
Release the reference to buffer `o`
N.b. As per https://docs.python.org/3/c-api/buffer.html#c.PyBuffer_Release,
It is an error to call this function on a PyBuffer that was not obtained via
the python c-api function `PyObject_GetBuffer(), unless o.obj is a PyPtr(C_NULL)`
the python c-api function `PyObject_GetBuffer()`, unless o.obj is a PyPtr(C_NULL)
"""
function pydecref(o::PyBuffer)
# note that PyBuffer_Release sets o.obj to NULL, and
# is a no-op if o.obj is already NULL
# TODO change to `Ref{PyBuffer}` when 0.6 is dropped.
ccall(@pysym(:PyBuffer_Release), Cvoid, (Any,), o)
_finalized[] || ccall(@pysym(:PyBuffer_Release), Cvoid, (Any,), o)
o
end

Expand Down