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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy