Thanks for the reply, This is the approach I have taken. Convert to a
c numeric and take it from there.
Is there movment to add functions like PyInt_AsString ? I noticed it
mentioned in response to a PEP...
thanks,
~jason
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> I'm looking at the C API and wanting to know a good way to convert
> Python numeric types to native c types. For strings I've been using
> PyString_AsString(v) and thats great, but I would like to do the same
> for ints and floats.
double d = PyFloat_AsDouble(v);
Hi,
I'm looking at the C API and wanting to know a good way to convert
Python numeric types to native c types. For strings I've been using
PyString_AsString(v) and thats great, but I would like to do the same
for ints and floats. I have found PyFloat_AsString in the source but
it seems to be un