diff options
author | Guido van Rossum <guido@python.org> | 2007-08-07 23:59:30 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-08-07 23:59:30 (GMT) |
commit | a9769c26a35d788f44fa7ed4f3652a156055fb45 (patch) | |
tree | e82419b0bff0f65fac3ab24b6c8bfbf0a472ee7b /Modules/_csv.c | |
parent | 75c26bc6a78169bf621885fa91b0d8f93241e682 (diff) | |
download | cpython-a9769c26a35d788f44fa7ed4f3652a156055fb45.zip cpython-a9769c26a35d788f44fa7ed4f3652a156055fb45.tar.gz cpython-a9769c26a35d788f44fa7ed4f3652a156055fb45.tar.bz2 |
Fix the last remaining test_csv failure.
We were using T_CHAR for a UNICODE character.
(This happened to work on x86 most of the time due to endianness;
but not on PPC.)
Diffstat (limited to 'Modules/_csv.c')
-rw-r--r-- | Modules/_csv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index b0acc58..0df85b6 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -186,6 +186,12 @@ Dialect_get_lineterminator(DialectObj *self) } static PyObject * +Dialect_get_delimiter(DialectObj *self) +{ + return get_nullchar_as_None(self->delimiter); +} + +static PyObject * Dialect_get_escapechar(DialectObj *self) { return get_nullchar_as_None(self->escapechar); @@ -292,7 +298,6 @@ dialect_check_quoting(int quoting) #define D_OFF(x) offsetof(DialectObj, x) static struct PyMemberDef Dialect_memberlist[] = { - { "delimiter", T_CHAR, D_OFF(delimiter), READONLY }, { "skipinitialspace", T_INT, D_OFF(skipinitialspace), READONLY }, { "doublequote", T_INT, D_OFF(doublequote), READONLY }, { "strict", T_INT, D_OFF(strict), READONLY }, @@ -300,6 +305,7 @@ static struct PyMemberDef Dialect_memberlist[] = { }; static PyGetSetDef Dialect_getsetlist[] = { + { "delimiter", (getter)Dialect_get_delimiter}, { "escapechar", (getter)Dialect_get_escapechar}, { "lineterminator", (getter)Dialect_get_lineterminator}, { "quotechar", (getter)Dialect_get_quotechar}, |