Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4254e763
Commit
4254e763
authored
Jun 05, 2007
by
Walter Dörwald
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change category(), bidirectional(), east_asian_width(),
decomposition() and name() to return unicode strings.
parent
0bbd8abe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
Modules/unicodedata.c
Modules/unicodedata.c
+6
-6
No files found.
Modules/unicodedata.c
View file @
4254e763
...
...
@@ -258,7 +258,7 @@ unicodedata_category(PyObject *self, PyObject *args)
if
(
old
->
category_changed
!=
0xFF
)
index
=
old
->
category_changed
;
}
return
Py
String
_FromString
(
_PyUnicode_CategoryNames
[
index
]);
return
Py
Unicode
_FromString
(
_PyUnicode_CategoryNames
[
index
]);
}
PyDoc_STRVAR
(
unicodedata_bidirectional__doc__
,
...
...
@@ -290,7 +290,7 @@ unicodedata_bidirectional(PyObject *self, PyObject *args)
else
if
(
old
->
bidir_changed
!=
0xFF
)
index
=
old
->
bidir_changed
;
}
return
Py
String
_FromString
(
_PyUnicode_BidirectionalNames
[
index
]);
return
Py
Unicode
_FromString
(
_PyUnicode_BidirectionalNames
[
index
]);
}
PyDoc_STRVAR
(
unicodedata_combining__doc__
,
...
...
@@ -379,7 +379,7 @@ unicodedata_east_asian_width(PyObject *self, PyObject *args)
if
(
old
->
category_changed
==
0
)
index
=
0
;
/* unassigned */
}
return
Py
String
_FromString
(
_PyUnicode_EastAsianWidthNames
[
index
]);
return
Py
Unicode
_FromString
(
_PyUnicode_EastAsianWidthNames
[
index
]);
}
PyDoc_STRVAR
(
unicodedata_decomposition__doc__
,
...
...
@@ -411,7 +411,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args)
if
(
self
)
{
const
change_record
*
old
=
get_old_record
(
self
,
*
PyUnicode_AS_UNICODE
(
v
));
if
(
old
->
category_changed
==
0
)
return
Py
String
_FromString
(
""
);
/* unassigned */
return
Py
Unicode
_FromString
(
""
);
/* unassigned */
}
if
(
code
<
0
||
code
>=
0x110000
)
...
...
@@ -450,7 +450,7 @@ unicodedata_decomposition(PyObject *self, PyObject *args)
decomp
[
i
]
=
'\0'
;
return
Py
String
_FromString
(
decomp
);
return
Py
Unicode
_FromString
(
decomp
);
}
static
void
...
...
@@ -1063,7 +1063,7 @@ unicodedata_name(PyObject* self, PyObject* args)
}
}
return
Py
_BuildValue
(
"s"
,
name
);
return
Py
Unicode_FromString
(
name
);
}
PyDoc_STRVAR
(
unicodedata_lookup__doc__
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment