Browse Source

python: fix PyInit_* declarations to work on Windows as well.

Co-authored-by: Cameron Egbert <cegbert@oculus.com>
appveyor-coverage
Vladimír Vondruš 7 years ago
parent
commit
e8198cb97e
  1. 2
      src/python/corrade/containers.cpp
  2. 2
      src/python/magnum/gl.cpp
  3. 2
      src/python/magnum/magnum.cpp
  4. 2
      src/python/magnum/meshtools.cpp
  5. 2
      src/python/magnum/platform/egl.cpp
  6. 2
      src/python/magnum/platform/glfw.cpp
  7. 2
      src/python/magnum/platform/glx.cpp
  8. 2
      src/python/magnum/platform/sdl2.cpp
  9. 2
      src/python/magnum/primitives.cpp
  10. 2
      src/python/magnum/scenegraph.cpp
  11. 2
      src/python/magnum/shaders.cpp
  12. 2
      src/python/magnum/trade.cpp

2
src/python/corrade/containers.cpp

@ -636,7 +636,7 @@ void containers(py::module& m) {
#ifndef CORRADE_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_containers();
extern "C" PYBIND11_EXPORT PyObject* PyInit_containers();
PYBIND11_MODULE(containers, m) {
corrade::containers(m);
}

2
src/python/magnum/gl.cpp

@ -496,7 +496,7 @@ void gl(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_gl();
extern "C" PYBIND11_EXPORT PyObject* PyInit_gl();
PYBIND11_MODULE(gl, m) {
magnum::gl(m);
}

2
src/python/magnum/magnum.cpp

@ -216,7 +216,7 @@ void magnum(py::module& m) {
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit__magnum();
extern "C" PYBIND11_EXPORT PyObject* PyInit__magnum();
PYBIND11_MODULE(_magnum, m) {
/* We need ArrayView for images */
py::module::import("corrade.containers");

2
src/python/magnum/meshtools.cpp

@ -64,7 +64,7 @@ void meshtools(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_meshtools();
extern "C" PYBIND11_EXPORT PyObject* PyInit_meshtools();
PYBIND11_MODULE(meshtools, m) {
magnum::meshtools(m);
}

2
src/python/magnum/platform/egl.cpp

@ -74,7 +74,7 @@ void egl(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_egl();
extern "C" PYBIND11_EXPORT PyObject* PyInit_egl();
PYBIND11_MODULE(egl, m) {
magnum::platform::egl(m);
}

2
src/python/magnum/platform/glfw.cpp

@ -126,7 +126,7 @@ void glfw(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_glfw();
extern "C" PYBIND11_EXPORT PyObject* PyInit_glfw();
PYBIND11_MODULE(glfw, m) {
magnum::platform::glfw(m);
}

2
src/python/magnum/platform/glx.cpp

@ -74,7 +74,7 @@ void glx(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_glx();
extern "C" PYBIND11_EXPORT PyObject* PyInit_glx();
PYBIND11_MODULE(glx, m) {
magnum::platform::glx(m);
}

2
src/python/magnum/platform/sdl2.cpp

@ -134,7 +134,7 @@ void sdl2(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_sdl2();
extern "C" PYBIND11_EXPORT PyObject* PyInit_sdl2();
PYBIND11_MODULE(sdl2, m) {
magnum::platform::sdl2(m);
}

2
src/python/magnum/primitives.cpp

@ -60,7 +60,7 @@ void primitives(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_primitives();
extern "C" PYBIND11_EXPORT PyObject* PyInit_primitives();
PYBIND11_MODULE(primitives, m) {
magnum::primitives(m);
}

2
src/python/magnum/scenegraph.cpp

@ -178,7 +178,7 @@ void scenegraph(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_scenegraph();
extern "C" PYBIND11_EXPORT PyObject* PyInit_scenegraph();
PYBIND11_MODULE(scenegraph, m) {
magnum::scenegraph(m);
}

2
src/python/magnum/shaders.cpp

@ -155,7 +155,7 @@ void shaders(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_shaders();
extern "C" PYBIND11_EXPORT PyObject* PyInit_shaders();
PYBIND11_MODULE(shaders, m) {
magnum::shaders(m);
}

2
src/python/magnum/trade.cpp

@ -55,7 +55,7 @@ void trade(py::module& m) {
#ifndef MAGNUM_BUILD_STATIC
/* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863
is released */
extern "C" PyObject* PyInit_trade();
extern "C" PYBIND11_EXPORT PyObject* PyInit_trade();
PYBIND11_MODULE(trade, m) {
magnum::trade(m);
}

Loading…
Cancel
Save