[Python-checkins] r71543 - python/branches/py3k-short-float-repr/Objects/stringlib/formatter.h
eric.smith
python-checkins at python.org
Mon Apr 13 01:16:43 CEST 2009
Author: eric.smith
Date: Mon Apr 13 01:16:42 2009
New Revision: 71543
Log:
Removed unused member of LocaleInfo. Improved comments.
Modified:
python/branches/py3k-short-float-repr/Objects/stringlib/formatter.h
Modified: python/branches/py3k-short-float-repr/Objects/stringlib/formatter.h
==============================================================================
--- python/branches/py3k-short-float-repr/Objects/stringlib/formatter.h (original)
+++ python/branches/py3k-short-float-repr/Objects/stringlib/formatter.h Mon Apr 13 01:16:42 2009
@@ -253,11 +253,6 @@
before and including the decimal. Note that locales only support
8-bit chars, not unicode. */
typedef struct {
- int type; /* One of the LT_* codes. Having this here is just
- an optimization for the common case of not
- using any locale info (LT_NO_LOCALE). It could
- really be inferred just by looking at the
- following fields.*/
char *decimal_point;
char *thousands_sep;
char *grouping;
@@ -522,7 +517,6 @@
static void
get_locale_info(int type, LocaleInfo *locale_info)
{
- locale_info->type = type;
switch (type) {
case LT_CURRENT_LOCALE: {
struct lconv *locale_data = localeconv();
@@ -534,7 +528,9 @@
case LT_DEFAULT_LOCALE:
locale_info->decimal_point = ".";
locale_info->thousands_sep = ",";
- locale_info->grouping = "\3"; /* every 3 characters, trailing 0 means repeat */
+ locale_info->grouping = "\3"; /* Group every 3 characters,
+ trailing 0 means repeat
+ infinitely. */
break;
case LT_NO_LOCALE:
locale_info->decimal_point = ".";
More information about the Python-checkins
mailing list