cbysnoopy / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
0 stars 0 forks source link

Fix pmImgCreator so two classes can have same method name #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
In one .py file, define two distinct classes.  In each class define a method 
having the same name, such as __init__.

What is the expected output? What do you see instead?
The C compiler complains that the augmented C function names are identical: 
nat_plat___init__.

Original issue reported on code.google.com by dwhall...@gmail.com on 2 May 2009 at 7:10

GoogleCodeExporter commented 9 years ago
Added a counting variable to pmImgCreator so each native function gets its own 
unique 
number.  Tested on mbed's plat.py (under construction), works.  

Created system test t232.  Before the fix, the error is:
t232_nat.c:47: error: redefinition of ‘nat_t232___init__’
t232_nat.c:38: error: previous definition of ‘nat_t232___init__’ was here
After the fix, there are no errors.  Test passes.

Mainlined directly see r358

Original comment by dwhall...@gmail.com on 2 May 2009 at 8:09

GoogleCodeExporter commented 9 years ago
Changing Milestone-r10 to Milestone-r09

Original comment by dwhall...@gmail.com on 7 Mar 2010 at 6:26

GoogleCodeExporter commented 9 years ago
Changed r09 to R09

Original comment by dwhall...@gmail.com on 12 Mar 2010 at 8:22

GoogleCodeExporter commented 9 years ago

Original comment by dwhall...@gmail.com on 13 Mar 2010 at 1:30