[Python-3000] C API for ints and strings (original) (raw)
Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sat Sep 8 19:00:39 CEST 2007
- Previous message: [Python-3000] python3.0-config uses python2 syntax
- Next message: [Python-3000] C API for ints and strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I see that PyInt_* functions are aliases for PyLong_*. Which ones should I use for the long term? There are no PyInt equivalents of PyLong_FromLongLong nor PyLong_AsLongLong.
Should I continue to use PyUnicode_* functions for the new str?
What is the status of the str8 type? Is it kept temporarily until the modules are updated to Python3 str, or it is an official immutable bytes type? Its repr uses s'...' syntax which is not supported by the parser.
Why is _PyLong_FitsInLong private? In order to convert a Python3 int to another numeric representation, I would like to check if it fits in a C long, and convert via a string only if it does not. Should I use PyLong_AsLong + PyErr_Occurred?
-- _("< Marcin Kowalczyk _/ qrczak at knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/
- Previous message: [Python-3000] python3.0-config uses python2 syntax
- Next message: [Python-3000] C API for ints and strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]