diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 03:38:59 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-09-06 03:38:59 +0000 |
| commit | a7569aa360319b287098eb17e018492b6bf5a4e6 (patch) | |
| tree | 65322a3c461eba335b24f7030f2ba81bdc2f69c3 | |
| parent | 2fc36b1645051f58ef56e0ac008be9f5eebc3237 (diff) | |
| download | ruby-a7569aa360319b287098eb17e018492b6bf5a4e6.tar.gz ruby-a7569aa360319b287098eb17e018492b6bf5a4e6.tar.xz ruby-a7569aa360319b287098eb17e018492b6bf5a4e6.zip | |
* transcode.c (rb_econv_open): test condition simplified.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@19175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | transcode.c | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -1,3 +1,7 @@ +Sat Sep 6 12:38:34 2008 Tanaka Akira <akr@fsij.org> + + * transcode.c (rb_econv_open): test condition simplified. + Sat Sep 6 12:25:31 2008 Tanaka Akira <akr@fsij.org> * transcode.c (stateless_encoding_i): ignore supplemental conversions. diff --git a/transcode.c b/transcode.c index 5c9e7d826..d77974132 100644 --- a/transcode.c +++ b/transcode.c @@ -928,8 +928,7 @@ rb_econv_open(const char *sname, const char *dname, int ecflags) return NULL; } - if ((!*sname || (senc && rb_enc_asciicompat(senc))) && - (ecflags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER))) { + if (ecflags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER)) { const char *name = (ecflags & ECONV_CRLF_NEWLINE_ENCODER) ? "crlf_newline" : "cr_newline"; transcoder_entry_t *e = get_transcoder_entry("", name); if (ecflags & ECONV_CRLF_NEWLINE_ENCODER) @@ -949,8 +948,7 @@ rb_econv_open(const char *sname, const char *dname, int ecflags) ecflags &= ~(ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER); } - if ((!*dname || (denc && rb_enc_asciicompat(denc))) && - (ecflags & ECONV_UNIVERSAL_NEWLINE_DECODER)) { + if (ecflags & ECONV_UNIVERSAL_NEWLINE_DECODER) { transcoder_entry_t *e = get_transcoder_entry("universal_newline", ""); if (!e) { xfree(entries); |
