Code Monkey home page Code Monkey logo

gopy's People

Contributors

adzenith avatar erbridge avatar hexid avatar l1n3n01z avatar quarnster avatar qur avatar ricochet1k avatar zoli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gopy's Issues

Panic on ImportError results in "panic during panic"

_, err := py.Import("module_that_doesnt_exist")
if err != nil {
    fmt.Println(err)
    panic(err)
}

Results in:

builtins.ImportError: No module named 'module_that_doesnt_exist'
panic: panic during panic

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/12081029-panic-on-importerror-results-in-panic-during-panic?utm_campaign=plugin&utm_content=tracker%2F510780&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F510780&utm_medium=issues&utm_source=github).

how to import packages installed in venv

How does one import packages? I installed python3.7 from source in

/base/gp/install

I created an environment for my packages with python -m venv env3

then pip3 installed pandas etc into

/base/gp/install/env3

Now I would like to refer to these packages from the python that is embedded using gopy. How do I tell python where to find them?

    what, err := RunString("import pandas", FileInput, main, nil)
    // err == "builtins.ModuleNotFoundError: No module named 'pandas'"

inconsistent definitions

Whenever I try building lime editor with the qml support. I get these errors when I run go build

inconsistent definitions for C.PyLong_AsLong
inconsistent definitions for C.PyLong_FromLong

And this one when I try compiling with termbox support
inconsistent definitions for C.PyList_Append

screenshot from 2014-07-25 03 25 42

any ideas on whats going on?

build failed

