mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Add unidata_version. Bump generator version number.
This commit is contained in:
parent
05ced6aa76
commit
b5c980b802
6 changed files with 19 additions and 5 deletions
|
|
@ -117,3 +117,10 @@ followed by the canonical composition.
|
||||||
\versionadded{2.3}
|
\versionadded{2.3}
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
In addition, the module exposes the following constant:
|
||||||
|
|
||||||
|
\begin{datadesc}{unidata_version}
|
||||||
|
The version of the Unicode database used in this module.
|
||||||
|
|
||||||
|
\versionadded{2.3}
|
||||||
|
\end{datadesc}
|
||||||
|
|
@ -881,6 +881,8 @@ initunicodedata(void)
|
||||||
if (!m)
|
if (!m)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
PyModule_AddStringConstant(m, "unidata_version", UNIDATA_VERSION);
|
||||||
|
|
||||||
/* Export C API */
|
/* Export C API */
|
||||||
v = PyCObject_FromVoidPtr((void *) &hashAPI, NULL);
|
v = PyCObject_FromVoidPtr((void *) &hashAPI, NULL);
|
||||||
if (v != NULL)
|
if (v != NULL)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
/* this file was generated by Tools/unicode/makeunicodedata.py 2.1 */
|
/* this file was generated by Tools/unicode/makeunicodedata.py 2.2 */
|
||||||
|
|
||||||
|
#define UNIDATA_VERSION "3.2.0"
|
||||||
/* a list of unique database records */
|
/* a list of unique database records */
|
||||||
const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {
|
const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {
|
||||||
{0, 0, 0, 0},
|
{0, 0, 0, 0},
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* this file was generated by Tools/unicode/makeunicodedata.py 2.1 */
|
/* this file was generated by Tools/unicode/makeunicodedata.py 2.2 */
|
||||||
|
|
||||||
#define NAME_MAXLEN 256
|
#define NAME_MAXLEN 256
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
/* this file was generated by Tools/unicode/makeunicodedata.py 2.1 */
|
/* this file was generated by Tools/unicode/makeunicodedata.py 2.2 */
|
||||||
|
|
||||||
/* a list of unique character type descriptors */
|
/* a list of unique character type descriptors */
|
||||||
const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
|
const _PyUnicode_TypeRecord _PyUnicode_TypeRecords[] = {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#
|
#
|
||||||
# (re)generate unicode property and type databases
|
# (re)generate unicode property and type databases
|
||||||
#
|
#
|
||||||
# this script converts a unicode 3.0 database file to
|
# this script converts a unicode 3.2 database file to
|
||||||
# Modules/unicodedata_db.h, Modules/unicodename_db.h,
|
# Modules/unicodedata_db.h, Modules/unicodename_db.h,
|
||||||
# and Objects/unicodetype_db.h
|
# and Objects/unicodetype_db.h
|
||||||
#
|
#
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
# 2002-10-18 mvl update to Unicode 3.2
|
# 2002-10-18 mvl update to Unicode 3.2
|
||||||
# 2002-10-22 mvl generate NFC tables
|
# 2002-10-22 mvl generate NFC tables
|
||||||
# 2002-11-24 mvl expand all ranges, sort names version-independently
|
# 2002-11-24 mvl expand all ranges, sort names version-independently
|
||||||
|
# 2002-11-25 mvl add UNIDATA_VERSION
|
||||||
#
|
#
|
||||||
# written by Fredrik Lundh (fredrik@pythonware.com)
|
# written by Fredrik Lundh (fredrik@pythonware.com)
|
||||||
#
|
#
|
||||||
|
|
@ -24,8 +25,10 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
SCRIPT = sys.argv[0]
|
SCRIPT = sys.argv[0]
|
||||||
VERSION = "2.1"
|
VERSION = "2.2"
|
||||||
|
|
||||||
|
# The Unicode Database
|
||||||
|
UNIDATA_VERSION = "3.2.0"
|
||||||
UNICODE_DATA = "UnicodeData.txt"
|
UNICODE_DATA = "UnicodeData.txt"
|
||||||
COMPOSITION_EXCLUSIONS = "CompositionExclusions.txt"
|
COMPOSITION_EXCLUSIONS = "CompositionExclusions.txt"
|
||||||
|
|
||||||
|
|
@ -192,6 +195,7 @@ def makeunicodedata(unicode, trace):
|
||||||
fp = open(FILE, "w")
|
fp = open(FILE, "w")
|
||||||
print >>fp, "/* this file was generated by %s %s */" % (SCRIPT, VERSION)
|
print >>fp, "/* this file was generated by %s %s */" % (SCRIPT, VERSION)
|
||||||
print >>fp
|
print >>fp
|
||||||
|
print >>fp, '#define UNIDATA_VERSION "%s"' % UNIDATA_VERSION
|
||||||
print >>fp, "/* a list of unique database records */"
|
print >>fp, "/* a list of unique database records */"
|
||||||
print >>fp, \
|
print >>fp, \
|
||||||
"const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {"
|
"const _PyUnicode_DatabaseRecord _PyUnicode_Database_Records[] = {"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue