aboutsummaryrefslogtreecommitdiffstats
path: root/src/wrap/python
diff options
context:
space:
mode:
Diffstat (limited to 'src/wrap/python')
-rw-r--r--src/wrap/python/core.cpp2
-rw-r--r--src/wrap/python/filter.cpp14
-rw-r--r--src/wrap/python/python_botan.h3
3 files changed, 10 insertions, 9 deletions
diff --git a/src/wrap/python/core.cpp b/src/wrap/python/core.cpp
index 7dac7be7f..6dcceee74 100644
--- a/src/wrap/python/core.cpp
+++ b/src/wrap/python/core.cpp
@@ -178,7 +178,7 @@ std::string python_kdf2(const std::string& param,
const std::string& masterkey,
u32bit outputlength)
{
- std::auto_ptr<KDF> kdf(get_kdf("KDF2(SHA-1)"));
+ std::unique_ptr<KDF> kdf(get_kdf("KDF2(SHA-1)"));
return make_string(
kdf->derive_key(outputlength,
diff --git a/src/wrap/python/filter.cpp b/src/wrap/python/filter.cpp
index 437c5239f..7c28d8f43 100644
--- a/src/wrap/python/filter.cpp
+++ b/src/wrap/python/filter.cpp
@@ -111,19 +111,19 @@ Filter* make_filter4(const std::string& name,
name);
}
-void append_filter(Pipe& pipe, std::auto_ptr<Filter> filter)
+void append_filter(Pipe& pipe, std::unique_ptr<Filter> filter)
{
pipe.append(filter.get());
filter.release();
}
-void prepend_filter(Pipe& pipe, std::auto_ptr<Filter> filter)
+void prepend_filter(Pipe& pipe, std::unique_ptr<Filter> filter)
{
pipe.prepend(filter.get());
filter.release();
}
-void do_send(std::auto_ptr<FilterWrapper> filter, const std::string& data)
+void do_send(std::unique_ptr<FilterWrapper> filter, const std::string& data)
{
printf("Sending %s to %p\n", data.c_str(), filter.get());
filter->send_str(data);
@@ -133,7 +133,7 @@ BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(rallas_ovls, read_all_as_string, 0, 1)
void export_filters()
{
- class_<Filter, std::auto_ptr<Filter>, boost::noncopyable>
+ class_<Filter, std::unique_ptr<Filter>, boost::noncopyable>
("__Internal_FilterObj", no_init);
def("make_filter", make_filter1,
@@ -147,7 +147,7 @@ void export_filters()
// This might not work - Pipe will delete the filter, but Python
// might have allocated the space with malloc() or who-knows-what -> bad
- class_<FilterWrapper, std::auto_ptr<FilterWrapper>,
+ class_<FilterWrapper, std::unique_ptr<FilterWrapper>,
bases<Filter>, boost::noncopyable>
("FilterObj")
.def("write", pure_virtual(&Py_Filter::write_str))
@@ -155,8 +155,8 @@ void export_filters()
.def("start_msg", &Filter::start_msg, &FilterWrapper::default_start_msg)
.def("end_msg", &Filter::end_msg, &FilterWrapper::default_end_msg);
- implicitly_convertible<std::auto_ptr<FilterWrapper>,
- std::auto_ptr<Filter> >();
+ implicitly_convertible<std::unique_ptr<FilterWrapper>,
+ std::unique_ptr<Filter> >();
void (Pipe::*pipe_write_str)(const std::string&) = &Pipe::write;
void (Pipe::*pipe_process_str)(const std::string&) = &Pipe::process_msg;
diff --git a/src/wrap/python/python_botan.h b/src/wrap/python/python_botan.h
index a7a2e505e..ac0a17d7f 100644
--- a/src/wrap/python/python_botan.h
+++ b/src/wrap/python/python_botan.h
@@ -24,7 +24,8 @@ class Bad_Size : public Exception
public:
Bad_Size(u32bit got, u32bit expected) :
Exception("Bad size detected in Python/C++ conversion layer: got " +
- to_string(got) + " bytes, expected " + to_string(expected))
+ std::to_string(got) + " bytes, expected " +
+ std::to_string(expected))
{}
};