Add getBytes to conflict_set.py

This commit is contained in:
2024-04-08 17:33:51 -07:00
parent 325cab6a95
commit 738de01cb4
2 changed files with 12 additions and 3 deletions
+6
View File
@@ -58,6 +58,9 @@ _lib.ConflictSet_setOldestVersion.argtypes = (ctypes.c_void_p, ctypes.c_int64)
_lib.ConflictSet_destroy.argtypes = (ctypes.c_void_p,)
_lib.ConflictSet_getBytes.argtypes = (ctypes.c_void_p,)
_lib.ConflictSet_getBytes.restype = ctypes.c_int64
class Result(enum.Enum):
COMMIT = 0
@@ -106,6 +109,9 @@ class ConflictSet:
def setOldestVersion(self, version: int) -> None:
_lib.ConflictSet_setOldestVersion(self.p, version)
def getBytes(self) -> int:
return _lib.ConflictSet_getBytes(self.p)
def __enter__(self):
return self