diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 20:33:40 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-12 21:53:11 +0200 |
commit | 9244a27f9548a1d39fb01348fde66ff81f5150a4 (patch) | |
tree | 0f9d06a762a9a9939e1f37be60cf2b5e47da7983 /src/pyutils.h | |
parent | 5f78556078d2e61d5c0ef44e36d58f3864cd84d1 (diff) | |
download | fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.gz fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.tar.bz2 fork-ledger-9244a27f9548a1d39fb01348fde66ff81f5150a4.zip |
Refactor python related types into ledger::python namespace
Diffstat (limited to 'src/pyutils.h')
-rw-r--r-- | src/pyutils.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pyutils.h b/src/pyutils.h index aa9c4451..c02be37b 100644 --- a/src/pyutils.h +++ b/src/pyutils.h @@ -39,6 +39,8 @@ */ #pragma once +namespace ledger { namespace python { + template <typename T, typename TfromPy> struct object_from_python { @@ -142,6 +144,8 @@ PyObject * str_to_py_unicode(const T& str) return object(handle<>(borrowed(uni))).ptr(); } +} } // namespace ledger::python + namespace boost { namespace python { // Use expr to create the PyObject corresponding to x @@ -178,7 +182,7 @@ namespace boost { namespace python { : handle<> \ { \ arg_to_python(T const& x) \ - : python::handle<>(expr) {} \ + : boost::python::handle<>(expr) {} \ }; \ } |