Skip to content
Snippets Groups Projects
Commit 14cf0b31 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

python: add size proprety

parent 18ec3086
Branches
Tags
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment