[Scipy-tickets] [SciPy] #1143: scipy.weave.inline ignores changed support code

SciPy Trac scipy-tickets@scipy....
Mon Mar 29 13:36:26 CDT 2010


#1143: scipy.weave.inline ignores changed support code
-------------------------+--------------------------------------------------
 Reporter:  jzikovsky    |       Owner:  somebody
     Type:  defect       |      Status:  new     
 Priority:  normal       |   Milestone:  0.8.0   
Component:  scipy.weave  |     Version:  0.7.0   
 Keywords:               |  
-------------------------+--------------------------------------------------
 I am running python 2.6.4. OS: Ubuntu. I installed the Enthought Python
 Distribution just a month or 2 ago, so it should be pretty recent. Here is
 a snippet that reliably works incorrectly on my machine:

 {{{
 from scipy import weave

 support = """
 int support_function(int value)
 {
     printf("This is function A! You gave %d\\n", value);
     return value*2;
 }
 """
 code = """
 support_function(10);
 """
 ret = weave.inline(code, [], compiler='gcc', support_code=support)

 support = """
 int support_function(int value)
 {
     printf("This is function B which is completely different! You gave
 %d\\n", value);
     return value*1000;
 }
 """
 #code is unchanged, support has changed though.
 #But the result is the same from this execution as the one before!
 ret = weave.inline(code, [], compiler='gcc', support_code=support)

 }}}


 output is the following:

 {{{
 This is function A! You gave 10
 This is function A! You gave 10
 }}}

 but it should be:

 {{{
 This is function A! You gave 10
 This is function B which is completely different! You gave 10
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1143>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list