Skip to content

Commit 30ee285

Browse files
Martin Belangerigaw
authored andcommitted
python bindings: add some definitions for backward compatibility
libvnme 3.x changes a few definitions compared to 1.x. This adds backward compatible definitions. Signed-off-by: Martin Belanger <[email protected]>
1 parent 50ec8d9 commit 30ee285

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

libnvme/libnvme/nvme.i

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,3 +1268,12 @@ PyObject *nbft_get(const char * filename);
12681268
%rename($ignore, %$isvariable) ""; // ignore all variables
12691269

12701270
%include "../src/nvme/types.h"
1271+
1272+
1273+
%pythoncode %{
1274+
# Definitions for backward compatibility between libnvme 1.x and 3.x (there is no 2.x)
1275+
# Some terms (class/variable names) were changed and this allows running older python
1276+
# code written for libnvme 1.x with libnvme 3.x (and possibly later).
1277+
NVME_LOG_LID_DISCOVER = _nvme.NVME_LOG_LID_DISCOVERY
1278+
root = global_ctx
1279+
%}

0 commit comments

Comments
 (0)