diff options
author | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
---|---|---|
committer | monster <monster@ydb.tech> | 2022-07-07 14:41:37 +0300 |
commit | 06e5c21a835c0e923506c4ff27929f34e00761c2 (patch) | |
tree | 75efcbc6854ef9bd476eb8bf00cc5c900da436a2 /library/python/runtime_py3/__res.pyx | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'library/python/runtime_py3/__res.pyx')
-rw-r--r-- | library/python/runtime_py3/__res.pyx | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/library/python/runtime_py3/__res.pyx b/library/python/runtime_py3/__res.pyx deleted file mode 100644 index 97190d9f29..0000000000 --- a/library/python/runtime_py3/__res.pyx +++ /dev/null @@ -1,36 +0,0 @@ -from _codecs import utf_8_decode, utf_8_encode - -from libcpp cimport bool - -from util.generic.string cimport TString, TStringBuf - - -cdef extern from "library/cpp/resource/resource.h" namespace "NResource": - cdef size_t Count() except + - cdef TStringBuf KeyByIndex(size_t idx) except + - cdef bool FindExact(const TStringBuf key, TString* result) nogil except + - - -def count(): - return Count() - - -def key_by_index(idx): - cdef TStringBuf ret = KeyByIndex(idx) - - return ret.Data()[:ret.Size()] - - -def find(s): - cdef TString res - - if isinstance(s, str): - s = utf_8_encode(s)[0] - - if FindExact(TStringBuf(s, len(s)), &res): - return res.c_str()[:res.length()] - - return None - - -include "importer.pxi" |