mirror of
https://github.com/savoirfairelinux/opendht.git
synced 2026-11-08 04:21:51 +00:00
add support for version
This commit is contained in:
1 parent
0139e7a2d4
commit
c08b6a7f5d
3 files changed
+5
No files matched your search
@@ -48,6 +48,9 @@ cdef inline _deinitialize_gnutls():
|
||||
# Initialize GnuTLS when this module is imported
|
||||
_initialize_gnutls()
|
||||
|
||||
def version() -> str:
|
||||
return cpp.version().decode()
|
||||
|
||||
cdef inline void lookup_callback(cpp.vector[cpp.shared_ptr[cpp.IndexValue]]* values, cpp.Prefix* p, void *user_data) noexcept with gil:
|
||||
cbs = <object>user_data
|
||||
if 'lookup' in cbs and cbs['lookup']:
|
||||
|
||||
@@ -8,4 +8,5 @@ pure-Python asyncio-friendly wrapper under ``opendht.aio``.
|
||||
|
||||
from ._core import * # re-export core Cython bindings
|
||||
|
||||
__version__ = version()
|
||||
__all__ = [name for name in dir() if not name.startswith("_")]
|
||||
@@ -49,6 +49,7 @@ cdef extern from "<future>" namespace "std" nogil:
|
||||
shared_future[T] share()
|
||||
|
||||
cdef extern from "opendht/utils.h" namespace "dht":
|
||||
const char* version()
|
||||
cdef cppclass time_point:
|
||||
@staticmethod
|
||||
time_point min() const
|
||||
|
||||
Reference in new issue
Block a user