瀏覽代碼

Remove stdbool.h from avl_tree since MSVC doesn't like it.

tags/v0.5
Ben Kurtovic 7 年之前
父節點
當前提交
2593675651
共有 2 個檔案被更改,包括 8 行新增2 行删除
  1. +6
    -0
      mwparserfromhell/parser/ctokenizer/avl_tree.c
  2. +2
    -2
      mwparserfromhell/parser/ctokenizer/avl_tree.h

+ 6
- 0
mwparserfromhell/parser/ctokenizer/avl_tree.c 查看文件

@@ -3,6 +3,7 @@
* binary search tree), implementation file
*
* Written in 2014-2016 by Eric Biggers <ebiggers3@gmail.com>
* Slight changes for compatibility by Ben Kurtovic <ben.kurtovic@gmail.com>
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
@@ -17,6 +18,11 @@
* see <http://creativecommons.org/publicdomain/zero/1.0/>.
*/

#define false 0
#define true 1

typedef int bool;

#include "avl_tree.h"

/* Returns the left child (sign < 0) or the right child (sign > 0) of the


+ 2
- 2
mwparserfromhell/parser/ctokenizer/avl_tree.h 查看文件

@@ -3,6 +3,7 @@
* binary search tree), header file
*
* Written in 2014-2016 by Eric Biggers <ebiggers3@gmail.com>
* Slight changes for compatibility by Ben Kurtovic <ben.kurtovic@gmail.com>
*
* To the extent possible under law, the author(s) have dedicated all copyright
* and related and neighboring rights to this software to the public domain
@@ -20,7 +21,6 @@
#ifndef _AVL_TREE_H_
#define _AVL_TREE_H_

#include <stdbool.h>
#include <stddef.h>
#include <inttypes.h> /* for uintptr_t */

@@ -78,7 +78,7 @@ avl_tree_node_set_unlinked(struct avl_tree_node *node)
/* Returns true iff the specified AVL tree node has been marked with
* avl_tree_node_set_unlinked() and has not subsequently been inserted into a
* tree. */
static AVL_INLINE bool
static AVL_INLINE int
avl_tree_node_is_unlinked(const struct avl_tree_node *node)
{
return node->parent_balance == (uintptr_t)node;


Loading…
取消
儲存