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 /contrib/tools/python3/src/Objects/stringlib/count.h | |
parent | 03f024c4412e3aa613bb543cf1660176320ba8f4 (diff) | |
download | ydb-06e5c21a835c0e923506c4ff27929f34e00761c2.tar.gz |
fix ya.make
Diffstat (limited to 'contrib/tools/python3/src/Objects/stringlib/count.h')
-rw-r--r-- | contrib/tools/python3/src/Objects/stringlib/count.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/contrib/tools/python3/src/Objects/stringlib/count.h b/contrib/tools/python3/src/Objects/stringlib/count.h deleted file mode 100644 index f48500bf56..0000000000 --- a/contrib/tools/python3/src/Objects/stringlib/count.h +++ /dev/null @@ -1,27 +0,0 @@ -/* stringlib: count implementation */ - -#ifndef STRINGLIB_FASTSEARCH_H -#error must include "stringlib/fastsearch.h" before including this module -#endif - -Py_LOCAL_INLINE(Py_ssize_t) -STRINGLIB(count)(const STRINGLIB_CHAR* str, Py_ssize_t str_len, - const STRINGLIB_CHAR* sub, Py_ssize_t sub_len, - Py_ssize_t maxcount) -{ - Py_ssize_t count; - - if (str_len < 0) - return 0; /* start > len(str) */ - if (sub_len == 0) - return (str_len < maxcount) ? str_len + 1 : maxcount; - - count = FASTSEARCH(str, str_len, sub, sub_len, maxcount, FAST_COUNT); - - if (count < 0) - return 0; /* no match */ - - return count; -} - - |