# github.com/limetext/gopy/lib
In file included from /usr/include/python3.5m/pytime.h:6:0,
                 from /usr/include/python3.5m/Python.h:65,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/object.h:864:22: error: conflicting types for ‘_Py_NoneStruct’
 PyAPI_DATA(PyObject) _Py_NoneStruct; /* Don't use this directly */
                      ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:198:13: note: previous declaration of ‘_Py_NoneStruct’ was here
 extern char _Py_NoneStruct[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:148:24: error: conflicting types for ‘PyExc_BaseException’
 PyAPI_DATA(PyObject *) PyExc_BaseException;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:15:13: note: previous declaration of ‘PyExc_BaseException’ was here
 extern char PyExc_BaseException[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:149:24: error: conflicting types for ‘PyExc_Exception’
 PyAPI_DATA(PyObject *) PyExc_Exception;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:54:13: note: previous declaration of ‘PyExc_Exception’ was here
 extern char PyExc_Exception[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:151:24: error: conflicting types for ‘PyExc_StopIteration’
 PyAPI_DATA(PyObject *) PyExc_StopIteration;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:144:13: note: previous declaration of ‘PyExc_StopIteration’ was here
 extern char PyExc_StopIteration[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:152:24: error: conflicting types for ‘PyExc_GeneratorExit’
 PyAPI_DATA(PyObject *) PyExc_GeneratorExit;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:69:13: note: previous declaration of ‘PyExc_GeneratorExit’ was here
 extern char PyExc_GeneratorExit[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:153:24: error: conflicting types for ‘PyExc_ArithmeticError’
 PyAPI_DATA(PyObject *) PyExc_ArithmeticError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:6:13: note: previous declaration of ‘PyExc_ArithmeticError’ was here
 extern char PyExc_ArithmeticError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:154:24: error: conflicting types for ‘PyExc_LookupError’
 PyAPI_DATA(PyObject *) PyExc_LookupError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:99:13: note: previous declaration of ‘PyExc_LookupError’ was here
 extern char PyExc_LookupError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:156:24: error: conflicting types for ‘PyExc_AssertionError’
 PyAPI_DATA(PyObject *) PyExc_AssertionError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:9:13: note: previous declaration of ‘PyExc_AssertionError’ was here
 extern char PyExc_AssertionError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:157:24: error: conflicting types for ‘PyExc_AttributeError’
 PyAPI_DATA(PyObject *) PyExc_AttributeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:12:13: note: previous declaration of ‘PyExc_AttributeError’ was here
 extern char PyExc_AttributeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:158:24: error: conflicting types for ‘PyExc_BufferError’
 PyAPI_DATA(PyObject *) PyExc_BufferError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:24:13: note: previous declaration of ‘PyExc_BufferError’ was here
 extern char PyExc_BufferError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:159:24: error: conflicting types for ‘PyExc_EOFError’
 PyAPI_DATA(PyObject *) PyExc_EOFError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:48:13: note: previous declaration of ‘PyExc_EOFError’ was here
 extern char PyExc_EOFError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:160:24: error: conflicting types for ‘PyExc_FloatingPointError’
 PyAPI_DATA(PyObject *) PyExc_FloatingPointError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:63:13: note: previous declaration of ‘PyExc_FloatingPointError’ was here
 extern char PyExc_FloatingPointError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:161:24: error: conflicting types for ‘PyExc_OSError’
 PyAPI_DATA(PyObject *) PyExc_OSError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:114:13: note: previous declaration of ‘PyExc_OSError’ was here
 extern char PyExc_OSError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:162:24: error: conflicting types for ‘PyExc_ImportError’
 PyAPI_DATA(PyObject *) PyExc_ImportError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:75:13: note: previous declaration of ‘PyExc_ImportError’ was here
 extern char PyExc_ImportError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:163:24: error: conflicting types for ‘PyExc_IndexError’
 PyAPI_DATA(PyObject *) PyExc_IndexError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:84:13: note: previous declaration of ‘PyExc_IndexError’ was here
 extern char PyExc_IndexError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:164:24: error: conflicting types for ‘PyExc_KeyError’
 PyAPI_DATA(PyObject *) PyExc_KeyError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:93:13: note: previous declaration of ‘PyExc_KeyError’ was here
 extern char PyExc_KeyError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:165:24: error: conflicting types for ‘PyExc_KeyboardInterrupt’
 PyAPI_DATA(PyObject *) PyExc_KeyboardInterrupt;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:96:13: note: previous declaration of ‘PyExc_KeyboardInterrupt’ was here
 extern char PyExc_KeyboardInterrupt[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:166:24: error: conflicting types for ‘PyExc_MemoryError’
 PyAPI_DATA(PyObject *) PyExc_MemoryError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:102:13: note: previous declaration of ‘PyExc_MemoryError’ was here
 extern char PyExc_MemoryError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:167:24: error: conflicting types for ‘PyExc_NameError’
 PyAPI_DATA(PyObject *) PyExc_NameError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:105:13: note: previous declaration of ‘PyExc_NameError’ was here
 extern char PyExc_NameError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:168:24: error: conflicting types for ‘PyExc_OverflowError’
 PyAPI_DATA(PyObject *) PyExc_OverflowError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:117:13: note: previous declaration of ‘PyExc_OverflowError’ was here
 extern char PyExc_OverflowError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:169:24: error: conflicting types for ‘PyExc_RuntimeError’
 PyAPI_DATA(PyObject *) PyExc_RuntimeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:138:13: note: previous declaration of ‘PyExc_RuntimeError’ was here
 extern char PyExc_RuntimeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:171:24: error: conflicting types for ‘PyExc_NotImplementedError’
 PyAPI_DATA(PyObject *) PyExc_NotImplementedError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:111:13: note: previous declaration of ‘PyExc_NotImplementedError’ was here
 extern char PyExc_NotImplementedError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:172:24: error: conflicting types for ‘PyExc_SyntaxError’
 PyAPI_DATA(PyObject *) PyExc_SyntaxError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:147:13: note: previous declaration of ‘PyExc_SyntaxError’ was here
 extern char PyExc_SyntaxError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:173:24: error: conflicting types for ‘PyExc_IndentationError’
 PyAPI_DATA(PyObject *) PyExc_IndentationError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:81:13: note: previous declaration of ‘PyExc_IndentationError’ was here
 extern char PyExc_IndentationError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:174:24: error: conflicting types for ‘PyExc_TabError’
 PyAPI_DATA(PyObject *) PyExc_TabError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:159:13: note: previous declaration of ‘PyExc_TabError’ was here
 extern char PyExc_TabError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:175:24: error: conflicting types for ‘PyExc_ReferenceError’
 PyAPI_DATA(PyObject *) PyExc_ReferenceError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:132:13: note: previous declaration of ‘PyExc_ReferenceError’ was here
 extern char PyExc_ReferenceError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:176:24: error: conflicting types for ‘PyExc_SystemError’
 PyAPI_DATA(PyObject *) PyExc_SystemError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:153:13: note: previous declaration of ‘PyExc_SystemError’ was here
 extern char PyExc_SystemError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:177:24: error: conflicting types for ‘PyExc_SystemExit’
 PyAPI_DATA(PyObject *) PyExc_SystemExit;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:156:13: note: previous declaration of ‘PyExc_SystemExit’ was here
 extern char PyExc_SystemExit[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:178:24: error: conflicting types for ‘PyExc_TypeError’
 PyAPI_DATA(PyObject *) PyExc_TypeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:165:13: note: previous declaration of ‘PyExc_TypeError’ was here
 extern char PyExc_TypeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:179:24: error: conflicting types for ‘PyExc_UnboundLocalError’
 PyAPI_DATA(PyObject *) PyExc_UnboundLocalError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:168:13: note: previous declaration of ‘PyExc_UnboundLocalError’ was here
 extern char PyExc_UnboundLocalError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:180:24: error: conflicting types for ‘PyExc_UnicodeError’
 PyAPI_DATA(PyObject *) PyExc_UnicodeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:177:13: note: previous declaration of ‘PyExc_UnicodeError’ was here
 extern char PyExc_UnicodeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:181:24: error: conflicting types for ‘PyExc_UnicodeEncodeError’
 PyAPI_DATA(PyObject *) PyExc_UnicodeEncodeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:174:13: note: previous declaration of ‘PyExc_UnicodeEncodeError’ was here
 extern char PyExc_UnicodeEncodeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:182:24: error: conflicting types for ‘PyExc_UnicodeDecodeError’
 PyAPI_DATA(PyObject *) PyExc_UnicodeDecodeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:171:13: note: previous declaration of ‘PyExc_UnicodeDecodeError’ was here
 extern char PyExc_UnicodeDecodeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:183:24: error: conflicting types for ‘PyExc_UnicodeTranslateError’
 PyAPI_DATA(PyObject *) PyExc_UnicodeTranslateError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:180:13: note: previous declaration of ‘PyExc_UnicodeTranslateError’ was here
 extern char PyExc_UnicodeTranslateError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:184:24: error: conflicting types for ‘PyExc_ValueError’
 PyAPI_DATA(PyObject *) PyExc_ValueError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:189:13: note: previous declaration of ‘PyExc_ValueError’ was here
 extern char PyExc_ValueError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:185:24: error: conflicting types for ‘PyExc_ZeroDivisionError’
 PyAPI_DATA(PyObject *) PyExc_ZeroDivisionError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:195:13: note: previous declaration of ‘PyExc_ZeroDivisionError’ was here
 extern char PyExc_ZeroDivisionError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:187:24: error: conflicting types for ‘PyExc_BlockingIOError’
 PyAPI_DATA(PyObject *) PyExc_BlockingIOError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:18:13: note: previous declaration of ‘PyExc_BlockingIOError’ was here
 extern char PyExc_BlockingIOError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:188:24: error: conflicting types for ‘PyExc_BrokenPipeError’
 PyAPI_DATA(PyObject *) PyExc_BrokenPipeError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:21:13: note: previous declaration of ‘PyExc_BrokenPipeError’ was here
 extern char PyExc_BrokenPipeError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:189:24: error: conflicting types for ‘PyExc_ChildProcessError’
 PyAPI_DATA(PyObject *) PyExc_ChildProcessError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:30:13: note: previous declaration of ‘PyExc_ChildProcessError’ was here
 extern char PyExc_ChildProcessError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:190:24: error: conflicting types for ‘PyExc_ConnectionError’
 PyAPI_DATA(PyObject *) PyExc_ConnectionError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:36:13: note: previous declaration of ‘PyExc_ConnectionError’ was here
 extern char PyExc_ConnectionError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:191:24: error: conflicting types for ‘PyExc_ConnectionAbortedError’
 PyAPI_DATA(PyObject *) PyExc_ConnectionAbortedError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:33:13: note: previous declaration of ‘PyExc_ConnectionAbortedError’ was here
 extern char PyExc_ConnectionAbortedError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:192:24: error: conflicting types for ‘PyExc_ConnectionRefusedError’
 PyAPI_DATA(PyObject *) PyExc_ConnectionRefusedError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:39:13: note: previous declaration of ‘PyExc_ConnectionRefusedError’ was here
 extern char PyExc_ConnectionRefusedError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:193:24: error: conflicting types for ‘PyExc_ConnectionResetError’
 PyAPI_DATA(PyObject *) PyExc_ConnectionResetError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:42:13: note: previous declaration of ‘PyExc_ConnectionResetError’ was here
 extern char PyExc_ConnectionResetError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:194:24: error: conflicting types for ‘PyExc_FileExistsError’
 PyAPI_DATA(PyObject *) PyExc_FileExistsError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:57:13: note: previous declaration of ‘PyExc_FileExistsError’ was here
 extern char PyExc_FileExistsError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:195:24: error: conflicting types for ‘PyExc_FileNotFoundError’
 PyAPI_DATA(PyObject *) PyExc_FileNotFoundError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:60:13: note: previous declaration of ‘PyExc_FileNotFoundError’ was here
 extern char PyExc_FileNotFoundError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:196:24: error: conflicting types for ‘PyExc_InterruptedError’
 PyAPI_DATA(PyObject *) PyExc_InterruptedError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:87:13: note: previous declaration of ‘PyExc_InterruptedError’ was here
 extern char PyExc_InterruptedError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:197:24: error: conflicting types for ‘PyExc_IsADirectoryError’
 PyAPI_DATA(PyObject *) PyExc_IsADirectoryError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:90:13: note: previous declaration of ‘PyExc_IsADirectoryError’ was here
 extern char PyExc_IsADirectoryError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:198:24: error: conflicting types for ‘PyExc_NotADirectoryError’
 PyAPI_DATA(PyObject *) PyExc_NotADirectoryError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:108:13: note: previous declaration of ‘PyExc_NotADirectoryError’ was here
 extern char PyExc_NotADirectoryError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:199:24: error: conflicting types for ‘PyExc_PermissionError’
 PyAPI_DATA(PyObject *) PyExc_PermissionError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:123:13: note: previous declaration of ‘PyExc_PermissionError’ was here
 extern char PyExc_PermissionError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:200:24: error: conflicting types for ‘PyExc_ProcessLookupError’
 PyAPI_DATA(PyObject *) PyExc_ProcessLookupError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:126:13: note: previous declaration of ‘PyExc_ProcessLookupError’ was here
 extern char PyExc_ProcessLookupError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:201:24: error: conflicting types for ‘PyExc_TimeoutError’
 PyAPI_DATA(PyObject *) PyExc_TimeoutError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:162:13: note: previous declaration of ‘PyExc_TimeoutError’ was here
 extern char PyExc_TimeoutError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:205:24: error: conflicting types for ‘PyExc_EnvironmentError’
 PyAPI_DATA(PyObject *) PyExc_EnvironmentError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:51:13: note: previous declaration of ‘PyExc_EnvironmentError’ was here
 extern char PyExc_EnvironmentError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:206:24: error: conflicting types for ‘PyExc_IOError’
 PyAPI_DATA(PyObject *) PyExc_IOError;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:72:13: note: previous declaration of ‘PyExc_IOError’ was here
 extern char PyExc_IOError[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:211:24: error: conflicting types for ‘PyExc_RecursionErrorInst’
 PyAPI_DATA(PyObject *) PyExc_RecursionErrorInst;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:129:13: note: previous declaration of ‘PyExc_RecursionErrorInst’ was here
 extern char PyExc_RecursionErrorInst[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:214:24: error: conflicting types for ‘PyExc_Warning’
 PyAPI_DATA(PyObject *) PyExc_Warning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:192:13: note: previous declaration of ‘PyExc_Warning’ was here
 extern char PyExc_Warning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:215:24: error: conflicting types for ‘PyExc_UserWarning’
 PyAPI_DATA(PyObject *) PyExc_UserWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:186:13: note: previous declaration of ‘PyExc_UserWarning’ was here
 extern char PyExc_UserWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:216:24: error: conflicting types for ‘PyExc_DeprecationWarning’
 PyAPI_DATA(PyObject *) PyExc_DeprecationWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:45:13: note: previous declaration of ‘PyExc_DeprecationWarning’ was here
 extern char PyExc_DeprecationWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:217:24: error: conflicting types for ‘PyExc_PendingDeprecationWarning’
 PyAPI_DATA(PyObject *) PyExc_PendingDeprecationWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:120:13: note: previous declaration of ‘PyExc_PendingDeprecationWarning’ was here
 extern char PyExc_PendingDeprecationWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:218:24: error: conflicting types for ‘PyExc_SyntaxWarning’
 PyAPI_DATA(PyObject *) PyExc_SyntaxWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:150:13: note: previous declaration of ‘PyExc_SyntaxWarning’ was here
 extern char PyExc_SyntaxWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:219:24: error: conflicting types for ‘PyExc_RuntimeWarning’
 PyAPI_DATA(PyObject *) PyExc_RuntimeWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:141:13: note: previous declaration of ‘PyExc_RuntimeWarning’ was here
 extern char PyExc_RuntimeWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:220:24: error: conflicting types for ‘PyExc_FutureWarning’
 PyAPI_DATA(PyObject *) PyExc_FutureWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:66:13: note: previous declaration of ‘PyExc_FutureWarning’ was here
 extern char PyExc_FutureWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:221:24: error: conflicting types for ‘PyExc_ImportWarning’
 PyAPI_DATA(PyObject *) PyExc_ImportWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:78:13: note: previous declaration of ‘PyExc_ImportWarning’ was here
 extern char PyExc_ImportWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:222:24: error: conflicting types for ‘PyExc_UnicodeWarning’
 PyAPI_DATA(PyObject *) PyExc_UnicodeWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:183:13: note: previous declaration of ‘PyExc_UnicodeWarning’ was here
 extern char PyExc_UnicodeWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:223:24: error: conflicting types for ‘PyExc_BytesWarning’
 PyAPI_DATA(PyObject *) PyExc_BytesWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:27:13: note: previous declaration of ‘PyExc_BytesWarning’ was here
 extern char PyExc_BytesWarning[];
             ^
In file included from /usr/include/python3.5m/Python.h:109:0,
                 from lib/utils.h:8,
                 from lib/cfunction.go:7,
                 from $WORK/github.com/limetext/gopy/lib/_obj/_cgo_main.c:201:
/usr/include/python3.5m/pyerrors.h:224:24: error: conflicting types for ‘PyExc_ResourceWarning’
 PyAPI_DATA(PyObject *) PyExc_ResourceWarning;
                        ^
/tmp/sergey/go-build063744547/github.com/limetext/gopy/lib/_obj/_cgo_main.c:135:13: note: previous declaration of ‘PyExc_ResourceWarning’ was here
 extern char PyExc_ResourceWarning[];
             ^

Python 3.x

From lime issue #253, Python 3.4 is now what's installed by default by homebrew.

The pkg-config files are versioned with the point release rather than a generic python-3. Don't know if 3.4 is compatible with 3.3, but if they are I'm presuming we'll reach a point some time in the future where an unversioned python3 is 3.4 or later.

Perhaps we just add a new cgo_34.go files with a "python3_4" build constraint (and add the inverse constraint to the default). Any other ideas?

utils.c: Strange warnings

So here is the output of go build -a inside gopy/lib.

# lime/3rdparty/libs/gopy/lib
/tmp/go-build354694499/lime/3rdparty/libs/gopy/lib/_obj/_cgo_main.c:1:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
 int main() { return 0; }
     ^
# lime/3rdparty/libs/gopy/lib
./eval.go: In function ‘_cgo_2ac0b62c424c_Cfunc_PyEval_InitThreads’:
./eval.go:53:49: warning: unused variable ‘a’ [-Wunused-variable]
# lime/3rdparty/libs/gopy/lib
./lock.go: In function ‘_cgo_2ac0b62c424c_Cfunc_PyEval_AcquireLock’:
./lock.go:35:49: warning: unused variable ‘a’ [-Wunused-variable]
 func ReleaseGil() {
                                                 ^
./lock.go: In function ‘_cgo_2ac0b62c424c_Cfunc_PyEval_ReleaseLock’:
./lock.go:44:49: warning: unused variable ‘a’ [-Wunused-variable]

                                                 ^
# lime/3rdparty/libs/gopy/lib
./python.go: In function ‘_cgo_2ac0b62c424c_Cfunc_Py_Finalize’:
./python.go:52:49: warning: unused variable ‘a’ [-Wunused-variable]
  }
                                                 ^
./python.go: In function ‘_cgo_2ac0b62c424c_Cfunc_leaveRecursive’:
./python.go:72:49: warning: unused variable ‘a’ [-Wunused-variable]
 // be appended to the RuntimeError set if the recursion limit has been exceeded
                                                 ^
# lime/3rdparty/libs/gopy/lib
./utils.c:139:5: warning: missing braces around initializer [-Wmissing-braces]
     PyObject_HEAD_INIT(NULL)
     ^
./utils.c:139:5: warning: (near initialization for ‘goObjMemberType.ob_base.ob_base’) [-Wmissing-braces]
./utils.c:141:5: warning: initialization makes integer from pointer without a cast [enabled by default]
     "GoObjMember",             /*tp_name*/
     ^
./utils.c:141:5: warning: (near initialization for ‘goObjMemberType.tp_basicsize’) [enabled by default]
./utils.c:159:5: warning: initialization makes pointer from integer without a cast [enabled by default]
     Py_TPFLAGS_DEFAULT,        /*tp_flags*/
     ^
./utils.c:159:5: warning: (near initialization for ‘goObjMemberType.tp_doc’) [enabled by default]
./utils.c:160:5: warning: initialization from incompatible pointer type [enabled by default]
     "GoObjMember objects",     /* tp_doc */
     ^
./utils.c:160:5: warning: (near initialization for ‘goObjMemberType.tp_traverse’) [enabled by default]
./utils.c:169:5: warning: initialization from incompatible pointer type [enabled by default]
     objmemb_getset,            /* tp_getset */
     ^
./utils.c:169:5: warning: (near initialization for ‘goObjMemberType.tp_base’) [enabled by default]
./utils.c:172:5: warning: initialization from incompatible pointer type [enabled by default]
     (descrgetfunc)objmemb_get, /* tp_descr_get */
     ^
./utils.c:172:5: warning: (near initialization for ‘goObjMemberType.tp_descr_set’) [enabled by default]
./utils.c:173:5: warning: initialization makes integer from pointer without a cast [enabled by default]
     (descrsetfunc)objmemb_set, /* tp_descr_set */
     ^
./utils.c:173:5: warning: (near initialization for ‘goObjMemberType.tp_dictoffset’) [enabled by default]
./utils.c:220:5: warning: missing braces around initializer [-Wmissing-braces]
     PyObject_HEAD_INIT(NULL)
     ^
./utils.c:220:5: warning: (near initialization for ‘goNatMemberType.ob_base.ob_base’) [-Wmissing-braces]
./utils.c:222:5: warning: initialization makes integer from pointer without a cast [enabled by default]
     "GoNatMember",             /*tp_name*/
     ^
./utils.c:222:5: warning: (near initialization for ‘goNatMemberType.tp_basicsize’) [enabled by default]
./utils.c:240:5: warning: initialization makes pointer from integer without a cast [enabled by default]
     Py_TPFLAGS_DEFAULT,        /*tp_flags*/
     ^
./utils.c:240:5: warning: (near initialization for ‘goNatMemberType.tp_doc’) [enabled by default]
./utils.c:241:5: warning: initialization from incompatible pointer type [enabled by default]
     "GoNatMember objects",     /* tp_doc */
     ^
./utils.c:241:5: warning: (near initialization for ‘goNatMemberType.tp_traverse’) [enabled by default]
./utils.c:250:5: warning: initialization from incompatible pointer type [enabled by default]
     natmemb_getset,            /* tp_getset */
     ^
./utils.c:250:5: warning: (near initialization for ‘goNatMemberType.tp_base’) [enabled by default]
./utils.c:253:5: warning: initialization from incompatible pointer type [enabled by default]
     (descrgetfunc)natmemb_get, /* tp_descr_get */
     ^
./utils.c:253:5: warning: (near initialization for ‘goNatMemberType.tp_descr_set’) [enabled by default]
./utils.c:254:5: warning: initialization makes integer from pointer without a cast [enabled by default]
     (descrsetfunc)natmemb_set, /* tp_descr_set */
     ^
./utils.c:254:5: warning: (near initialization for ‘goNatMemberType.tp_dictoffset’) [enabled by default]

What I dont't understand is why goObjMemberType and goNatMemberType do not use PyVarObject_HEAD_INIT just as goMethodType.

Looking at PyTypeObject in object.h there is no ob_size. So I guess the aforementioned types should also use PyVarObject_HEAD_INIT. But I am not sure.

And what about those unused variable warnings?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.