forked from weaselab/conflict-set
Add getBytes to conflict_set.py
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user