deadmenace / shedskin

Automatically exported from code.google.com/p/shedskin
0 stars 0 forks source link

Simple class produces namspace errors. #207

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Shedskin the example code with -e option.
2. Run make.

What is the expected output? What do you see instead?

Errors are:

error: declaration of
      '__ss_layer_LayerObjectType' with C language linkage conflicts with
      declaration in global scope
PyTypeObject __ss_layer_LayerObjectType = {
             ^
./layer.hpp:50:21: note: declared in global scope here
extern PyTypeObject __ss_layer_LayerObjectType;
                    ^

What version of the product are you using? On what operating system?

SHED SKIN Python-to-C++ Compiler 0.9.4 on OSX 10.10.1

Please provide any additional information below.

class Layer():
    def __init__(self, dimensions, scale):
        pass

class Layers():
    def __init__(self, dimensions, scale):
        pass

if __name__ == '__main__':
    a = Layer((100, 100, 3), 0.5)
    b = Layers((100, 100, 3), 0.5)

Original issue reported on code.google.com by chris.hi...@gmail.com on 16 Dec 2014 at 1:02