Skip to content

Instantly share code, notes, and snippets.

@syohex
Created October 24, 2012 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syohex/3944470 to your computer and use it in GitHub Desktop.
Save syohex/3944470 to your computer and use it in GitHub Desktop.
Use Perl atof instead of JSON::XS
diff --git a/XS.xs b/XS.xs
index c140314..3c96065 100644
--- a/XS.xs
+++ b/XS.xs
@@ -1227,7 +1227,7 @@ decode_num (dec_t *dec)
}
// loss of precision here
- return newSVnv (json_atof (start));
+ return newSVnv (Atof (start));
fail:
return 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment