fix(py): Change uintptr to int in container types

This commit is contained in:
AN Long
2024-08-12 21:56:57 +08:00
parent 321766fd46
commit 7237f549a6
3 changed files with 11 additions and 11 deletions

View File

@@ -25,18 +25,18 @@ import (
// Return a new tuple object of size len, or nil on failure.
//
//go:linkname NewTuple C.PyTuple_New
func NewTuple(len uintptr) *Object
func NewTuple(len int) *Object
// Take a pointer to a tuple object, and return the size of that tuple.
//
// llgo:link (*Object).TupleLen C.PyTuple_Size
func (t *Object) TupleLen() uintptr { return 0 }
func (t *Object) TupleLen() int { return 0 }
// Return the object at position pos in the tuple pointed to t. If pos is
// negative or out of bounds, return nil and set an IndexError exception.
//
// llgo:link (*Object).TupleItem C.PyTuple_GetItem
func (t *Object) TupleItem(index uintptr) *Object { return nil }
func (t *Object) TupleItem(index int) *Object { return nil }
// Insert a reference to object o at position pos of the tuple pointed to by t.
// Return 0 on success. If pos is out of bounds, return -1 and set an