* ext/json/parser/parser.rl (json_string_unescape): workaround fix
for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
67bf09903f
commit
c358a4cba1
@ -1,3 +1,9 @@
|
|||||||
|
Sun Jan 15 13:21:50 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/json/parser/parser.rl (json_string_unescape): workaround fix
|
||||||
|
for over optimization of GCC 4.7. [ruby-core:42085] [Bug #5888]
|
||||||
|
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51862
|
||||||
|
|
||||||
Sat Jan 14 22:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Sat Jan 14 22:24:09 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* ext/dl/callback/mkcallback.rb (gencallback): suppress unused
|
* ext/dl/callback/mkcallback.rb (gencallback): suppress unused
|
||||||
|
@ -1293,6 +1293,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
|||||||
{
|
{
|
||||||
char *p = string, *pe = string, *unescape;
|
char *p = string, *pe = string, *unescape;
|
||||||
int unescape_len;
|
int unescape_len;
|
||||||
|
char buf[4];
|
||||||
|
|
||||||
while (pe < stringEnd) {
|
while (pe < stringEnd) {
|
||||||
if (*pe == '\\') {
|
if (*pe == '\\') {
|
||||||
@ -1325,7 +1326,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
|||||||
if (pe > stringEnd - 4) {
|
if (pe > stringEnd - 4) {
|
||||||
return Qnil;
|
return Qnil;
|
||||||
} else {
|
} else {
|
||||||
char buf[4];
|
|
||||||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||||||
pe += 3;
|
pe += 3;
|
||||||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
||||||
|
@ -393,6 +393,7 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
|||||||
{
|
{
|
||||||
char *p = string, *pe = string, *unescape;
|
char *p = string, *pe = string, *unescape;
|
||||||
int unescape_len;
|
int unescape_len;
|
||||||
|
char buf[4];
|
||||||
|
|
||||||
while (pe < stringEnd) {
|
while (pe < stringEnd) {
|
||||||
if (*pe == '\\') {
|
if (*pe == '\\') {
|
||||||
@ -425,7 +426,6 @@ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
|
|||||||
if (pe > stringEnd - 4) {
|
if (pe > stringEnd - 4) {
|
||||||
return Qnil;
|
return Qnil;
|
||||||
} else {
|
} else {
|
||||||
char buf[4];
|
|
||||||
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
UTF32 ch = unescape_unicode((unsigned char *) ++pe);
|
||||||
pe += 3;
|
pe += 3;
|
||||||
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user