Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
4b5cecc7
Commit
4b5cecc7
authored
Apr 05, 2023
by
Vitaly Arbuzov
Browse files
Make intset search private again
parent
de83c8a0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/intset.c
View file @
4b5cecc7
...
...
@@ -114,7 +114,7 @@ static intset *intsetResize(intset *is, uint32_t len) {
* sets "pos" to the position of the value within the intset. Return 0 when
* the value is not present in the intset and sets "pos" to the position
* where "value" can be inserted. */
uint8_t
intsetSearch
(
intset
*
is
,
int64_t
value
,
uint32_t
*
pos
)
{
static
uint8_t
intsetSearch
(
intset
*
is
,
int64_t
value
,
uint32_t
*
pos
)
{
int
min
=
0
,
max
=
intrev32ifbe
(
is
->
length
)
-
1
,
mid
=
-
1
;
int64_t
cur
=
-
1
;
...
...
src/intset.h
View file @
4b5cecc7
...
...
@@ -42,7 +42,6 @@ intset *intsetNew(void);
intset
*
intsetAdd
(
intset
*
is
,
int64_t
value
,
uint8_t
*
success
);
intset
*
intsetRemove
(
intset
*
is
,
int64_t
value
,
int
*
success
);
uint8_t
intsetFind
(
intset
*
is
,
int64_t
value
);
uint8_t
intsetSearch
(
intset
*
is
,
int64_t
value
,
uint32_t
*
pos
);
int64_t
intsetRandom
(
intset
*
is
);
int64_t
intsetMax
(
intset
*
is
);
int64_t
intsetMin
(
intset
*
is
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment