Opposite of PyLong_FromString
Kalle Svensson
kalle at gnupung.net
Sat Mar 3 16:55:45 EST 2001
Sez Marcin 'Qrczak' Kowalczyk:
> What is the best way to convert a Python's Long to a C string
> (matching "-?[0-9]+")?
Perhaps something like
char *s = PyString_AsString(longobj->ob_type->tp_str(longobj));
or maybe use PyString_Format ?
I don't know what's idiomatically correct, though.
Peace,
Kalle
--
Email: kalle at gnupung.net | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20010303/3708fe17/attachment.sig>
More information about the Python-list
mailing list