mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 12:57:57 +00:00
Conditional compilation in wrapper
This commit is contained in:
@@ -294,11 +294,15 @@ private:
|
|||||||
if (!storage) {
|
if (!storage) {
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
#ifdef IFOPSH_WITH_ROCKSDB
|
||||||
std::string value;
|
std::string value;
|
||||||
if (storage->db->Get(storage->ropts, key, &value) != rocksdb::Status::OK()) {
|
if (storage->db->Get(storage->ropts, key, &value) != rocksdb::Status::OK()) {
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
return PyBytes_FromStringAndSize(value.data(), value.size());
|
return PyBytes_FromStringAndSize(value.data(), value.size());
|
||||||
|
#else
|
||||||
|
Py_RETURN_NONE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
%pythoncode %{
|
%pythoncode %{
|
||||||
|
|||||||
Reference in New Issue
Block a user