8000 go-python/otherobjects.go at master · dco/go-python · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"allShortcutsEnabled":false,"fileTree":{"":{"items":[{"name":"cmd","path":"cmd","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".travis.yml","path":".travis.yml","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"capi.go","path":"capi.go","contentType":"file"},{"name":"cgoflags.go","path":"cgoflags.go","contentType":"file"},{"name":"dict.go","path":"dict.go","contentType":"file"},{"name":"exceptions.go","path":"exceptions.go","contentType":"file"},{"name":"exceptions_posix.go","path":"exceptions_posix.go","contentType":"file"},{"name":"go-python.c","path":"go-python.c","contentType":"file"},{"name":"go-python.go","path":"go-python.go","contentType":"file"},{"name":"go-python.h","path":"go-python.h","contentType":"file"},{"name":"heap.go","path":"heap.go","contentType":"file"},{"name":"none.go","path":"none.go","contentType":"file"},{"name":"numeric.go","path":"numeric.go","contentType":"file"},{"name":"object.go","path":"object.go","contentType":"file"},{"name":"object_posix.go","path":"object_posix.go","contentType":"file"},{"name":"object_windows.go","path":"object_windows.go","contentType":"file"},{"name":"otherobjects.go","path":"otherobjects.go","contentType":"file"},{"name":"python.go","path":"python.go","contentType":"file"},{"name":"python_test.go","path":"python_test.go","contentType":"file"},{"name":"sequence.go","path":"sequence.go","contentType":"file"},{"name":"type.go","path":"type.go","contentType":"file"},{"name":"utilities.go","path":"utilities.go","contentType":"file"},{"name":"veryhigh.go","path":"veryhigh.go","contentType":"file"}],"totalCount":27}},"fileTreeProcessingTime":12.003224,"foldersToFetch":[],"incompleteFileTree":false,"repo":{"id":116366014,"defaultBranch":"master","name":"go-python","ownerLogin":"dco","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2018-01-05T09:15:19.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/27330552?v=4","public":true,"private":false,"isOrgOwned":false},"codeLineWrapEnabled":false,"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"master","listCacheKey":"v0:1631444452.284559","canEdit":false,"refType":"branch","currentOid":"6d13f941744b9332d6ed00dc2cd2722acd79a47e"},"path":"otherobjects.go","currentUser":null,"blob":{"rawLines":["package python","","// #include \"go-python.h\"","import \"C\"","","import (","\t\"unsafe\"",")","","///// module /////","","// int PyModule_Check(PyObject *p)","// Return true if p is a module object, or a subtype of a module object.","//","// Changed in version 2.2: Allowed subtypes to be accepted.","func PyModule_Check(self *PyObject) bool {","\treturn int2bool(C._gopy_PyModule_Check(topy(self)))","}","","// int PyModule_CheckExact(PyObject *p)","// Return true if p is a module object, but not a subtype of PyModule_Type.","//","// New in version 2.2.","func PyModule_CheckExact(self *PyObject) bool {","\treturn int2bool(C._gopy_PyModule_CheckExact(topy(self)))","}","","// PyObject* PyModule_New(const char *name)","// Return value: New reference.","// Return a new module object with the __name__ attribute set to name. Only the module’s __doc__ and __name__ attributes are filled in; the caller is responsible for providing a __file__ attribute.","func PyModule_New(name string) *PyObject {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\treturn togo(C.PyModule_New(c_name))","}","","// PyObject* PyModule_GetDict(PyObject *module)","// Return value: Borrowed reference.","// Return the dictionary object that implements module‘s namespace; this object is the same as the __dict__ attribute of the module object. This function never fails. It is recommended extensions use other PyModule_*() and PyObject_*() functions rather than directly manipulate a module’s __dict__.","func PyModule_GetDict(self *PyObject) *PyObject {","\treturn togo(C.PyModule_GetDict(topy(self)))","}","","// char* PyModule_GetName(PyObject *module)","// Return module‘s __name__ value. If the module does not provide one, or if it is not a string, SystemError is raised and NULL is returned.","func PyModule_GetName(self *PyObject) string {","\tc_name := C.PyModule_GetName(topy(self))","\t// we do not own c_name...","\treturn C.GoString(c_name)","}","","// char* PyModule_GetFilename(PyObject *module)","// Return the name of the file from which module was loaded using module‘s __file__ attribute. If this is not defined, or if it is not a string, raise SystemError and return NULL.","func PyModule_GetFilename(self *PyObject) string {","\tc_name := C.PyModule_GetFilename(topy(self))","\t// we do not own c_name...","\treturn C.GoString(c_name)","}","","// int PyModule_AddObject(PyObject *module, const char *name, PyObject *value)","// Add an object to module as name. This is a convenience function which can be used from the module’s initialization function. This steals a reference to value. Return -1 on error, 0 on success.","//","// New in version 2.0.","func PyModule_AddObject(self *PyObject, name string, value *PyObject) error {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\treturn int2err(C.PyModule_AddObject(topy(self), c_name, topy(value)))","}","","// int PyModule_AddIntConstant(PyObject *module, const char *name, long value)","// Add an integer constant to module as name. This convenience function can be used from the module’s initialization function. Return -1 on error, 0 on success.","//","// New in version 2.0.","func PyModule_AddIntConstant(self *PyObject, name string, value int) error {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\treturn int2err(C.PyModule_AddIntConstant(topy(self), c_name, C.long(value)))","}","","// int PyModule_AddStringConstant(PyObject *module, const char *name, const char *value)","// Add a string constant to module as name. This convenience function can be used from the module’s initialization function. The string value must be null-terminated. Return -1 on error, 0 on success.","//","// New in version 2.0.","func PyModule_AddStringConstant(self *PyObject, name, value string) error {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\tc_value := C.CString(value)","\tdefer C.free(unsafe.Pointer(c_value))","","\treturn int2err(C.PyModule_AddStringConstant(topy(self), c_name, c_value))","}","","// int PyModule_AddIntMacro(PyObject *module, macro)","// Add an int constant to module. The name and the value are taken from macro. For example PyModule_AddConstant(module, AF_INET) adds the int constant AF_INET with the value of AF_INET to module. Return -1 on error, 0 on success.","//","// New in version 2.6.","func PyModule_AddIntMacro(self *PyObject, macro interface{}) error {","\t//FIXME ?","\tpanic(\"not implemented\")","}","","// int PyModule_AddStringMacro(PyObject *module, macro)","// Add a string constant to module.","// New in version 2.6.","func PyModule_AddStringMacro(self *PyObject, macro interface{}) error {","\t//FIXME ?","\tpanic(\"not implemented\")","}","","///// class /////","","// int PyClass_Check(PyObject *o)","// Return true if the object o is a class object, including instances of types derived from the standard class object. Return false in all other cases.","func PyClass_Check(o *PyObject) bool {","\treturn int2bool(C._gopy_PyClass_Check(topy(o)))","}","","// int PyClass_IsSubclass(PyObject *klass, PyObject *base)","// Return true if klass is a subclass of base. Return false in all other cases.","// There are very few functions specific to instance objects.","func PyClass_IsSubclass(klass, base *PyObject) bool {","\treturn int2bool(C.PyClass_IsSubclass(topy(klass), topy(base)))","}","","///// instance /////","","// int PyInstance_Check(PyObject *obj)","// Return true if obj is an instance.","func PyInstance_Check(obj *PyObject) bool {","\treturn int2bool(C._gopy_PyInstance_Check(topy(obj)))","}","","// PyObject* PyInstance_New(PyObject *class, PyObject *arg, PyObject *kw)","// Return value: New reference.","// Create a new instance of a specific class. The parameters arg and kw are used as the positional and keyword parameters to the object’s constructor.","func PyInstance_New(class, arg, kw *PyObject) *PyObject {","\treturn togo(C.PyInstance_New(topy(class), topy(arg), topy(kw)))","}","","// PyObject* PyInstance_NewRaw(PyObject *class, PyObject *dict)","// Return value: New reference.","// Create a new instance of a specific class without calling its constructor. class is the class of new object. The dict parameter will be used as the object’s __dict__; if NULL, a new dictionary will be created for the instance.","func PyInstance_NewRaw(class, dict *PyObject) *PyObject {","\treturn togo(C.PyInstance_NewRaw(topy(class), topy(dict)))","}","","///// function /////","","// int PyFunction_Check(PyObject *o)","// Return true if o is a function object (has type PyFunction_Type). The parameter must not be NULL.","func PyFunction_Check(o *PyObject) bool {","\treturn int2bool(C._gopy_PyFunction_Check(topy(o)))","}","","// PyObject* PyFunction_New(PyObject *code, PyObject *globals)","// Return value: New reference.","// Return a new function object associated with the code object code. globals must be a dictionary with the global variables accessible to the function.","//","// The function’s docstring, name and __module__ are retrieved from the code object, the argument defaults and closure are set to NULL.","func PyFunction_New(code, globals *PyObject) *PyObject {","\treturn togo(C.PyFunction_New(topy(code), topy(globals)))","}","","// PyObject* PyFunction_GetCode(PyObject *op)","// Return value: Borrowed reference.","// Return the code object associated with the function object op.","func PyFunction_GetCode(op *PyObject) *PyObject {","\treturn togo(C.PyFunction_GetCode(topy(op)))","}","","// 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 {","\treturn togo(C.PyFunction_GetGlobals(topy(op)))","}","","// PyObject* PyFunction_GetModule(PyObject *op)","// Return value: Borrowed reference.","// Return the __module__ attribute of the function object op. This is normally a string containing the module name, but can be set to any other object by Python code.","func PyFunction_GetModule(op *PyObject) *PyObject {","\treturn togo(C.PyFunction_GetModule(topy(op)))","}","","// PyObject* PyFunction_GetDefaults(PyObject *op)","// Return value: Borrowed reference.","// Return the argument default values of the function object op. This can be a tuple of arguments or NULL.","func PyFunction_GetDefaults(op *PyObject) *PyObject {","\treturn togo(C.PyFunction_GetDefaults(topy(op)))","}","","// int PyFunction_SetDefaults(PyObject *op, PyObject *defaults)","// Set the argument default values for the function object op. defaults must be Py_None or a tuple.","//","// Raises SystemError and returns -1 on failure.","func PyFunction_SetDefaults(op, defaults *PyObject) error {","\treturn int2err(C.PyFunction_SetDefaults(topy(op), topy(defaults)))","}","","// PyObject* PyFunction_GetClosure(PyObject *op)","// Return value: Borrowed reference.","// Return the closure associated with the function object op. This can be NULL or a tuple of cell objects.","func PyFunction_GetClosure(op *PyObject) *PyObject {","\treturn togo(C.PyFunction_GetClosure(topy(op)))","}","","// int PyFunction_SetClosure(PyObject *op, PyObject *closure)","// Set the closure associated with the function object op. closure must be Py_None or a tuple of cell objects.","//","// Raises SystemError and returns -1 on failure.","func PyFunction_SetClosure(op, closure *PyObject) error {","\treturn int2err(C.PyFunction_SetClosure(topy(op), topy(closure)))","}","","///// method /////","","// int PyMethod_Check(PyObject *o)","// Return true if o is a method object (has type PyMethod_Type). The parameter must not be NULL.","func PyMethod_Check(o *PyObject) bool {","\treturn int2bool(C._gopy_PyMethod_Check(topy(o)))","}","","// PyObject* PyMethod_New(PyObject *func, PyObject *self, PyObject *class)","// Return value: New reference.","// Return a new method object, with func being any callable object; this is the function that will be called when the method is called. If this method should be bound to an instance, self should be the instance and class should be the class of self, otherwise self should be NULL and class should be the class which provides the unbound method..","func PyMethod_New(fct, self, class *PyObject) *PyObject {","\treturn togo(C.PyMethod_New(topy(fct), topy(self), topy(class)))","}","","// PyObject* PyMethod_Class(PyObject *meth)","// Return value: Borrowed reference.","// Return the class object from which the method meth was created; if this was created from an instance, it will be the class of the instance.","func PyMethod_Class(meth *PyObject) *PyObject {","\treturn togo(C.PyMethod_Class(topy(meth)))","}","","// PyObject* PyMethod_GET_CLASS(PyObject *meth)","// Return value: Borrowed reference.","// Macro version of PyMethod_Class() which avoids error checking.","func PyMethod_GET_CLASS(meth *PyObject) *PyObject {","\treturn togo(C._gopy_PyMethod_GET_CLASS(topy(meth)))","}","","// PyObject* PyMethod_Function(PyObject *meth)","// Return value: Borrowed reference.","// Return the function object associated with the method meth.","func PyMethod_Function(meth *PyObject) *PyObject {","\treturn togo(C.PyMethod_Function(topy(meth)))","}","","// PyObject* PyMethod_GET_FUNCTION(PyObject *meth)","// Return value: Borrowed reference.","// Macro version of PyMethod_Function() which avoids error checking.","func PyMethod_GET_FUNCTION(meth *PyObject) *PyObject {","\treturn togo(C._gopy_PyMethod_GET_FUNCTION(topy(meth)))","}","","// PyObject* PyMethod_Self(PyObject *meth)","// Return value: Borrowed reference.","// Return the instance associated with the method meth if it is bound, otherwise return NULL.","func PyMethod_Self(meth *PyObject) *PyObject {","\treturn togo(C.PyMethod_Self(topy(meth)))","}","","// PyObject* PyMethod_GET_SELF(PyObject *meth)","// Return value: Borrowed reference.","// Macro version of PyMethod_Self() which avoids error checking.","func PyMethod_GET_SELF(meth *PyObject) *PyObject {","\treturn togo(C._gopy_PyMethod_GET_SELF(topy(meth)))","}","","// int PyMethod_ClearFreeList()","// Clear the free list. Return the total number of freed items.","//","// New in version 2.6.","func PyMethod_ClearFreeList() int {","\treturn int(C.PyMethod_ClearFreeList())","}","","///// slice /////","","type PySliceObject struct {","\tptr *C.PySliceObject","}","","// int PySlice_Check(PyObject *ob)","// Return true if ob is a slice object; ob must not be NULL.","func PySlice_Check(ob *PyObject) bool {","\treturn int2bool(C._gopy_PySlice_Check(topy(ob)))","}","","// PyObject* PySlice_New(PyObject *start, PyObject *stop, PyObject *step)","// Return value: New reference.","// Return a new slice object with the given values. The start, stop, and step parameters are used as the values of the slice object attributes of the same names. Any of the values may be NULL, in which case the None will be used for the corresponding attribute. Return NULL if the new object could not be allocated.","func PySlice_New(start, stop, step *PyObject) *PyObject {","\treturn togo(C.PySlice_New(topy(start), topy(stop), topy(step)))","}","","// int PySlice_GetIndices(PySliceObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step)","// Retrieve the start, stop and step indices from the slice object slice, assuming a sequence of length length. Treats indices greater than length as errors.","//","// Returns 0 on success and -1 on error with no exception set (unless one of the indices was not None and failed to be converted to an integer, in which case -1 is returned with an exception set).","//","// You probably do not want to use this function. If you want to use slice objects in versions of Python prior to 2.3, you would probably do well to incorporate the source of PySlice_GetIndicesEx(), suitably renamed, in the source of your extension.","//","// Changed in version 2.5: This function used an int type for length and an int * type for start, stop, and step. This might require changes in your code for properly supporting 64-bit systems.","func PySlice_GetIndices(slice *PySliceObject, length int) (start, stop, step int, err error) {","\tc_start := C.Py_ssize_t(0)","\tc_stop := C.Py_ssize_t(0)","\tc_step := C.Py_ssize_t(0)","","\terr = int2err(C.PySlice_GetIndices(slice.ptr, C.Py_ssize_t(length),","\t\t\u0026c_start, \u0026c_stop, \u0026c_step))","","\tstart = int(c_start)","\tstop = int(c_stop)","\tstep = int(c_step)","","\treturn","}","","// int PySlice_GetIndicesEx(PySliceObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, Py_ssize_t *slicelength)","// Usable replacement for PySlice_GetIndices(). Retrieve the start, stop, and step indices from the slice object slice assuming a sequence of length length, and store the length of the slice in slicelength. Out of bounds indices are clipped in a manner consistent with the handling of normal slices.","//","// Returns 0 on success and -1 on error with exception set.","//","// New in version 2.3.","//","// Changed in version 2.5: This function used an int type for length and an int * type for start, stop, step, and slicelength. This might require changes in your code for properly supporting 64-bit systems.","func PySlice_GetIndicesEx(slice *PySliceObject, length int) (start, stop, step, slicelength int, err error) {","","\tc_start := C.Py_ssize_t(0)","\tc_stop := C.Py_ssize_t(0)","\tc_step := C.Py_ssize_t(0)","\tc_slice := C.Py_ssize_t(0)","","\terr = int2err(C.PySlice_GetIndicesEx(slice.ptr, C.Py_ssize_t(length),","\t\t\u0026c_start, \u0026c_stop, \u0026c_step, \u0026c_slice))","","\tstart = int(c_start)","\tstop = int(c_stop)","\tstep = int(c_step)","\tslicelength = int(c_slice)","","\treturn","}","","///// capsule /////","type PyCapsule_Destructor func(*PyObject)","","// int PyCapsule_CheckExact(PyObject *p)","// Return true if its argument is a PyCapsule.","func PyCapsule_CheckExact(p *PyObject) bool {","\treturn int2bool(C._gopy_PyCapsule_CheckExact(topy(p)))","}","","// PyObject* PyCapsule_New(void *pointer, const char *name, PyCapsule_Destructor destructor)","// Return value: New reference.","// Create a PyCapsule encapsulating the pointer. The pointer argument may not be NULL.","//","// On failure, set an exception and return NULL.","//","// The name string may either be NULL or a pointer to a valid C string. If non-NULL, this string must outlive the capsule. (Though it is permitted to free it inside the destructor.)","//","// If the destructor argument is not NULL, it will be called with the capsule as its argument when it is destroyed.","//","// If this capsule will be stored as an attribute of a module, the name should be specified as modulename.attributename. This will enable other modules to import the capsule using PyCapsule_Import().","func PyCapsule_New(pointer *C.char, name string, dtor C.PyCapsule_Destructor) *PyObject {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\t//FIXME use a go PyCapsule_Destructor ?","\t//FIXME use an interface{} instead of *C.char ?","\treturn togo(C.PyCapsule_New(unsafe.Pointer(pointer), c_name, dtor))","}","","// void* PyCapsule_GetPointer(PyObject *capsule, const char *name)","// Retrieve the pointer stored in the capsule. On failure, set an exception and return NULL.","//","// The name parameter must compare exactly to the name stored in the capsule. If the name stored in the capsule is NULL, the name passed in must also be NULL. Python uses the C function strcmp() to compare capsule names.","func PyCapsule_GetPointer(capsule *PyObject, name string) *C.char {","","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\t//FIXME use an interface{} instead of *C.char ?","\tptr := C.PyCapsule_GetPointer(topy(capsule), c_name)","\treturn (*C.char)(ptr)","}","","// PyCapsule_Destructor PyCapsule_GetDestructor(PyObject *capsule)","// Return the current destructor stored in the capsule. On failure, set an exception and return NULL.","//","// It is legal for a capsule to have a NULL destructor. This makes a NULL return code somewhat ambiguous; use PyCapsule_IsValid() or PyErr_Occurred() to disambiguate.","func PyCapsule_GetDestructor(capsule *PyObject) C.PyCapsule_Destructor {","\treturn C.PyCapsule_GetDestructor(topy(capsule))","}","","// void* PyCapsule_GetContext(PyObject *capsule)","// Return the current context stored in the capsule. On failure, set an exception and return NULL.","//","// It is legal for a capsule to have a NULL context. This makes a NULL return code somewhat ambiguous; use PyCapsule_IsValid() or PyErr_Occurred() to disambiguate.","func PyCapsule_GetContext(capsule *PyObject) *C.char {","","\t//FIXME use an interface{} instead of *C.char ?","\tptr := C.PyCapsule_GetContext(topy(capsule))","\treturn (*C.char)(ptr)","}","","// const char* PyCapsule_GetName(PyObject *capsule)","// Return the current name stored in the capsule. On failure, set an exception and return NULL.","//","// It is legal for a capsule to have a NULL name. This makes a NULL return code somewhat ambiguous; use PyCapsule_IsValid() or PyErr_Occurred() to disambiguate.","func PyCapsule_GetName(capsule *PyObject) string {","","\tc_name := C.PyCapsule_GetName(topy(capsule))","\treturn C.GoString(c_name)","}","","// void* PyCapsule_Import(const char *name, int no_block)","// Import a pointer to a C object from a capsule attribute in a module. The name parameter should specify the full name to the attribute, as in module.attribute. The name stored in the capsule must match this string exactly. If no_block is true, import the module without blocking (using PyImport_ImportModuleNoBlock()). If no_block is false, import the module conventionally (using PyImport_ImportModule()).","//","// Return the capsule’s internal pointer on success. On failure, set an exception and return NULL. However, if PyCapsule_Import() failed to import the module, and no_block was true, no exception is set.","func PyCapsule_Import(name string, no_block bool) *C.char {","","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\tc_no_block := C.int(0)","\tif no_block {","\t\tc_no_block = C.int(1)","\t}","","\t//FIXME use an interface{} instead of *C.char ?","\tptr := C.PyCapsule_Import(c_name, c_no_block)","\treturn (*C.char)(ptr)","}","","// int PyCapsule_IsValid(PyObject *capsule, const char *name)","// Determines whether or not capsule is a valid capsule. A valid capsule is non-NULL, passes PyCapsule_CheckExact(), has a non-NULL pointer stored in it, and its internal name matches the name parameter. (See PyCapsule_GetPointer() for information on how capsule names are compared.)","//","// In other words, if PyCapsule_IsValid() returns a true value, calls to any of the accessors (any function starting with PyCapsule_Get()) are guaranteed to succeed.","//","// Return a nonzero value if the object is valid and matches the name passed in. Return 0 otherwise. This function will not fail.","func PyCapsule_IsValid(capsule *PyObject, name string) bool {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\treturn int2bool(C.PyCapsule_IsValid(topy(capsule), c_name))","}","","// int PyCapsule_SetContext(PyObject *capsule, void *context)","// Set the context pointer inside capsule to context.","//","// Return 0 on success. Return nonzero and set an exception on failure.","func PyCapsule_SetContext(capsule *PyObject, context *C.char) error {","\t//FIXME use interface{} instead of *C.char ?","\treturn int2err(C.PyCapsule_SetContext(topy(capsule), unsafe.Pointer(context)))","}","","// int PyCapsule_SetDestructor(PyObject *capsule, PyCapsule_Destructor destructor)","// Set the destructor inside capsule to destructor.","//","// Return 0 on success. Return nonzero and set an exception on failure.","func PyCapsule_SetDestructor(capsule *PyObject, dtor C.PyCapsule_Destructor) error {","\t//FIXME use go-PyCapsule_Destructor instead of cgo one ?","\treturn int2err(C.PyCapsule_SetDestructor(topy(capsule), dtor))","}","","// int PyCapsule_SetName(PyObject *capsule, const char *name)","// Set the name inside capsule to name. If non-NULL, the name must outlive the capsule. If the previous name stored in the capsule was not NULL, no attempt is made to free it.","//","// Return 0 on success. Return nonzero and set an exception on failure.","func PyCapsule_SetName(capsule *PyObject, name string) error {","\tc_name := C.CString(name)","\tdefer C.free(unsafe.Pointer(c_name))","","\treturn int2err(C.PyCapsule_SetName(topy(capsule), c_name))","}","","// int PyCapsule_SetPointer(PyObject *capsule, void *pointer)","// Set the void pointer inside capsule to pointer. The pointer may not be NULL.","//","// Return 0 on success. Return nonzero and set an exception on failure.","func PyCapsule_SetPointer(capsule *PyObject, pointer *C.char) error {","\t//FIXME use interface{} instead of *C.char ?","\treturn int2err(C.PyCapsule_SetPointer(topy(capsule), unsafe.Pointer(pointer)))","}","","///// generator /////","","type PyFrameObject struct {","\tptr *C.PyFrameObject","}","","// int PyGen_Check(PyObject *ob)","// Return true if ob is a generator object; ob must not be NULL.","func PyGen_Check(ob *PyObject) bool {","\treturn int2bool(C._gopy_PyGen_Check(topy(ob)))","}","","// int PyGen_CheckExact(ob)","// Return true if ob‘s type is PyGen_Type is a generator object; ob must not be NULL.","func PyGen_CheckExact(ob *PyObject) bool {","\treturn int2bool(C._gopy_PyGen_CheckExact(topy(ob)))","}","","// PyObject* PyGen_New(PyFrameObject *frame)","// Return value: New reference.","// Create and return a new generator object based on the frame object. A reference to frame is stolen by this function. The parameter must not be NULL.","func PyGen_New(frame *PyFrameObject) *PyObject {","\treturn togo(C.PyGen_New((*C.struct__frame)(frame.ptr)))","}","","///// iterator /////","","// int PySeqIter_Check(op)","// Return true if the type of op is PySeqIter_Type.","//","// New in version 2.2.","func PySeqIter_Check(op *PyObject) bool {","\treturn int2bool(C._gopy_PySeqIter_Check(topy(op)))","}","","// PyObject* PyIter_Next(PyObject *o)","// Return value: New reference.","//","// Return the next value from the iteration o. The object must be an iterator (it is up to the caller to check this). If there are no remaining values, returns NULL with no exception set. If an error occurs while retrieving the item, returns NULL and passes along the exception.","func PyIter_Next(op *PyObject) *PyObject {"," return togo(C.PyIter_Next(topy(op)))","}","","// PyObject* PySeqIter_New(PyObject *seq)","// Return value: New reference.","// Return an iterator that works with a general sequence object, seq. The iteration ends when the sequence raises IndexError for the subscripting operation.","//","// New in version 2.2.","//","// PyTypeObject PyCallIter_Type","// Type object for iterator objects returned by PyCallIter_New() and the two-argument form of the iter() built-in function.","//","// New in version 2.2.","func PySeqIter_New(seq *PyObject) *PyObject {","\treturn togo(C.PySeqIter_New(topy(seq)))","}","","// int PyCallIter_Check(op)","// Return true if the type of op is PyCallIter_Type.","//","// New in version 2.2.","func PyCallIter_Check(op *PyObject) bool {","\treturn int2bool(C._gopy_PyCallIter_Check(topy(op)))","}","","// PyObject* PyCallIter_New(PyObject *callable, PyObject *sentinel)","// Return value: New reference.","// Return a new iterator. The first parameter, callable, can be any Python callable object that can be called with no parameters; each call to it should return the next item in the iteration. When callable returns a value equal to sentinel, the iteration will be terminated.","//","// New in version 2.2.","func PyCallIter_New(callable, sentinel *PyObject) *PyObject {","\treturn togo(C.PyCallIter_New(topy(callable), topy(sentinel)))","}","","// PyCodeObject* PyCode_NewEmpty(char *filename, char *funcname, int firstlineno)","// Return value: New reference.","// Return an empty CodePythonObject that corresponds to the file name, func name and line number in the source file it points to.","func PyCode_NewEmpty(filename string, funcname string, firstlineno int) *PyObject {","\tc_filename := C.CString(filename)","\tdefer C.free(unsafe.Pointer(c_filename))","\tc_funcname := C.CString(funcname)","\tdefer C.free(unsafe.Pointer(c_funcname))","","\to := C.PyCode_NewEmpty(c_filename, c_funcname, C.int(firstlineno))","","\t// need to (unsafe-ly) cast to *C.PyObject as o is a *C.PyCodeObject","\treturn togo((*C.PyObject)(unsafe.Pointer(o)))","}","","// EOF"],"stylingDirectives":null,"colorizedLines":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/dco/go-python/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null},"displayName":"otherobjects.go","displayUrl":"https://github.com/dco/go-python/blob/master/otherobjects.go?raw=true","headerInfo":{"blobSize":"24.8 KB","deleteTooltip":"You must be signed in to make or propose changes","editTooltip":"You must be signed in to make or propose changes","ghDesktopPath":"https://desktop.github.com","isGitLfs":false,"onBranch":true,"shortPath":"08ae445","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fdco%2Fgo-python%2Fblob%2Fmaster%2Fotherobjects.go","isCSV":false,"isRichtext":false,"toc":null,"lineInfo":{"truncatedLoc":"583","truncatedSloc":"486"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplate":null,"discussionTemplate":null,"language":"Go","languageID":132,"large":false,"planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/dco/go-python/blob/master/otherobjects.go","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","releasePath":"/dco/go-python/releases/new?marketplace=true","showPublishActionBanner":false},"rawBlobUrl":"https://github.com/dco/go-python/raw/refs/heads/master/otherobjects.go","renderImageOrRaw":false,"richText":null,"renderedFileInfo":null,"shortPath":null,"symbolsEnabled":true,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timed_out":false,"not_analyzed":false,"symbols":[{"name":"PyModule_Check","kind":"function","ident_start":272,"ident_end":286,"extent_start":267,"extent_end":364,"fully_qualified_name":"PyModule_Check","ident_utf16":{"start":{"line_number":15,"utf16_col":5},"end":{"line_number":15,"utf16_col":19}},"extent_utf16":{"start":{"line_number":15,"utf16_col":0},"end":{"line_number":17,"utf16_col":1}}},{"name":"PyModule_CheckExact","kind":"function","ident_start":513,"ident_end":532,"extent_start":508,"extent_end":615,"fully_qualified_name":"PyModule_CheckExact","ident_utf16":{"start":{"line_number":23,"utf16_col":5},"end":{"line_number":23,"utf16_col":24}},"extent_utf16":{"start":{"line_number":23,"utf16_col":0},"end":{"line_number":25,"utf16_col":1}}},{"name":"PyModule_New","kind":"function","ident_start":898,"ident_end":910,"extent_start":893,"extent_end":1040,"fully_qualified_name":"PyModule_New","ident_utf16":{"start":{"line_number":30,"utf16_col":5},"end":{"line_number":30,"utf16_col":17}},"extent_utf16":{"start":{"line_number":30,"utf16_col":0},"end":{"line_number":35,"utf16_col":1}}},{"name":"PyModule_GetDict","kind":"function","ident_start":1435,"ident_end":1451,"extent_start":1430,"extent_end":1526,"fully_qualified_name":"PyModule_GetDict","ident_utf16":{"start":{"line_number":40,"utf16_col":5},"end":{"line_number":40, 8258 "utf16_col":21}},"extent_utf16":{"start":{"line_number":40,"utf16_col":0},"end":{"line_number":42,"utf16_col":1}}},{"name":"PyModule_GetName","kind":"function","ident_start":1720,"ident_end":1736,"extent_start":1715,"extent_end":1860,"fully_qualified_name":"PyModule_GetName","ident_utf16":{"start":{"line_number":46,"utf16_col":5},"end":{"line_number":46,"utf16_col":21}},"extent_utf16":{"start":{"line_number":46,"utf16_col":0},"end":{"line_number":50,"utf16_col":1}}},{"name":"PyModule_GetFilename","kind":"function","ident_start":2097,"ident_end":2117,"extent_start":2092,"extent_end":2245,"fully_qualified_name":"PyModule_GetFilename","ident_utf16":{"start":{"line_number":54,"utf16_col":5},"end":{"line_number":54,"utf16_col":25}},"extent_utf16":{"start":{"line_number":54,"utf16_col":0},"end":{"line_number":58,"utf16_col":1}}},{"name":"PyModule_AddObject","kind":"function","ident_start":2555,"ident_end":2573,"extent_start":2550,"extent_end":2766,"fully_qualified_name":"PyModule_AddObject","ident_utf16":{"start":{"line_number":64,"utf16_col":5},"end":{"line_number":64,"utf16_col":23}},"extent_utf16":{"start":{"line_number":64,"utf16_col":0},"end":{"line_number":69,"utf16_col":1}}},{"name":"PyModule_AddIntConstant","kind":"function","ident_start":3041,"ident_end":3064,"extent_start":3036,"extent_end":3258,"fully_qualified_name":"PyModule_AddIntConstant","ident_utf16":{"start":{"line_number":75,"utf16_col":5},"end":{"line_number":75,"utf16_col":28}},"extent_utf16":{"start":{"line_number":75,"utf16_col":0},"end":{"line_number":80,"utf16_col":1}}},{"name":"PyModule_AddStringConstant","kind":"function","ident_start":3583,"ident_end":3609,"extent_start":3578,"extent_end":3865,"fully_qualified_name":"PyModule_AddStringConstant","ident_utf16":{"start":{"line_number":86,"utf16_col":5},"end":{"line_number":86,"utf16_col":31}},"extent_utf16":{"start":{"line_number":86,"utf16_col":0},"end":{"line_number":94,"utf16_col":1}}},{"name":"PyModule_AddIntMacro","kind":"function","ident_start":4181,"ident_end":4201,"extent_start":4176,"extent_end":4283,"fully_qualified_name":"PyModule_AddIntMacro","ident_utf16":{"start":{"line_number":100,"utf16_col":5},"end":{"line_number":100,"utf16_col":25}},"extent_utf16":{"start":{"line_number":100,"utf16_col":0},"end":{"line_number":103,"utf16_col":1}}},{"name":"PyModule_AddStringMacro","kind":"function","ident_start":4405,"ident_end":4428,"extent_start":4400,"extent_end":4510,"fully_qualified_name":"PyModule_AddStringMacro","ident_utf16":{"start":{"line_number":108,"utf16_col":5},"end":{"line_number":108,"utf16_col":28}},"extent_utf16":{"start":{"line_number":108,"utf16_col":0},"end":{"line_number":111,"utf16_col":1}}},{"name":"PyClass_Check","kind":"function","ident_start":4722,"ident_end":4735,"extent_start":4717,"extent_end":4806,"fully_qualified_name":"PyClass_Check","ident_utf16":{"start":{"line_number":117,"utf16_col":5},"end":{"line_number":117,"utf16_col":18}},"extent_utf16":{"start":{"line_number":117,"utf16_col":0},"end":{"line_number":119,"utf16_col":1}}},{"name":"PyClass_IsSubclass","kind":"function","ident_start":5014,"ident_end":5032,"extent_start":5009,"extent_end":5128,"fully_qualified_name":"PyClass_IsSubclass","ident_utf16":{"start":{"line_number":124,"utf16_col":5},"end":{"line_number":124,"utf16_col":23}},"extent_utf16":{"start":{"line_number":124,"utf16_col":0},"end":{"line_number":126,"utf16_col":1}}},{"name":"PyInstance_Check","kind":"function","ident_start":5234,"ident_end":5250,"extent_start":5229,"extent_end":5328,"fully_qualified_name":"PyInstance_Check","ident_utf16":{"start":{"line_number":132,"utf16_col":5},"end":{"line_number":132,"utf16_col":21}},"extent_utf16":{"start":{"line_number":132,"utf16_col":0},"end":{"line_number":134,"utf16_col":1}}},{"name":"PyInstance_New","kind":"function","ident_start":5594,"ident_end":5608,"extent_start":5589,"extent_end":5713,"fully_qualified_name":"PyInstance_New","ident_utf16":{"start":{"line_number":139,"utf16_col":5},"end":{"line_number":139,"utf16_col":19}},"extent_utf16":{"start":{"line_number":139,"utf16_col":0},"end":{"line_number":141,"utf16_col":1}}},{"name":"PyInstance_NewRaw","kind":"function","ident_start":6048,"ident_end":6065,"extent_start":6043,"extent_end":6161,"fully_qualified_name":"PyInstance_NewRaw","ident_utf16":{"start":{"line_number":146,"utf16_col":5},"end":{"line_number":146,"utf16_col":22}},"extent_utf16":{"start":{"line_number":146,"utf16_col":0},"end":{"line_number":148,"utf16_col":1}}},{"name":"PyFunction_Check","kind":"function","ident_start":6328,"ident_end":6344,"extent_start":6323,"extent_end":6418,"fully_qualified_name":"PyFunction_Check","ident_utf16":{"start":{"line_number":154,"utf16_col":5},"end":{"line_number":154,"utf16_col":21}},"extent_utf16":{"start":{"line_number":154,"utf16_col":0},"end":{"line_number":156,"utf16_col":1}}},{"name":"PyFunction_New","kind":"function","ident_start":6814,"ident_end":6828,"extent_start":6809,"extent_end":6925,"fully_qualified_name":"PyFunction_New","ident_utf16":{"start":{"line_number":163,"utf16_col":5},"end":{"line_number":163,"utf16_col":19}},"extent_utf16":{"start":{"line_number":163,"utf16_col":0},"end":{"line_number":165,"utf16_col":1}}},{"name":"PyFunction_GetCode","kind":"function","ident_start":7081,"ident_end":7099,"extent_start":7076,"extent_end":7172,"fully_qualified_name":"PyFunction_GetCode","ident_utf16":{"start":{"line_number":170,"utf16_col":5},"end":{"line_number":170,"utf16_col":23}},"extent_utf16":{"start":{"line_number":170,"utf16_col":0},"end":{"line_number":172,"utf16_col":1}}},{"name":"PyFunction_GetGlobals","kind":"function","ident_start":7338,"ident_end":7359,"extent_start":7333,"extent_end":7435,"fully_qualified_name":"PyFunction_GetGlobals","ident_utf16":{"start":{"line_number":177,"utf16_col":5},"end":{"line_number":177,"utf16_col":26}},"extent_utf16":{"start":{"line_number":177,"utf16_col":0},"end":{"line_number":179,"utf16_col":1}}},{"name":"PyFunction_GetModule","kind":"function","ident_start":7694,"ident_end":7714,"extent_start":7689,"extent_end":7789,"fully_qualified_name":"PyFunction_GetModule","ident_utf16":{"start":{"line_number":184,"utf16_col":5},"end":{"line_number":184,"utf16_col":25}},"extent_utf16":{"start":{"line_number":184,"utf16_col":0},"end":{"line_number":186,"utf16_col":1}}},{"name":"PyFunction_GetDefaults","kind":"function","ident_start":7990,"ident_end":8012,"extent_start":7985,"extent_end":8089,"fully_qualified_name":"PyFunction_GetDefaults","ident_utf16":{"start":{"line_number":191,"utf16_col":5},"end":{"line_number":191,"utf16_col":27}},"extent_utf16":{"start":{"line_number":191,"utf16_col":0},"end":{"line_number":193,"utf16_col":1}}},{"name":"PyFunction_SetDefaults","kind":"function","ident_start":8312,"ident_end":8334,"extent_start":8307,"extent_end":8436,"fully_qualified_name":"PyFunction_SetDefaults","ident_utf16":{"start":{"line_number":199,"utf16_col":5},"end":{"line_number":199,"utf16_col":27}},"extent_utf16":{"start":{"line_number":199,"utf16_col":0},"end":{"line_number":201,"utf16_col":1}}},{"name":"PyFunction_GetClosure","kind":"function","ident_start":8636,"ident_end":8657,"extent_start":8631,"extent_end":8733,"fully_qualified_name":"PyFunction_GetClosure","ident_utf16":{"start":{"line_number":206,"utf16_col":5},"end":{"line_number":206,"utf16_col":26}},"extent_utf16":{"start":{"line_number":206,"utf16_col":0},"end":{"line_number":208,"utf16_col":1}}},{"name":"PyFunction_SetClosure","kind":"function","ident_start":8965,"ident_end":8986,"extent_start":8960,"extent_end":9085,"fully_qualified_name":"PyFunction_SetClosure","ident_utf16":{"start":{"line_number":214,"utf16_col":5},"end":{"line_number":214,"utf16_col":26}},"extent_utf16":{"start":{"line_number":214,"utf16_col":0},"end":{"line_number":216,"utf16_col":1}}},{"name":"PyMethod_Check","kind":"function","ident_start":9244,"ident_end":9258,"extent_start":9239,"extent_end":9330,"fully_qualified_name":"PyMethod_Check","ident_utf16":{"start":{"line_number":222,"utf16_col":5},"end":{"line_number":222,"utf16_col":19}},"extent_utf16":{"start":{"line_number":222,"utf16_col":0},"end":{"line_number":224,"utf16_col":1}}},{"name":"PyMethod_New","kind":"function","ident_start":9790,"ident_end":9802,"extent_start":9785,"extent_end":9909,"fully_qualified_name":"PyMethod_New","ident_utf16":{"start":{"line_number":229,"utf16_col":5},"end":{"line_number":229,"utf16_col":17}},"extent_utf16":{"start":{"line_number":229,"utf16_col":0},"end":{"line_number":231,"utf16_col":1}}},{"name":"PyMethod_Class","kind":"function","ident_start":10140,"ident_end":10154,"extent_start":10135,"extent_end":10227,"fully_qualified_name":"PyMethod_Class","ident_utf16":{"start":{"line_number":236,"utf16_col":5},"end":{"line_number":236,"utf16_col":19}},"extent_utf16":{"start":{"line_number":236,"utf16_col":0},"end":{"line_number":238,"utf16_col":1}}},{"name":"PyMethod_GET_CLASS","kind":"function","ident_start":10385,"ident_end":10403,"extent_start":10380,"extent_end":10486,"fully_qualified_name":"PyMethod_GET_CLASS","ident_utf16":{"start":{"line_number":243,"utf16_col":5},"end":{"line_number":243,"utf16_col":23}},"extent_utf16":{"start":{"line_number":243,"utf16_col":0},"end":{"line_number":245,"utf16_col":1}}},{"name":"PyMethod_Function","kind":"function","ident_start":10640,"ident_end":10657,"extent_start":10635,"extent_end":10733,"fully_qualified_name":"PyMethod_Function","ident_utf16":{"start":{"line_number":250,"utf16_col":5},"end":{"line_number":250,"utf16_col":22}},"extent_utf16":{"start":{"line_number":250,"utf16_col":0},"end":{"line_number":252,"utf16_col":1}}},{"name":"PyMethod_GET_FUNCTION","kind":"function","ident_start":10897,"ident_end":10918,"extent_start":10892,"extent_end":11004,"fully_qualified_name":"PyMethod_GET_FUNCTION","ident_utf16":{"start":{"line_number":257,"utf16_col":5},"end":{"line_number":257,"utf16_col":26}},"extent_utf16":{"start":{"line_number":257,"utf16_col":0},"end":{"line_number":259,"utf16_col":1}}},{"name":"PyMethod_Self","kind":"function","ident_start":11185,"ident_end":11198,"extent_start":11180,"extent_end":11270,"fully_qualified_name":"PyMethod_Self","ident_utf16":{"start":{"line_number":264,"utf16_col":5},"end":{"line_number":264,"utf16_col":18}},"extent_utf16":{"start":{"line_number":264,"utf16_col":0},"end":{"line_number":266,"utf16_col":1}}},{"name":"PyMethod_GET_SELF","kind":"function","ident_start":11426,"ident_end":11443,"extent_start":11421,"extent_end":11525,"fully_qualified_name":"PyMethod_GET_SELF","ident_utf16":{"start":{"line_number":271,"utf16_col":5},"end":{"line_number":271,"utf16_col":22}},"extent_utf16":{"start":{"line_number":271,"utf16_col":0},"end":{"line_number":273,"utf16_col":1}}},{"name":"PyMethod_ClearFreeList","kind":"function","ident_start":11654,"ident_end":11676,"extent_start":11649,"extent_end":11726,"fully_qualified_name":"PyMethod_ClearFreeList","ident_utf16":{"start":{"line_number":279,"utf16_col":5},"end":{"line_number":279,"utf16_col":27}},"extent_utf16":{"start":{"line_number":279,"utf16_col":0},"end":{"line_number":281,"utf16_col":1}}},{"name":"PySliceObject","kind":"class","ident_start":11752,"ident_end":11765,"extent_start":11747,"extent_end":11798,"fully_qualified_name":"PySliceObject","ident_utf16":{"start":{"line_number":285,"utf16_col":5},"end":{"line_number":285,"utf16_col":18}},"extent_utf16":{"start":{"line_number":285,"utf16_col":0},"end":{"line_number":287,"utf16_col":1}}},{"name":"ptr","kind":"field","ident_start":11776,"ident_end":11779,"extent_start":11776,"extent_end":11796,"fully_qualified_name":"PySliceObject.ptr","ident_utf16":{"start":{"line_number":286,"utf16_col":1},"end":{"line_number":286,"utf16_col":4}},"extent_utf16":{"start":{"line_number":286,"utf16_col":1},"end":{"line_number":286,"utf16_col":21}}},{"name":"PySlice_Check","kind":"function","ident_start":11901,"ident_end":11914,"extent_start":11896,"extent_end":11987,"fully_qualified_name":"PySlice_Check","ident_utf16":{"start":{"line_number":291,"utf16_col":5},"end":{"line_number":291,"utf16_col":18}},"extent_utf16":{"start":{"line_number":291,"utf16_col":0},"end":{"line_number":293,"utf16_col":1}}},{"name":"PySlice_New","kind":"function","ident_start":12416,"ident_end":12427,"extent_start":12411,"extent_end":12535,"fully_qualified_name":"PySlice_New","ident_utf16":{"start":{"line_number":298,"utf16_col":5},"end":{"line_number":298,"utf16_col":16}},"extent_utf16":{"start":{"line_number":298,"utf16_col":0},"end":{"line_number":300,"utf16_col":1}}},{"name":"PySlice_GetIndices","kind":"function","ident_start":13472,"ident_end":13490,"extent_start":13467,"extent_end":13818,"fully_qualified_name":"PySlice_GetIndices","ident_utf16":{"start":{"line_number":310,"utf16_col":5},"end":{"line_number":310,"utf16_col":23}},"extent_utf16":{"start":{"line_number":310,"utf16_col":0},"end":{"line_number":323,"utf16_col":1}}},{"name":"PySlice_GetIndicesEx","kind":"function","ident_start":14573,"ident_end":14593,"extent_start":14568,"extent_end":15003,"fully_qualified_name":"PySlice_GetIndicesEx","ident_utf16":{"start":{"line_number":333,"utf16_col":5},"end":{"line_number":333,"utf16_col":25}},"extent_utf16":{"start":{"line_number":333,"utf16_col":0},"end":{"line_number":349,"utf16_col":1}}},{"name":"PyCapsule_CheckExact","kind":"function","ident_start":15161,"ident_end":15181,"extent_start":15156,"extent_end":15259,"fully_qualified_name":"PyCapsule_CheckExact","ident_utf16":{"start":{"line_number":356,"utf16_col":5},"end":{"line_number":356,"utf16_col":25}},"extent_utf16":{"start":{"line_number":356,"utf16_col":0},"end":{"line_number":358,"utf16_col":1}}},{"name":"PyCapsule_New","kind":"function","ident_start":16037,"ident_end":16050,"extent_start":16032,"extent_end":16348,"fully_qualified_name":"PyCapsule_New","ident_utf16":{"start":{"line_number":371,"utf16_col":5},"end":{"line_number":371,"utf16_col":18}},"extent_utf16":{"start":{"line_number":371,"utf16_col":0},"end":{"line_number":378,"utf16_col":1}}},{"name":"PyCapsule_GetPointer","kind":"function","ident_start":16739,"ident_end":16759,"extent_start":16734,"extent_end":16996,"fully_qualified_name":"PyCapsule_GetPointer","ident_utf16":{"start":{"line_number":384,"utf16_col":5},"end":{"line_number":384,"utf16_col":25}},"extent_utf16":{"start":{"line_number":384,"utf16_col":0},"end":{"line_number":392,"utf16_col":1}}},{"name":"PyCapsule_GetDestructor","kind":"function","ident_start":17342,"ident_end":17365,"extent_start":17337,"extent_end":17460,"fully_qualified_name":"PyCapsule_GetDestructor","ident_utf16":{"start":{"line_number":398,"utf16_col":5},"end":{"line_number":398,"utf16_col":28}},"extent_utf16":{"start":{"line_number":398,"utf16_col":0},"end":{"line_number":400,"utf16_col":1}}},{"name":"PyCapsule_GetContext","kind":"function","ident_start":17782,"ident_end":17802,"extent_start":17777,"extent_end":17952,"fully_qualified_name":"PyCapsule_GetContext","ident_utf16":{"start":{"line_number":406,"utf16_col":5},"end":{"line_number":406,"utf16_col":25}},"extent_utf16":{"start":{"line_number":406,"utf16_col":0},"end":{"line_number":411,"utf16_col":1}}},{"name":"PyCapsule_GetName","kind":"function","ident_start":18271,"ident_end":18288,"extent_start":18266,"extent_end":18392,"fully_qualified_name":"PyCapsule_GetName","ident_utf16":{"start":{"line_number":417,"utf16_col":5},"end":{"line_number":417,"utf16_col":22}},"extent_utf16":{"start":{"line_number":417,"utf16_col":0},"end":{"line_number":421,"utf16_col":1}}},{"name":"PyCapsule_Import","kind":"function","ident_start":19074,"ident_end":19090,"extent_start":19069,"extent_end":19383,"fully_qualified_name":"PyCapsule_Import","ident_utf16":{"start":{"line_number":427,"utf16_col":5},"end":{"line_number":427,"utf16_col":21}},"extent_utf16":{"start":{"line_number":427,"utf16_col":0},"end":{"line_number":440,"utf16_col":1}}},{"name":"PyCapsule_IsValid","kind":"function","ident_start":20038,"ident_end":20055,"extent_start":20033,"extent_end":20223,"fully_qualified_name":"PyCapsule_IsValid","ident_utf16":{"start":{"line_number":448,"utf16_col":5},"end":{"line_number":448,"utf16_col":22}},"extent_utf16":{"start":{"line_number":448,"utf16_col":0},"end":{"line_number":453,"utf16_col":1}}},{"name":"PyCapsule_SetContext","kind":"function","ident_start":20421,"ident_end":20441,"extent_start":20416,"extent_end":20613,"fully_qualified_name":"PyCapsule_SetContext","ident_utf16":{"start":{"line_number":459,"utf16_col":5},"end":{"line_number":459,"utf16_col":25}},"extent_utf16":{"start":{"line_number":459,"utf16_col":0},"end":{"line_number":462,"utf16_col":1}}},{"name":"PyCapsule_SetDestructor","kind":"function","ident_start":20830,"ident_end":20853,"extent_start":20825,"extent_end":21033,"fully_qualified_name":"PyCapsule_SetDestructor","ident_utf16":{"start":{"line_number":468,"utf16_col":5},"end":{"line_number":468,"utf16_col":28}},"extent_utf16":{"start":{"line_number":468,"utf16_col":0},"end":{"line_number":471,"utf16_col":1}}},{"name":"PyCapsule_SetName","kind":"function","ident_start":21353,"ident_end":21370,"extent_start":21348,"extent_end":21538,"fully_qualified_name":"PyCapsule_SetName","ident_utf16":{"start":{"line_number":477,"utf16_col":5},"end":{"line_number":477,"utf16_col":22}},"extent_utf16":{"start":{"line_number":477,"utf16_col":0},"end":{"line_number":482,"utf16_col":1}}},{"name":"PyCapsule_SetPointer","kind":"function","ident_start":21762,"ident_end":21782,"extent_start":21757,"extent_end":21954,"fully_qualified_name":"PyCapsule_SetPointer","ident_utf16":{"start":{"line_number":488,"utf16_col":5},"end":{"line_number":488,"utf16_col":25}},"extent_utf16":{"start":{"line_number":488,"utf16_col":0},"end":{"line_number":491,"utf16_col":1}}},{"name":"PyFrameObject","kind":"class","ident_start":21984,"ident_end":21997,"extent_start":21979,"extent_end":22030,"fully_qualified_name":"PyFrameObject","ident_utf16":{"start":{"line_number":495,"utf16_col":5},"end":{"line_number":495,"utf16_col":18}},"extent_utf16":{"start":{"line_number":495,"utf16_col":0},"end":{"line_number":497,"utf16_col":1}}},{"name":"ptr","kind":"field","ident_start":22008,"ident_end":22011,"extent_start":22008,"extent_end":22028,"fully_qualified_name":"PyFrameObject.ptr","ident_utf16":{"start":{"line_number":496,"utf16_col":1},"end":{"line_number":496,"utf16_col":4}},"extent_utf16":{"start":{"line_number":496,"utf16_col":1},"end":{"line_number":496,"utf16_col":21}}},{"name":"PyGen_Check","kind":"function","ident_start":22135,"ident_end":22146,"extent_start":22130,"extent_end":22217,"fully_qualified_name":"PyGen_Check","ident_utf16":{"start":{"line_number":501,"utf16_col":5},"end":{"line_number":501,"utf16_col":16}},"extent_utf16":{"start":{"line_number":501,"utf16_col":0},"end":{"line_number":503,"utf16_col":1}}},{"name":"PyGen_CheckExact","kind":"function","ident_start":22340,"ident_end":22356,"extent_start":22335,"extent_end":22432,"fully_qualified_name":"PyGen_CheckExact","ident_utf16":{"start":{"line_number":507,"utf16_col":5},"end":{"line_number":507,"utf16_col":21}},"extent_utf16":{"start":{"line_number":507,"utf16_col":0},"end":{"line_number":509,"utf16_col":1}}},{"name":"PyGen_New","kind":"function","ident_start":22668,"ident_end":22677,"extent_start":22663,"extent_end":22770,"fully_qualified_name":"PyGen_New","ident_utf16":{"start":{"line_number":514,"utf16_col":5},"end":{"line_number":514,"utf16_col":14}},"extent_utf16":{"start":{"line_number":514,"utf16_col":0},"end":{"line_number":516,"utf16_col":1}}},{"name":"PySeqIter_Check","kind":"function","ident_start":22904,"ident_end":22919,"extent_start":22899,"extent_end":22994,"fully_qualified_name":"PySeqIter_Check","ident_utf16":{"start":{"line_number":524,"utf16_col":5},"end":{"line_number":524,"utf16_col":20}},"extent_utf16":{"start":{"line_number":524,"utf16_col":0},"end":{"line_number":526,"utf16_col":1}}},{"name":"PyIter_Next","kind":"function","ident_start":23356,"ident_end":23367,"extent_start":23351,"extent_end":23434,"fully_qualified_name":"PyIter_Next","ident_utf16":{"start":{"line_number":532,"utf16_col":5},"end":{"line_number":532,"utf16_col":16}},"extent_utf16":{"start":{"line_number":532,"utf16_col":0},"end":{"line_number":534,"utf16_col":1}}},{"name":"PySeqIter_New","kind":"function","ident_start":23883,"ident_end":23896,"extent_start":23878,"extent_end":23966,"fully_qualified_name":"PySeqIter_New","ident_utf16":{"start":{"line_number":546,"utf16_col":5},"end":{"line_number":546,"utf16_col":18}},"extent_utf16":{"start":{"line_number":546,"utf16_col":0},"end":{"line_number":548,"utf16_col":1}}},{"name":"PyCallIter_Check","kind":"function","ident_start":24080,"ident_end":24096,"extent_start":24075,"extent_end":24172,"fully_qualified_name":"PyCallIter_Check","ident_utf16":{"start":{"line_number":554,"utf16_col":5},"end":{"line_number":554,"utf16_col":21}},"extent_utf16":{"start":{"line_number":554,"utf16_col":0},"end":{"line_number":556,"utf16_col":1}}},{"name":"PyCallIter_New","kind":"function","ident_start":24580,"ident_end":24594,"extent_start":24575,"extent_end":24701,"fully_qualified_name":"PyCallIter_New","ident_utf16":{"start":{"line_number":563,"utf16_col":5},"end":{"line_number":563,"utf16_col":19}},"extent_utf16":{"start":{"line_number":563,"utf16_col":0},"end":{"line_number":565,"utf16_col":1}}},{"name":"PyCode_NewEmpty","kind":"function","ident_start":24952,"ident_end":24967,"extent_start":24947,"extent_end":25373,"fully_qualified_name":"PyCode_NewEmpty","ident_utf16":{"start":{"line_number":570,"utf16_col":5},"end":{"line_number":570,"utf16_col":20}},"extent_utf16":{"start":{"line_number":570,"utf16_col":0},"end":{"line_number":580,"utf16_col":1}}}]}},"copilotInfo":null,"copilotAccessAllowed":false,"modelsAccessAllowed":false,"modelsRepoIntegrationEnabled":false,"csrf_tokens":{"/dco/go-python/branches":{"post":"Y728Mw8uouXfS7yJBGd_0qqCe5PaxYQmkwv1zLygMnxa4ktdbN1YCj4gbH5Nu3lKOPcE0WucJWYlucN4GMa5lg"},"/repos/preferences":{"post":"tA_XSY07EgzVQodnL1SSFEeKmkbuyd67rflUchG1bzOF5CgmJuIpOQTo7JTIJFl82Y89cGCwGHXsQCOiMBQuNA"}}},"title":"go-python/otherobjects.go at master · dco/go-python","appPayload":{"helpUrl":"https://docs.github.com","findFileWorkerPath":"/assets-cdn/worker/find-file-worker-7d7eb7c71814.js","findInFileWorkerPath":"/assets-cdn/worker/find-in-file-worker-1ae9fa256942.js","githubDevUrl":null,"enabled_features":{"code_nav_ui_events":false,"react_blob_overlay":false,"accessible_code_button":true,"github_models_repo_integration":false}}}
0