[SciPy-dev] Weave: ext_module headers problems

Prabhu Ramachandran prabhu_r at users.sf.net
Tue Oct 12 08:35:27 CDT 2004


Hi,

This question is mostly for Eric.  In ext_tools.ext_module this is the
definition of build_information:

    def build_information(self):
        info = [self.customize] + self._build_information + \
               self.arg_specs().build_information()
        # ...

This means that any headers added via

  ext_module.customize.add_header('foo') 

are added *before* Python.h and this triggers warnings when the
functions are compiled.  This is also what is invoked for all
weave.inline calls (see inline_tools.py line 433).

To get around this I've changed the definition to:

    def build_information(self):
        info = self._build_information + [self.customize] +\
               self.arg_specs().build_information()
        # ...

This fixes the warnings and puts the user headers last.  I am not sure
there is any specific reason that you put self.customize first.  I
just thought I'd check with you before checking the change into CVS.

Thanks.

cheers,
prabhu




More information about the Scipy-dev mailing list