Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 26358cc

Browse files
committed
Remove obsolete FAQ.
1 parent 6d57d21 commit 26358cc

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

Doc/faq/extending.rst

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -447,34 +447,3 @@ In Python 2.2, you can inherit from built-in classes such as :class:`int`,
447447
The Boost Python Library (BPL, http://www.boost.org/libs/python/doc/index.html)
448448
provides a way of doing this from C++ (i.e. you can inherit from an extension
449449
class written in C++ using the BPL).
450-
451-
452-
When importing module X, why do I get "undefined symbol: PyUnicodeUCS2*"?
453-
-------------------------------------------------------------------------
454-
455-
You are using a version of Python that uses a 4-byte representation for Unicode
456-
characters, but some C extension module you are importing was compiled using a
457-
Python that uses a 2-byte representation for Unicode characters (the default).
458-
459-
If instead the name of the undefined symbol starts with ``PyUnicodeUCS4``, the
460-
problem is the reverse: Python was built using 2-byte Unicode characters, and
461-
the extension module was compiled using a Python with 4-byte Unicode characters.
462-
463-
This can easily occur when using pre-built extension packages. RedHat Linux
464-
7.x, in particular, provided a "python2" binary that is compiled with 4-byte
465-
Unicode. This only causes the link failure if the extension uses any of the
466-
``PyUnicode_*()`` functions. It is also a problem if an extension uses any of
467-
the Unicode-related format specifiers for :c:func:`Py_BuildValue` (or similar) or
468-
parameter specifications for :c:func:`PyArg_ParseTuple`.
469-
470-
You can check the size of the Unicode character a Python interpreter is using by
471-
checking the value of sys.maxunicode:
472-
473-
>>> import sys
474-
>>> if sys.maxunicode > 65535:
475-
... print('UCS4 build')
476-
... else:
477-
... print('UCS2 build')
478-
479-
The only way to solve this problem is to use extension modules compiled with a
480-
Python binary built using the same size for Unicode characters.

0 commit comments

Comments
 (0)