Skip to content
This repository has been archived by the owner on Sep 5, 2020. It is now read-only.

Commit

Permalink
(#18) Moved info functions out of namespace api
Browse files Browse the repository at this point in the history
Functions used are in the base namespace.
  • Loading branch information
leandor committed Nov 5, 2016
1 parent fc66208 commit 2dfbb81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/papi/lz4/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,25 @@

#include "module.h"

#include <pybind11/pybind11.h>
#include <gsl/gsl>
#include <string>
#include <vector>
#include <tuple>

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){

Expand Down
2 changes: 2 additions & 0 deletions src/papi/lz4/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#define __CINT_LZ4_MODULE__
#pragma once

#include <pybind11/pybind11.h>

#include "api.h"

namespace lz4 {
Expand Down

0 comments on commit 2dfbb81

Please sign in to comment.