summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorivmai <ivmai>2011-06-30 17:29:25 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-07-26 19:07:00 +0200
commit45a388771686fd791fc753fa877fc794b04d3c32 (patch)
treec1c6ac0075568e9e1a65b5fc87a6275319d92c99 /include
parentac6f0f9e72e1e723b13a2fa9e3ea78c950e8de10 (diff)
2011-06-30 Ivan Maidanski <ivmai@mail.ru>
* pthread_support.c (GC_segment_is_thread_stack): Replace '&' operator with '&&' one in conditional expressions. * specific.c (remove_specific): Dereference "entry" local variable only if it is non-NULL. * include/gc.h (GC_NEW): Refine the comment (about the returned value).
Diffstat (limited to 'include')
-rw-r--r--include/gc.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/gc.h b/include/gc.h
index 3e3f56e..ae7d046 100644
--- a/include/gc.h
+++ b/include/gc.h
@@ -717,7 +717,8 @@ GC_API void * GC_CALL GC_debug_realloc_replacement(void * /* object_addr */,
/* The following are included because they are often convenient, and */
/* reduce the chance for a misspecified size argument. But calls may */
/* expand to something syntactically incorrect if t is a complicated */
-/* type expression. */
+/* type expression. Note that, unlike C++ new operator, these ones */
+/* may return NULL (if out of memory). */
#define GC_NEW(t) ((t*)GC_MALLOC(sizeof(t)))
#define GC_NEW_ATOMIC(t) ((t*)GC_MALLOC_ATOMIC(sizeof(t)))
#define GC_NEW_STUBBORN(t) ((t*)GC_MALLOC_STUBBORN(sizeof(t)))