From 2dfbb81a95bb5f4cb0a94a42b38b390eccba10dc Mon Sep 17 00:00:00 2001 From: leandor Date: Sat, 5 Nov 2016 20:09:05 -0300 Subject: [PATCH] (#18) Moved info functions out of namespace api Functions used are in the base namespace. --- src/papi/lz4/module.cpp | 12 +++++++----- src/papi/lz4/module.h | 2 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/papi/lz4/module.cpp b/src/papi/lz4/module.cpp index a67e2bb..6ee5e2f 100644 --- a/src/papi/lz4/module.cpp +++ b/src/papi/lz4/module.cpp @@ -2,23 +2,25 @@ #include "module.h" -#include #include #include #include #include -using namespace gsl; + static test_initializer modules([](py::module &m) { + using namespace gsl; + using namespace lz4; + m.def_submodule("lz4") - .def("VERSION_NUMBER", lz4::api::VERSION_NUMBER) + .def("VERSION_NUMBER", VERSION_NUMBER) .def("VERSION", [](){ - return py::make_tuple(lz4::api::VERSION_MAJOR(), lz4::api::VERSION_MINOR(), lz4::api::VERSION_RELEASE()); + return py::make_tuple(VERSION_MAJOR(), VERSION_MINOR(), VERSION_RELEASE()); }) .def("__version__", [](){ - return py::str(lz4::api::VERSION_STRING()); + return py::str(VERSION_STRING()); }) .def("compress", [](const py::bytes& buffer){ diff --git a/src/papi/lz4/module.h b/src/papi/lz4/module.h index d3c1ea3..9c9bc60 100644 --- a/src/papi/lz4/module.h +++ b/src/papi/lz4/module.h @@ -2,6 +2,8 @@ #define __CINT_LZ4_MODULE__ #pragma once +#include + #include "api.h" namespace lz4 {