Skip to content

Commit

Permalink
py: change go style funcs w/ varargs to c style to avoid goplus#821
Browse files Browse the repository at this point in the history
  • Loading branch information
cpunion committed Oct 10, 2024
1 parent 12b0efe commit a832d4a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions py/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ func (o *Object) CallObject(args *Object) *Object { return nil }
//
// This is the equivalent of the Python expression: o(*args).
//
// Note that if you only pass PyObject* args, (*Object).CallFunctionObjArgs is a
// Note that if you only pass PyObject* args, CallFunctionObjArgs is a
// faster alternative.
//
// llgo:link (*Object).CallFunction C.PyObject_CallFunction
func (o *Object) CallFunction(format *c.Char, __llgo_va_list ...any) *Object { return nil }
// llgo:link CallFunction C.PyObject_CallFunction
func CallFunction(o *Object, format *c.Char, __llgo_va_list ...any) *Object { return nil }

// Call a callable Python object o, with a variable number of PyObject* arguments.
// The arguments are provided as a variable number of parameters followed by nil.
Expand All @@ -96,16 +96,16 @@ func (o *Object) CallFunction(format *c.Char, __llgo_va_list ...any) *Object { r
//
// This is the equivalent of the Python expression: o(arg1, arg2, ...).
//
// llgo:link (*Object).CallFunctionObjArgs C.PyObject_CallFunctionObjArgs
func (o *Object) CallFunctionObjArgs(__llgo_va_list ...any) *Object { return nil }
// llgo:link CallFunctionObjArgs C.PyObject_CallFunctionObjArgs
func CallFunctionObjArgs(o *Object, __llgo_va_list ...any) *Object { return nil }

// llgo:link (*Object).CallMethod C.PyObject_CallMethod
func (o *Object) CallMethod(name *c.Char, format *c.Char, __llgo_va_list ...any) *Object {
// llgo:link CallMethod C.PyObject_CallMethod
func CallMethod(o *Object, name *c.Char, format *c.Char, __llgo_va_list ...any) *Object {
return nil
}

// llgo:link (*Object).CallMethodObjArgs C.PyObject_CallMethodObjArgs
func (o *Object) CallMethodObjArgs(name *Object, __llgo_va_list ...any) *Object { return nil }
// llgo:link CallMethodObjArgs C.PyObject_CallMethodObjArgs
func CallMethodObjArgs(o *Object, name *Object, __llgo_va_list ...any) *Object { return nil }

// llgo:link (*Object).Vectorcall C.PyObject_Vectorcall
func (o *Object) Vectorcall(args **Object, nargs uintptr, kwnames *Object) *Object {
Expand Down
4 changes: 2 additions & 2 deletions py/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func Import(name *Object) *Object
// llgo:link (*Object).ModuleGetDict C.PyModule_GetDict
func (m *Object) ModuleGetDict() *Object { return nil }

// llgo:link (*Object).ModuleLoadSyms C.llgoLoadPyModSyms
func (m *Object) ModuleLoadSyms(__llgo_va_list ...any) {}
// llgo:link ModuleLoadSyms C.llgoLoadPyModSyms
func ModuleLoadSyms(o *Object, __llgo_va_list ...any) {}

// -----------------------------------------------------------------------------

0 comments on commit a832d4a

Please sign in to comment.