Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
Spot
Commits
197019ea
Commit
197019ea
authored
Apr 03, 2011
by
Alexandre Duret-Lutz
Browse files
[buddy]
* buddy/src/kernel.c (bdd_addref, bdd_delref): Disable sanity checks when compiled with NDEBUG.
parent
9f63bb66
Changes
2
Hide whitespace changes
Inline
Side-by-side
buddy/ChangeLog
View file @
197019ea
2011-04-03 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* buddy/src/kernel.c (bdd_addref, bdd_delref): Disable sanity
checks when compiled with NDEBUG.
2011-02-27 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* examples/cmilner/Makefile.am (cmilner_LDADD): Link with -lm, to
...
...
buddy/src/kernel.c
View file @
197019ea
...
...
@@ -1114,13 +1114,17 @@ RETURN {* The BDD node {\tt r}. *}
*/
BDD
bdd_addref
(
BDD
root
)
{
#if NDEBUG
if
(
root
<
2
)
return
root
;
#else
if
(
root
<
2
||
!
bddrunning
)
return
root
;
if
(
root
>=
bddnodesize
)
return
bdd_error
(
BDD_ILLBDD
);
if
(
LOW
(
root
)
==
-
1
)
return
bdd_error
(
BDD_ILLBDD
);
#endif
INCREF
(
root
);
return
root
;
}
...
...
@@ -1140,6 +1144,10 @@ RETURN {* The BDD node {\tt r}. *}
*/
BDD
bdd_delref
(
BDD
root
)
{
#if NDEBUG
if
(
root
<
2
)
return
root
;
#else
if
(
root
<
2
||
!
bddrunning
)
return
root
;
if
(
root
>=
bddnodesize
)
...
...
@@ -1149,7 +1157,7 @@ BDD bdd_delref(BDD root)
/* if the following line is present, fails there much earlier */
if
(
!
HASREF
(
root
))
bdd_error
(
BDD_BREAK
);
/* distinctive */
#endif
DECREF
(
root
);
return
root
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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