projects
/
platform
/
upstream
/
libgc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
965c9f9
)
Add assertion for GC_new_kind boolean arguments
author
Ivan Maidanski
<ivmai@mail.ru>
Tue, 15 Mar 2016 20:42:43 +0000
(23:42 +0300)
committer
Ivan Maidanski
<ivmai@mail.ru>
Tue, 15 Mar 2016 20:42:43 +0000
(23:42 +0300)
* misc.c (GC_new_kind_inner): Add assertions for "adjust" and "clear"
arguments (should be zero or one).
misc.c
patch
|
blob
|
history
diff --git
a/misc.c
b/misc.c
index
b4550e1
..
680d69e
100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-1845,6
+1845,8
@@
GC_API unsigned GC_CALL GC_new_kind_inner(void **fl, GC_word descr,
{
unsigned result = GC_n_kinds;
+ GC_ASSERT(adjust == FALSE || adjust == TRUE);
+ GC_ASSERT(clear == FALSE || clear == TRUE);
if (result < MAXOBJKINDS) {
GC_n_kinds++;
GC_obj_kinds[result].ok_freelist = fl;