コード例 #1
0
ファイル: otherobjects.go プロジェクト: gward/go-python
// PyObject* PyFunction_GetGlobals(PyObject *op)
// Return value: Borrowed reference.
// Return the globals dictionary associated with the function object op.
func PyFunction_GetGlobals(op *PyObject) *PyObject {
	return togo(C.PyFunction_GetGlobals(topy(op)))
}
コード例 #2
0
// Globals returns the globals dictionary associated with the function "fn".
//
// Return value: Borrowed Reference.
func (fn *Function) Globals() (Object, error) {
	ret := C.PyFunction_GetGlobals(c(fn))
	return obj2ObjErr(ret)
}