diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-10-23 20:42:51 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-10-23 20:42:51 (GMT) |
commit | 26358cc403801eed9db9934823bbef7b16108d89 (patch) | |
tree | 7c28b9400a487262fb1ef858a78637025e01c8b6 /Doc/faq | |
parent | 6d57d212a89b38d31f6bca7b83cf789d8063f6f2 (diff) | |
download | cpython-26358cc403801eed9db9934823bbef7b16108d89.zip cpython-26358cc403801eed9db9934823bbef7b16108d89.tar.gz cpython-26358cc403801eed9db9934823bbef7b16108d89.tar.bz2 |
Remove obsolete FAQ.
Diffstat (limited to 'Doc/faq')
-rw-r--r-- | Doc/faq/extending.rst | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/Doc/faq/extending.rst b/Doc/faq/extending.rst index fa8e6e7..bbc322a 100644 --- a/Doc/faq/extending.rst +++ b/Doc/faq/extending.rst @@ -447,34 +447,3 @@ In Python 2.2, you can inherit from built-in classes such as :class:`int`, The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html) provides a way of doing this from C++ (i.e. you can inherit from an extension class written in C++ using the BPL). - - -When importing module X, why do I get "undefined symbol: PyUnicodeUCS2*"? -------------------------------------------------------------------------- - -You are using a version of Python that uses a 4-byte representation for Unicode -characters, but some C extension module you are importing was compiled using a -Python that uses a 2-byte representation for Unicode characters (the default). - -If instead the name of the undefined symbol starts with ``PyUnicodeUCS4``, the -problem is the reverse: Python was built using 2-byte Unicode characters, and -the extension module was compiled using a Python with 4-byte Unicode characters. - -This can easily occur when using pre-built extension packages. RedHat Linux -7.x, in particular, provided a "python2" binary that is compiled with 4-byte -Unicode. This only causes the link failure if the extension uses any of the -``PyUnicode_*()`` functions. It is also a problem if an extension uses any of -the Unicode-related format specifiers for :c:func:`Py_BuildValue` (or similar) or -parameter specifications for :c:func:`PyArg_ParseTuple`. - -You can check the size of the Unicode character a Python interpreter is using by -checking the value of sys.maxunicode: - - >>> import sys - >>> if sys.maxunicode > 65535: - ... print('UCS4 build') - ... else: - ... print('UCS2 build') - -The only way to solve this problem is to use extension modules compiled with a -Python binary built using the same size for Unicode characters. |