New submission from Bill Dirks:
This issue was discovered in 3.3.0 on Windows. Haven't looked at other versions.
Using the Limited API, the PyUnicode_Xxxx() functions are not accessible. A
simple demonstration of the problem:
HMODULE p3 = ::LoadLibraryA("C:\\Python33\\DLLs\\python3.dll");
FARPROC f;
f = GetProcAddress(p3, "Py_IsInitialized"); // works
f = GetProcAddress(p3, "PyImport_AppendInittab"); // works, and so on
f = GetProcAddress(p3, "PyUnicode_FromString"); // fails
f = GetProcAddress(p3, "PyUnicode_FromFormat"); // fails
f = GetProcAddress(p3, "PyUnicode_FromStringAndSize"); // fails, and so on
::FreeLibrary(p3);
After some digging I found that python3.dll refers all of its exports on to
python33.dll, and the problem exports all have the form:
PyUnicode_Xxxx -> python33.PyUnicodeUCS2_Xxxx
but python33.dll does not export any PyUnicodeUCS2_ symbols, confirmed by the
Dependency Walker tool.
Any Limited API extension using PyUnicode_ functions will compile and link, but
fail at runtime. If I understand the problem, the fix is just to correct the
.def file.
--
components: Windows
messages: 184268
nosy: bdirks
priority: normal
severity: normal
status: open
title: PyUnicode_ functions not accessible in Limited API on Windows
type: behavior
versions: Python 3.3
___
Python tracker
<http://bugs.python.org/issue17432>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com