aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/curl/lib/splay.h
diff options
context:
space:
mode:
authorMaxim Yurchuk <maxim-yurchuk@ydb.tech>2024-10-18 20:31:38 +0300
committerGitHub <noreply@github.com>2024-10-18 20:31:38 +0300
commit2a74bac2d2d3bccb4e10120f1ead805640ec9dd0 (patch)
tree047e4818ced5aaf73f58517629e5260b5291f9f0 /contrib/libs/curl/lib/splay.h
parent2d9656823e9521d8c29ea4c9a1d0eab78391abfc (diff)
parent3d834a1923bbf9403cd4a448e7f32b670aa4124f (diff)
downloadydb-2a74bac2d2d3bccb4e10120f1ead805640ec9dd0.tar.gz
Merge pull request #10502 from ydb-platform/mergelibs-241016-1210
Library import 241016-1210
Diffstat (limited to 'contrib/libs/curl/lib/splay.h')
-rw-r--r--contrib/libs/curl/lib/splay.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/libs/curl/lib/splay.h b/contrib/libs/curl/lib/splay.h
index b8c9360e57..dd1d07ac2e 100644
--- a/contrib/libs/curl/lib/splay.h
+++ b/contrib/libs/curl/lib/splay.h
@@ -26,14 +26,13 @@
#include "curl_setup.h"
#include "timeval.h"
-/* only use function calls to access this struct */
struct Curl_tree {
struct Curl_tree *smaller; /* smaller node */
struct Curl_tree *larger; /* larger node */
struct Curl_tree *samen; /* points to the next node with identical key */
struct Curl_tree *samep; /* points to the prev node with identical key */
- struct curltime key; /* this node's "sort" key */
- void *ptr; /* data the splay code does not care about */
+ struct curltime key; /* this node's "sort" key */
+ void *payload; /* data the splay code doesn't care about */
};
struct Curl_tree *Curl_splay(struct curltime i,
@@ -51,8 +50,9 @@ int Curl_splayremove(struct Curl_tree *t,
struct Curl_tree *removenode,
struct Curl_tree **newroot);
-/* set and get the custom payload for this tree node */
-void Curl_splayset(struct Curl_tree *node, void *payload);
-void *Curl_splayget(struct Curl_tree *node);
+#define Curl_splaycomparekeys(i,j) ( ((i.tv_sec) < (j.tv_sec)) ? -1 : \
+ ( ((i.tv_sec) > (j.tv_sec)) ? 1 : \
+ ( ((i.tv_usec) < (j.tv_usec)) ? -1 : \
+ ( ((i.tv_usec) > (j.tv_usec)) ? 1 : 0))))
#endif /* HEADER_CURL_SPLAY_H */