[Pyrex] Unused variables
Elias Pschernig
elias at users.sourceforge.net
Fri Dec 2 15:31:02 CET 2005
On Thu, 2005-12-01 at 18:36 -0500, David M. Cooke wrote:
>
> see my patches at
> http://lists.copyleft.no/pipermail/pyrex/2005-October/001452.html
> and its followup,
> http://lists.copyleft.no/pipermail/pyrex/2005-October/001453.html
>
Thanks, I applied the patches here, so now only have the static forward
declaration warnings.
> The labels were relatively easy, as they're all forward jumps. One has
> to be emitted only if the corresponding goto has already been emitted.
>
> These patches don't handle the "routine declared static but not used",
> though. For that, I think the code generation should be done in such a
> way that you can go back and declare needed routines. Simply using a
> few cStringIOs instead of a real file, split by section, could do
> this. Then, you'd keep track of which utitlity functions are used, and
> at the end you could output them, and their declarations, at the right
> places in the file.
Is anyone working on that?
> For the mtrand module in scipy, which is written using Pyrex, I've
> whipped up this script to remove unused utility functions. With the
> above patches, and the below postprocessing, we have one warning (an
> unused variable in a tp_free slot, I think), which I've just ignored
> for now. This also fixes up a miscast Pyrex was doing that we were
> having trouble with.
>
How would I add that to my distutils script?
--
Elias Pschernig
More information about the Pyrex
mailing list