Commit 274afa3f authored by Kirill Smelkov's avatar Kirill Smelkov

golang.pxd: Expose missing memory-management bits

- refptr==refptr  (e.g. to compare whether returned error object is
  something particular)
- adoptref() and newref()
- object (exposed as gobject not to be confused with builtin pyx
  "object" referring to python object)

All this will be soon used in C version of context package.
parent 9216e2db
......@@ -130,9 +130,26 @@ cdef extern from "golang/libgolang.h" namespace "golang" nogil:
cbool operator!= (nullptr_t) const
void operator= (nullptr_t) const
# compare wrt refptr; =refptr
# XXX workaround for https://github.com/cython/cython/issues/1357:
# compare by .eq() instead of ==
#cbool operator== (refptr) const
#cbool operator!= (refptr) const
#cbool operator= (refptr) const
cbool eq "operator==" (refptr) const
cbool ne "operator!=" (refptr) const
# get raw pointer
T* _ptr() const
refptr[T] adoptref[T](T *_obj)
refptr[T] newref [T](T *_obj)
cppclass gobject "golang::object":
cbool __decref() # protected
void incref()
int refcnt() const
# ---- python bits ----
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment