[handle] Add mono_handle_obj_is_null utility function
authorLudovic Henry <ludovic@xamarin.com>
Wed, 6 Jan 2016 14:24:35 +0000 (14:24 +0000)
committerAleksey Kliger <aleksey@xamarin.com>
Thu, 14 Jan 2016 16:38:13 +0000 (11:38 -0500)
mono/metadata/handle.h

index 3c132f8acf0ff90ac8bd4796b64998e2825b168e..5b67baf68924c90b8d8d8d787cd6aafda673a339 100644 (file)
@@ -124,6 +124,8 @@ mono_handle_domain (MonoHandle handle)
        return mono_object_get_domain (handle->obj);
 }
 
+#define mono_handle_obj_is_null(handle) ((handle)->obj == NULL)
+
 #define MONO_HANDLE_TYPE_DECL(type)      typedef struct { type *obj; } type ## HandleStorage ; \
        typedef type ## HandleStorage * type ## Handle
 #define MONO_HANDLE_TYPE(type)           type ## Handle