Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

use Data_Get_Struct instead of DATA_PTR

  • Loading branch information...
1 parent b08b3f7 commit 98524d3b70361d585d046b475ce2b72872df5d9b @timfel timfel committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 ext/yajl/yajl_ext.h
4 ext/yajl/yajl_ext.h
@@ -58,8 +58,8 @@ static ID intern_io_read, intern_call, intern_keys, intern_to_s,
intern_to_json, intern_has_key, intern_to_sym, intern_as_json;
static ID sym_allow_comments, sym_check_utf8, sym_pretty, sym_indent, sym_terminator, sym_symbolize_keys, sym_html_safe;
-#define GetParser(obj, sval) (sval = (yajl_parser_wrapper*)DATA_PTR(obj));
-#define GetEncoder(obj, sval) (sval = (yajl_encoder_wrapper*)DATA_PTR(obj));
+#define GetParser(obj, sval) Data_Get_Struct(obj, yajl_parser_wrapper, sval);
+#define GetEncoder(obj, sval) Data_Get_Struct(obj, yajl_encoder_wrapper, sval);
static void yajl_check_and_fire_callback(void * ctx);
static void yajl_set_static_value(void * ctx, VALUE val);

0 comments on commit 98524d3

Please sign in to comment.
Something went wrong with that request. Please try again.