From: David Kastrup <dak@gnu.org>
Date: Wed, 3 Sep 2014 14:43:21 +0000 (+0200)
Subject: Issue 4091: Lexer: don't go through int for fractions
X-Git-Tag: release/2.19.14-1~28
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=4198e92fc79905c4578fcf853573be5ada36a4d8;p=lilypond.git

Issue 4091: Lexer: don't go through int for fractions

GUILE can deal fine with things like
\void \displayScheme 6563546345635436/3654635463456
if one does not route through C code.
---

diff --git a/lily/lexer.ll b/lily/lexer.ll
index 0c364c1bb2..1ec3efd2df 100644
--- a/lily/lexer.ll
+++ b/lily/lexer.ll
@@ -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