2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-19 16:32:16 +00:00

Enhanced pickle safety measures.

[SVN r9358]
This commit is contained in:
Ralf W. Grosse-Kunstleve
2001-02-27 18:56:57 +00:00
parent 16264a3f2d
commit 5666c21037

View File

@@ -132,9 +132,10 @@ initgetting_started3()
py_a_lame_number.def(python::constructor<int>());
py_a_lame_number.def(&a_number<int>::get, "get");
// The third argument enables pickling of the object's __dict__.
// Enable pickling of the object's __dict__.
python::class_builder<a_number<double> >
py_a_number(this_module, "a_number", true);
py_a_number(this_module, "a_number");
py_a_number.dict_defines_state();
py_a_number.def(python::constructor<>());
py_a_number.def(python::constructor<double>());
py_a_number.def(&a_number<double>::get, "get");