[Gc] Determining if pointer GC allocated
Hans Aberg
haberg-1 at telia.com
Wed Dec 28 13:29:07 PST 2011
On 27 Dec 2011, at 15:29, Ivan Maidanski wrote:
> Looks reasonable to me. Please provide a patch (I guess GC_is_heap_ptr as a candidate name would be ok.)
The semantics should just be, in C++ code,
inline bool GC_is_heap_ptr(void* xp) { return GC_base(xp) != nullptr; }
Perhaps a developer of the GC package do a suitable version. (Only C99 has inline functions and bool, and nullptr is C++11.)
Hans
More information about the Gc
mailing list