Open sbinet opened 9 years ago
The CPython API is using varargs a lot.
CPython
e.g.: https://docs.python.org/2/c-api/arg.html
int PyArg_ParseTuple(PyObject *args, const char *format, ...); int PyArg_ParseTupleAndKeywords(PyObject *args, PyObject *kw, const char *format, char *keywords[], ...);
consider using FFI (or github.com/gonuts/ffi) to marshal back and forth between C-varargs and Go-varargs-interface{} like is done in gopy: https://github.com/qur/gopy/blob/master/lib/utils.c#L25 https://github.com/qur/gopy/blob/master/lib/arg.go#L89
FFI
github.com/gonuts/ffi
interface{}
The
CPython
API is using varargs a lot.e.g.: https://docs.python.org/2/c-api/arg.html
consider using
FFI
(orgithub.com/gonuts/ffi
) to marshal back and forth between C-varargs and Go-varargs-interface{}
like is done in gopy: https://github.com/qur/gopy/blob/master/lib/utils.c#L25 https://github.com/qur/gopy/blob/master/lib/arg.go#L89