Wrap C function which takes variable lengthed parameters?

Michael Hudson mwh at python.net
Fri Dec 14 05:36:51 EST 2001


"{-- Rot13 - Hateme" <ungrzr2 at ubatxbat.pbz> writes:

> oh, I think I can change the C source to take single va_list
> arguement instead of a list of variable length arguements.

This is a good step :)

> But still I have no idea how to construct a list of arguements
> passed in from python. There are no standard function calls to
> create a va_list by handle.

I'm not quite sure what you are asking (probably my fault), but you
might want to look at the implementation of, say, Py_BuildValue and
Py_VaBuildValue in the Python source (they're in Python/modsupport.c,
I think ... yup).

HTH,
M.

-- 
 "An infinite number of monkeys at an infinite number of keyboards
  could produce something like Usenet."
 "They could do a better job of it."
              -- the corollaries to Gene Spafford's Axiom #2 of Usenet



More information about the Python-list mailing list