summaryrefslogtreecommitdiff
path: root/Objects/unicodectype.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-06-04 13:01:30 +0000
committerGeorg Brandl <georg@python.org>2008-06-04 13:01:30 +0000
commita26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124 (patch)
tree4b3704507702b98e0ce4107403a72093a5d6b9fc /Objects/unicodectype.c
parentf954c4b9fb8529cc13a2e24c58137c66ac836b28 (diff)
downloadcpython-git-a26f8ca668d09eff8ab03ef3d1cddb9bfbc6d124.tar.gz
Revert r63934 -- it was mixing two patches.
Diffstat (limited to 'Objects/unicodectype.c')
-rw-r--r--Objects/unicodectype.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/Objects/unicodectype.c b/Objects/unicodectype.c
index 267962f319..911c53f65c 100644
--- a/Objects/unicodectype.c
+++ b/Objects/unicodectype.c
@@ -21,7 +21,6 @@
#define UPPER_MASK 0x80
#define XID_START_MASK 0x100
#define XID_CONTINUE_MASK 0x200
-#define NONPRINTABLE_MASK 0x400
typedef struct {
const Py_UNICODE upper;
@@ -676,26 +675,6 @@ int _PyUnicode_IsNumeric(Py_UNICODE ch)
return _PyUnicode_ToNumeric(ch) != -1.0;
}
-/* Returns 1 for Unicode characters to be hex-escaped when repr()ed,
- 0 otherwise.
- Characters defined in the Unicode character database as following
- categories are not considered printable.
- * Cc (Other, Control)
- * Cf (Other, Format)
- * Cs (Other, Surrogate)
- * Co (Other, Private Use)
- * Cn (Other, Not Assigned)
- * Zl Separator, Line ('\u2028', LINE SEPARATOR)
- * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR)
- * Zs (Separator, Space) other than ASCII space('\x20').
-*/
-int _PyUnicode_IsPrintable(Py_UNICODE ch)
-{
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
-
- return (ctype->flags & NONPRINTABLE_MASK) == 0;
-}
-
#ifndef WANT_WCTYPE_FUNCTIONS
/* Returns 1 for Unicode characters having the bidirectional type