[前][次][番号順一覧][スレッド一覧]

ruby-changes:36967

From: nobu <ko1@a...>
Date: Mon, 29 Dec 2014 01:51:10 +0900 (JST)
Subject: [ruby-changes:36967] nobu:r49048 (trunk): generator.h: use GET_STATE_TO

nobu	2014-12-29 01:50:55 +0900 (Mon, 29 Dec 2014)

  New Revision: 49048

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=49048

  Log:
    generator.h: use GET_STATE_TO
    
    * ext/json/generator/generator.h (GENERATE_JSON): use GET_STATE_TO
      macro, instead of TypedData_Get_Struct directly.

  Modified files:
    trunk/ext/json/generator/generator.h
Index: ext/json/generator/generator.h
===================================================================
--- ext/json/generator/generator.h	(revision 49047)
+++ ext/json/generator/generator.h	(revision 49048)
@@ -92,7 +92,7 @@ typedef struct JSON_Generator_StateStruc https://github.com/ruby/ruby/blob/trunk/ext/json/generator/generator.h#L92
                                                                                                 \
     rb_scan_args(argc, argv, "01", &Vstate);                                                    \
     Vstate = cState_from_state_s(cState, Vstate);                                               \
-    TypedData_Get_Struct(Vstate, JSON_Generator_State, &JSON_Generator_State_type, state);	\
+    GET_STATE_TO(Vstate, state);								\
     buffer = cState_prepare_buffer(Vstate);                                                     \
     generate_json_##type(buffer, Vstate, state, self);                                          \
     return fbuffer_to_s(buffer)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]