aboutsummaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/python/src/filter.cpp14
-rw-r--r--misc/python/src/pipe.cpp24
2 files changed, 14 insertions, 24 deletions
diff --git a/misc/python/src/filter.cpp b/misc/python/src/filter.cpp
index 10497f851..f028d05cd 100644
--- a/misc/python/src/filter.cpp
+++ b/misc/python/src/filter.cpp
@@ -69,3 +69,17 @@ void export_filters()
def("make_filter", make_filter2,
return_value_policy<manage_new_object>());
}
+
+void export_pipe()
+ {
+ void (Pipe::*pipe_write1)(const std::string&) = &Pipe::write;
+ void (Pipe::*pipe_write2)(const byte[], u32bit) = &Pipe::write;
+
+ class_<Pipe, boost::noncopyable>("Pipe")
+ .def(init< Python_Filter*, optional<Python_Filter*> >())
+ .def("start_msg", &Pipe::start_msg)
+ .def("end_msg", &Pipe::end_msg)
+ .def("write", pipe_write1)
+ .def("write", pipe_write2)
+ .def("read_all", &Pipe::read_all_as_string);
+ }
diff --git a/misc/python/src/pipe.cpp b/misc/python/src/pipe.cpp
deleted file mode 100644
index e586b087f..000000000
--- a/misc/python/src/pipe.cpp
+++ /dev/null
@@ -1,24 +0,0 @@
-/*************************************************
-* Pipe wrapper using Boost.Python *
-* (C) 2005-2006 Jack Lloyd <[email protected]> *
-*************************************************/
-
-#include <boost/python.hpp>
-using namespace boost::python;
-
-#include <botan/pipe.h>
-using namespace Botan;
-
-void export_pipe()
- {
- void (Pipe::*pipe_write1)(const std::string&) = &Pipe::write;
- void (Pipe::*pipe_write2)(const byte[], u32bit) = &Pipe::write;
-
- class_<Pipe, boost::noncopyable>("Pipe")
- .def(init< Python_Filter*, optional<Python_Filter*> >())
- .def("start_msg", &Pipe::start_msg)
- .def("end_msg", &Pipe::end_msg)
- .def("write", pipe_write1)
- .def("write", pipe_write2)
- .def("read_all", &Pipe::read_all_as_string);
- }