Author: akhaldi
Date: Sat Feb 28 10:15:41 2015
New Revision: 66486
URL:
http://svn.reactos.org/svn/reactos?rev=66486&view=rev
Log:
[INCLUDE/WINE] Update rbtree.h. CORE-9246
Modified:
trunk/reactos/include/reactos/wine/rbtree.h
Modified: trunk/reactos/include/reactos/wine/rbtree.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/rbtre…
==============================================================================
--- trunk/reactos/include/reactos/wine/rbtree.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/rbtree.h [iso-8859-1] Sat Feb 28 10:15:41 2015
@@ -23,7 +23,7 @@
#define __WINE_WINE_RBTREE_H
#define WINE_RB_ENTRY_VALUE(element, type, field) \
- ((type *)((char *)(element) - FIELD_OFFSET(type, field)))
+ ((type *)((char *)(element) - offsetof(type, field)))
struct wine_rb_entry
{
@@ -220,12 +220,16 @@
wine_rb_postorder(tree, callback, context);
}
-static inline void wine_rb_destroy(struct wine_rb_tree *tree, wine_rb_traverse_func_t
*callback, void *context)
+static inline void wine_rb_clear(struct wine_rb_tree *tree, wine_rb_traverse_func_t
*callback, void *context)
{
/* Note that we use postorder here because the callback will likely free the entry.
*/
if (callback) wine_rb_postorder(tree, callback, context);
-
tree->root = NULL;
+}
+
+static inline void wine_rb_destroy(struct wine_rb_tree *tree, wine_rb_traverse_func_t
*callback, void *context)
+{
+ wine_rb_clear(tree, callback, context);
tree->functions->free(tree->stack.entries);
}