Wrap C function which takes variable lengthed parameters?

{-- Rot13 - Hateme ungrzr2 at ubatxbat.pbz
Sat Dec 15 04:40:59 EST 2001


Courageous <jkraska at san.rr.com> wrote in 
news:skil1usi80143j6khl2ba6c08pm9tv8i40 at 4ax.com:

> 
>>And I really hope python will provide some way to ease
>>the wrapping on varargs functions some day. But it is 
>>hard.
> 
> It's a C problem, not a Python problem. Since Python itself
> is coded in C, there will never be any easy, portable solution
> to what you describe. Obviously this could be handled by
> writing machine-specific inline assembly, however I'm not
> convinced the value gained is worth the downside.
> 

This is a C problem but this is also a Python problem.
There are no need to wrap a C function for C program.
But if you want to use a C function in Python program, you
have to wrap the C function. If the function cannot be
wrapped, the python program cannot use the C function.

In some situation, if a programmer cannot wrap some C functions
for Python, he will be forced to give up using Python
in his project.

It is a problem caused by limitation of C language, though.



More information about the Python-list mailing list