Skip to content

Commit

Permalink
Add static inline func for doing a VM-null check.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Apr 29, 2014
1 parent 0487e37 commit 2de460c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/6model/reprs/MVMNull.h
Expand Up @@ -5,3 +5,8 @@ struct MVMNull {

/* Function for REPR setup. */
const MVMREPROps * MVMNull_initialize(MVMThreadContext *tc);

/* Macro for VM null checks. */
MVM_STATIC_INLINE MVMint64 MVM_is_null(MVMThreadContext *tc, MVMObject *check) {
return !check || check == tc->instance->VMNull;
}

0 comments on commit 2de460c

Please sign in to comment.