]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4091: Lexer: don't go through int for fractions
authorDavid Kastrup <dak@gnu.org>
Wed, 3 Sep 2014 14:43:21 +0000 (16:43 +0200)
committerDavid Kastrup <dak@gnu.org>
Mon, 8 Sep 2014 07:28:02 +0000 (09:28 +0200)
GUILE can deal fine with things like
\void \displayScheme 6563546345635436/3654635463456
if one does not route through C code.

lily/lexer.ll

index 0c364c1bb20443c148de9a5e7851740aca5ebb3e..1ec3efd2df2c9a1f9ffac88934645596b4d44500 100644 (file)
@@ -69,7 +69,6 @@ using namespace std;
 #include "pitch.hh"
 #include "source-file.hh"
 #include "std-string.hh"
-#include "string-convert.hh"
 #include "version.hh"
 #include "warn.hh"
 
@@ -1316,9 +1315,8 @@ scan_fraction (string frac)
        string left = frac.substr (0, i);
        string right = frac.substr (i + 1, (frac.length () - i + 1));
 
-       int n = String_convert::dec2int (left);
-       int d = String_convert::dec2int (right);
-       return scm_cons (scm_from_int (n), scm_from_int (d));
+       return scm_cons (scm_c_read_string (left.c_str ()),
+                        scm_c_read_string (right.c_str ()));
 }
 
 SCM