[Python-Dev] Removing tp_compare?

"Martin v. Löwis" martin at v.loewis.de
Sun Feb 1 00:22:13 CET 2009


> _ssl.c does indeed use int or long in various places.  I'm not sure how
> far it can go with Py_ssize_t -- is OpenSSL 64-bit clean?

That's irrelevant for the issue at hand (PY_SSIZE_T_CLEAN). What matters
is that s# etc converters output Py_ssize_t (unless in deprecated
compatibility mode); if you think you then need to truncate to 32 bits,
there should be explicit code that tests for truncation and raises a
Python exception if appropriate.

Regards,
Martin


More information about the Python-Dev mailing list