Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ext/json/ext/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#if defined(RUBY_DEBUG) && RUBY_DEBUG
# define JSON_ASSERT RUBY_ASSERT
# ifndef JSON_DEBUG
# define JSON_DEBUG 1
# endif
#else
# ifdef JSON_DEBUG
# include <assert.h>
Expand All @@ -20,8 +23,18 @@
# endif
#endif

#ifdef JSON_DEBUG
# define JSON_UNREACHABLE_RETURN(val) rb_bug("Unreachable")
#else
# define JSON_UNREACHABLE_RETURN UNREACHABLE_RETURN
#endif

/* shims */

#ifndef UNDEF_P
#define UNDEF_P(val) (val == Qundef)
#endif

#if SIZEOF_UINT64_T == SIZEOF_LONG_LONG
# define INT64T2NUM(x) LL2NUM(x)
# define UINT64T2NUM(x) ULL2NUM(x)
Expand Down
Loading
Loading