Differences between revisions 3 and 4
Revision 3 as of 2006-04-13 04:29:12
Size: 1483
Editor: NealNorwitz
Comment:
Revision 4 as of 2006-04-13 07:01:41
Size: 1932
Editor: NealNorwitz
Comment:
Deletions are marked like this. Additions are marked like this.
Line 20: Line 20:

== Verify all int/long C APIs are correct ==

With the conversion to use Py_ssize_t, it's important that we didn't miss any APIs. There are very few APIs which take (or return) a long. But there are still quite a few that take/return an int. All of these are believe to be correct, but more reviewers could help. Any API which returns an int is fine if the value is known to fit in 32 bits (like APIs that return a value between -2 and 2).

These are straightforward, finite-effort coding projects.

Use Py_VISIT

The Py_VISIT() macro in objimpl.h was introduced to make coding of most tp_traverse slots straightforward, uniform, and obviously correct. For example, see cycle_traverse() in itertoolsmodule.c. Most older modules that define tp_traverse copy/paste/edit the tedious callback dance by hand, and several even define their own work-alike macros. These should be rewritten to use the standard Py_VISIT macro.

Cleanup compiler warnings with icc

There are many 64-bit warnings produced by icc when using the -Wp64 flag. icc is freely available for a one month trial license. NealNorwitz has a license and can make the warnings available on the web if anyone is interest in getting rid of these warnings.

Make modules Py_ssize_t clean

Some modules don't use Py_ssize_t. They need a code review. Any module which declares an int (rather than a Py_ssize_t) for size and passes its address to PyArgs_ParseTuple(args, "s#", &str, &size) needs to be updated. An example of a module that has already been updated is Modules/_codecsmodule.c

Check for consistent memory API usage

http://mail.python.org/pipermail/python-dev/2006-March/062848.html

Verify that if PyMem_* APIs are used to (re)allocate memory, that PyMem_* APIs are used to free memory. Same deal with PyObject_* APIs. (ie, ensure that PyMem_* and PyObject_* memory APIs aren't mixed.)

Verify all int/long C APIs are correct

With the conversion to use Py_ssize_t, it's important that we didn't miss any APIs. There are very few APIs which take (or return) a long. But there are still quite a few that take/return an int. All of these are believe to be correct, but more reviewers could help. Any API which returns an int is fine if the value is known to fit in 32 bits (like APIs that return a value between -2 and 2).

SimpleTodo (last edited 2012-02-24 07:34:02 by ÉricAraujo)

Unable to edit the page? See the FrontPage for instructions.