Content-Length: 254518 | pFad | http://github.com/4cecoder/go-python/commit/ba7e58341058bdefb92b359870caf2dc0a05cfcf

6E Add getter to internal C pointer to Cpython object. · 4cecoder/go-python@ba7e583 · GitHub
Skip to content

Commit ba7e583

Browse files
committed
Add getter to internal C pointer to Cpython object.
1 parent a2acb64 commit ba7e583

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

object.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ func file2go(f *C.FILE) *os.File {
9090
return nil
9191
}
9292

93+
// C.PyObject* PyObject_GetCPointer(PyObject *o)
94+
// Returns the internal C pointer to CPython object.
95+
func (self *PyObject) GetCPointer() *C.PyObject {
96+
return self.ptr
97+
}
98+
9399
// void Py_IncRef(PyObject *o)
94100
// Increment the reference count for object o. The object may be
95101
// NULL, in which case the function has no effect.

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/4cecoder/go-python/commit/ba7e58341058bdefb92b359870caf2dc0a05cfcf

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy