A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2006-March/062717.html below:

[Python-Dev] Documenting the ssize_t Python C API changes

[Python-Dev] Documenting the ssize_t Python C API changes [Python-Dev] Documenting the ssize_t Python C API changes"Martin v. Löwis" martin at v.loewis.de
Tue Mar 21 16:11:35 CET 2006
Fredrik Lundh wrote:
> I've posted a simple-minded source scanner here:
> 
> http://svn.effbot.python-hosting.com/stuff/sandbox/python/ssizecheck.py

Great job! I've added a link to that to the PEP.

There are two improvements you could make:
- Some of the functions in the first list return Py_ssize_t; calling
   them can cause truncation if the result value is larger than INT_MAX
   (and it is assigned to an int). To find those functions, do
   grep 'PyAPI_FUNC(Py_ssize_t)' Include/*.h
- Usage of the "old" function pointer type name (e.g. intobjargproc)
   likely also indicates an error, since many of these pointers have
   changed there types. I believe the only exception for this is inquiry,
   which still has legit uses, in nb_nonzero, tp_clear, and tp_is_gc.

Regards,
Martin

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4