Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/libevent/dist Use the static inline for the bod...
details: https://anonhg.NetBSD.org/src/rev/8d1ddf2d5cfe
branches: trunk
changeset: 765256:8d1ddf2d5cfe
user: joerg <joerg%NetBSD.org@localhost>
date: Mon May 23 15:23:24 2011 +0000
description:
Use the static inline for the body as well.
diffstat:
external/bsd/libevent/dist/min_heap.h | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
diffs (49 lines):
diff -r 3e6bae99032d -r 8d1ddf2d5cfe external/bsd/libevent/dist/min_heap.h
--- a/external/bsd/libevent/dist/min_heap.h Mon May 23 15:22:57 2011 +0000
+++ b/external/bsd/libevent/dist/min_heap.h Mon May 23 15:23:24 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: min_heap.h,v 1.1.1.1 2009/11/02 10:01:01 plunky Exp $ */
+/* $NetBSD: min_heap.h,v 1.2 2011/05/23 15:23:24 joerg Exp $ */
/*
* Copyright (c) 2006 Maxim Yegorushkin <maxim.yegorushkin%gmail.com@localhost>
* All rights reserved.
@@ -56,14 +56,14 @@
return evutil_timercmp(&a->ev_timeout, &b->ev_timeout, >);
}
-void min_heap_ctor(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; }
-void min_heap_dtor(min_heap_t* s) { free(s->p); }
-void min_heap_elem_init(struct event* e) { e->min_heap_idx = -1; }
-int min_heap_empty(min_heap_t* s) { return 0u == s->n; }
-unsigned min_heap_size(min_heap_t* s) { return s->n; }
-struct event* min_heap_top(min_heap_t* s) { return s->n ? *s->p : 0; }
+static inline void min_heap_ctor(min_heap_t* s) { s->p = 0; s->n = 0; s->a = 0; }
+static inline void min_heap_dtor(min_heap_t* s) { free(s->p); }
+static inline void min_heap_elem_init(struct event* e) { e->min_heap_idx = -1; }
+static inline int min_heap_empty(min_heap_t* s) { return 0u == s->n; }
+static inline unsigned min_heap_size(min_heap_t* s) { return s->n; }
+static inline struct event* min_heap_top(min_heap_t* s) { return s->n ? *s->p : 0; }
-int min_heap_push(min_heap_t* s, struct event* e)
+static inline int min_heap_push(min_heap_t* s, struct event* e)
{
if(min_heap_reserve(s, s->n + 1))
return -1;
@@ -71,7 +71,7 @@
return 0;
}
-struct event* min_heap_pop(min_heap_t* s)
+static inline struct event* min_heap_pop(min_heap_t* s)
{
if(s->n)
{
@@ -83,7 +83,7 @@
return 0;
}
-int min_heap_erase(min_heap_t* s, struct event* e)
+static inline int min_heap_erase(min_heap_t* s, struct event* e)
{
if(((unsigned int)-1) != e->min_heap_idx)
{
Home |
Main Index |
Thread Index |
Old Index