ruby-changes:10245
From: nobu <ko1@a...>
Date: Tue, 27 Jan 2009 10:16:03 +0900 (JST)
Subject: [ruby-changes:10245] Ruby:r21789 (trunk): * transcode.c (struct rb_transcoding): added ary member for debug.
nobu 2009-01-27 10:15:37 +0900 (Tue, 27 Jan 2009) New Revision: 21789 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21789 Log: * transcode.c (struct rb_transcoding): added ary member for debug. Modified files: trunk/ChangeLog trunk/transcode.c Index: ChangeLog =================================================================== --- ChangeLog (revision 21788) +++ ChangeLog (revision 21789) @@ -1,3 +1,7 @@ +Tue Jan 27 10:15:33 2009 Nobuyoshi Nakada <nobu@r...> + + * transcode.c (struct rb_transcoding): added ary member for debug. + Tue Jan 27 10:10:14 2009 Nobuyoshi Nakada <nobu@r...> * Doxyfile.in (FILE_VERSION_FILTER, INPUT_FILTER): should not use Index: transcode.c =================================================================== --- transcode.c (revision 21788) +++ transcode.c (revision 21789) @@ -71,6 +71,7 @@ union rb_transcoding_state_t { /* opaque data for stateful encoding */ void *ptr; + char ary[sizeof(double) > sizeof(void*) ? sizeof(double) : sizeof(void*)]; double dummy_for_alignment; } state; } rb_transcoding; @@ -89,7 +90,7 @@ #define TRANSCODING_STATE_EMBED_MAX sizeof(union rb_transcoding_state_t) #define TRANSCODING_STATE(tc) \ ((tc)->transcoder->state_size <= sizeof((tc)->state) ? \ - (void *)&(tc)->state : \ + (tc)->state.ary : \ (tc)->state.ptr) typedef struct { @@ -424,7 +425,6 @@ const unsigned char *in_stop, unsigned char *out_stop, rb_transcoding *tc, const int opt) - { const rb_transcoder *tr = tc->transcoder; int unitlen = tr->input_unit_length; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/