libcalamares: provide pybind11 constructor for GS

This constructor (of the proxy object) is used only by
test-code (see also comment in the Boost implementation)
but needs to be made explicit now.
This commit is contained in:
Adriaan de Groot 2023-10-22 13:20:29 +02:00
parent b2337c82a7
commit af9b41e1a9

View File

@ -642,6 +642,7 @@ PYBIND11_MODULE( libcalamares, m )
.def( "setprogress", &Calamares::Python::JobProxy::setprogress );
py::class_< Calamares::Python::GlobalStorageProxy >( m, "GlobalStorage" )
.def( py::init( []( std::nullptr_t p ) { return new Calamares::Python::GlobalStorageProxy( nullptr ); } ) )
.def( "contains", &Calamares::Python::GlobalStorageProxy::contains )
.def( "count", &Calamares::Python::GlobalStorageProxy::count )
.def( "insert", &Calamares::Python::GlobalStorageProxy::insert )