mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
python: add size proprety
This commit is contained in:
1 parent
18ec3086ee
commit
14cf0b3142
2 files changed
+4
No files matched your search
@@ -158,6 +158,9 @@ cdef class Value(object):
|
||||
return self._value.get().id
|
||||
def __set__(self, cpp.uint64_t value):
|
||||
self._value.get().id = value
|
||||
property size:
|
||||
def __get__(self):
|
||||
return self._value.get().size()
|
||||
|
||||
cdef class NodeSetIter(object):
|
||||
cdef map[cpp.InfoHash, cpp.shared_ptr[cpp.Node]]* _nodes
|
||||
|
||||
@@ -85,6 +85,7 @@ cdef extern from "opendht/value.h" namespace "dht":
|
||||
Value(vector[uint8_t]) except +
|
||||
Value(const uint8_t* dat_ptr, size_t dat_len) except +
|
||||
string toString() const
|
||||
size_t size() const
|
||||
uint64_t id
|
||||
shared_ptr[PublicKey] owner
|
||||
InfoHash recipient
|
||||
|
||||
Reference in new issue
Block a user