* transcode.c (struct rb_transcoding): added ary member for debug.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21789 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-01-27 01:15:37 +00:00
parent 7788bbfaf5
commit 882cb2e37d
2 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Tue Jan 27 10:15:33 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* transcode.c (struct rb_transcoding): added ary member for debug.
Tue Jan 27 10:10:14 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* Doxyfile.in (FILE_VERSION_FILTER, INPUT_FILTER): should not use

View File

@ -71,6 +71,7 @@ typedef struct rb_transcoding {
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 @@ typedef struct rb_transcoding {
#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 @@ transcode_restartable0(const unsigned char **in_pos, unsigned char **out_pos,
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;