Re: [Python-Dev] GCC patch for catching errors in PyArg_ParseTuple

2006-09-22 Thread Martin v. Löwis
Giovanni Bajo schrieb: > A way not to maintain this patch forever would be to devise a way to make > format syntax "pluggable" / "scriptable". There have been previous discussions > on the GCC mailing lists. Perhaps. I very much doubt that this can or will be done, in a way that would support PyAr

Re: [Python-Dev] GCC patch for catching errors in PyArg_ParseTuple

2006-09-22 Thread Giovanni Bajo
Martin v. Löwis wrote: >> I'll post more about this patch in the near future, and commit >> some bug fixes I found with it, but here is the patch, in >> a publish-early fashion. >> >> There is little chance that this can go into GCC (as it is too >> specific), so it likely needs to be maintained s

[Python-Dev] GCC patch for catching errors in PyArg_ParseTuple

2006-09-22 Thread Martin v. Löwis
I wrote a patch for the GCC trunk to add an __attribute__((format(PyArg_ParseTuple, 2, 3))) declaration to functions (this specific declaration should go to PyArg_ParseTuple only). With that patch, parameter types are compared with the string parameter (if that's a literal), and errors are reporte