[pypy-svn] pypy ootype-virtualrefs: add an lltype implementation for numeric_formatting
antocuni
commits-noreply at bitbucket.org
Fri Apr 8 12:05:33 CEST 2011
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: ootype-virtualrefs
Changeset: r43212:0be5a3620529
Date: 2011-04-08 11:12 +0200
http://bitbucket.org/pypy/pypy/changeset/0be5a3620529/
Log: add an lltype implementation for numeric_formatting
diff --git a/pypy/rlib/rlocale.py b/pypy/rlib/rlocale.py
--- a/pypy/rlib/rlocale.py
+++ b/pypy/rlib/rlocale.py
@@ -168,6 +168,9 @@
def numeric_formatting():
"""Specialized function to get formatting for numbers"""
+ return numeric_formatting_impl()
+
+def numeric_formatting_impl():
conv = localeconv()
decimal_point = rffi.charp2str(conv.c_decimal_point)
thousands_sep = rffi.charp2str(conv.c_thousands_sep)
@@ -178,6 +181,7 @@
return '.', '', ''
register_external(numeric_formatting, [], (str, str, str),
+ llimpl=numeric_formatting_impl,
ooimpl=oo_numeric_formatting)
More information about the Pypy-commit
mailing list