We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CPP
#include <pybind11/pybind11.h> PYBIND11_PLUGIN(enum_module) { pybind11::module m{ "enum_module" }; enum Foo { bar }; pybind11::enum_<Foo>{ m, "Foo" }.value("Bar", bar); return m.ptr(); }
BUILD
$> ninja -v [1/2] /usr/bin/clang++ -Denum_module_EXPORTS -I/usr/include/python3.5m -std=c++1z -fPIC -MD -MT CMakeFiles/enum_module.dir/enummodule.cpp.o -MF CMakeFiles/enum_module.dir/enummodule.cpp.o.d -o CMakeFiles/enum_module.dir/enummodule.cpp.o -c ../enummodule.cpp [2/2] : && /usr/bin/clang++ -fPIC -std=c++1z -shared -Wl,-soname,enum_module.so -o lib/enum_module.so CMakeFiles/enum_module.dir/enummodule.cpp.o && :
PY
#!/usr/bin/env python3 from multiprocessing import Pool from enum_module import * print(Foo.Bar) Pool(1).map(print, [Foo.Bar])
COUT
$> PYTHONPATH=lib ../test.py Foo.Bar Foo.???
The text was updated successfully, but these errors were encountered:
8ac9715
Merge pull request #386 from wjakob/enum-fix
ba21f1d
enum serialization support (fixes #380)
No branches or pull requests
CPP
BUILD
PY
COUT
The text was updated successfully, but these errors were encountered: