35 Commits

Author SHA1 Message Date
Andrew M. Kuchling
a2a1661554 [Backport r51226 | neal.norwitz]
I'm not sure why this code allocates this string for the error message.
I think it would be better to always use snprintf and have the format
limit the size of the name appropriately (like %.200s).

Klocwork #340
2006-10-04 13:12:26 +00:00
Andrew M. Kuchling
cc17b6f005 [Backport r50858 | neal.norwitz]
No functional change.  Add comment and assert to describe why there
cannot be overflow which was reported by Klocwork.  Discussed on
python-dev.
2006-10-03 19:27:00 +00:00
Martin v. Löwis
410a432579 Patch #1213831: Fix typo in unicodedata._getcode. 2005-09-18 08:18:51 +00:00
Hye-Shik Chang
e9ddfbb412 SF #989185: Drop unicode.iswide() and unicode.width() and add
unicodedata.east_asian_width().  You can still implement your own
simple width() function using it like this:
    def width(u):
        w = 0
        for c in unicodedata.normalize('NFC', u):
            cwidth = unicodedata.east_asian_width(c)
            if cwidth in ('W', 'F'): w += 2
            else: w += 1
        return w
2004-08-04 07:38:35 +00:00
Hye-Shik Chang
69dc1c8f6a Fix typo. 2004-07-15 04:30:25 +00:00
Martin v. Löwis
61e40bd897 Special case normalization of empty strings. Fixes #924361.
Backported to 2.3.
2004-04-17 19:36:48 +00:00
Martin v. Löwis
d2171d2ba4 Overallocate target buffer for normalization more early. Fixes #834676.
Backported to 2.3.
2003-11-06 20:47:57 +00:00
Neal Norwitz
e9c571f968 Fix SF bug #694816, remove comparison of unsigned value < 0 2003-02-28 03:14:37 +00:00
Martin v. Löwis
2fb661fb80 Remove C++ comment. 2002-12-07 14:56:36 +00:00
Martin v. Löwis
b5c980b802 Add unidata_version. Bump generator version number. 2002-11-25 09:13:37 +00:00
Martin v. Löwis
8d93ca1383 Verify that the code in CJK UNIFIED IDEOGRAPH- actually denotes an ideograph. 2002-11-23 22:10:29 +00:00
Martin v. Löwis
677bde2dd1 Patch #626485: Support Unicode normalization. 2002-11-23 22:08:15 +00:00
Martin v. Löwis
ef7fe2e813 Implement names for CJK unified ideographs. Add name to KeyError output.
Verify that the lookup for an existing name succeeds.
2002-11-23 18:01:32 +00:00
Martin v. Löwis
2f4be4e38a Fix off-by-one error. 2002-11-23 17:11:06 +00:00
Martin v. Löwis
7d41e29c58 Patch #626548: Support Hangul syllable names. 2002-11-23 12:22:32 +00:00
Martin v. Löwis
9def6a3a77 Update to Unicode 3.2 database. 2002-10-18 16:11:54 +00:00
Mark Hammond
62b1ab1b31 Replace DL_IMPORT with PyMODINIT_FUNC and remove "/export:init..." link
command line for Windows builds.  This should allow MSVC to import and
build the Python MSVC6 project files without error.
2002-07-23 06:31:15 +00:00
Martin v. Löwis
14f8b4cfcb Patch #568124: Add doc string macros. 2002-06-13 20:33:02 +00:00
Andrew MacIntyre
74a3bec592 _Py prefix is verboten for static entry points 2002-06-13 11:55:14 +00:00
Fred Drake
a2bd8d3816 Remove direct manipulation of the module dict. 2002-04-03 21:39:26 +00:00
Andrew MacIntyre
7bf6833e17 OS/2 EMX port changes (Modules part of patch #450267):
Modules/
    _hotshot.c
    dbmmodule.c
    fcntlmodule.c
    main.c
    pwdmodule.c
    readline.c
    selectmodule.c
    signalmodule.c
    termios.c
    timemodule.c
    unicodedata.c
2002-03-03 02:59:16 +00:00
Tim Peters
69b83b113f unicodedata_decomposition(): sprintf -> PyOS_snprintf. 2001-11-30 07:23:05 +00:00
Fred Drake
6a16ea07b8 Kill a warning on the SGI compiler.
This is part of SF patch #434992.
2001-07-19 21:11:13 +00:00
Fred Drake
f585bef504 Be a bit more strict in setting up the export of the C API for this
module; do not attempt to insert the API object into the module dict
if there was an error creating it.
2001-03-03 19:41:55 +00:00
Fredrik Lundh
b95896b2d2 renamed internal functions to avoid name clashes under OpenVMS
(fixes bug #132815)
2001-02-18 22:06:17 +00:00