This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author bdirks
Recipients bdirks
Date 2013-03-15.22:18:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363385884.71.0.776131230148.issue17432@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2013-03-15 22:18:04bdirkssetrecipients: + bdirks
2013-03-15 22:18:04bdirkssetmessageid: <1363385884.71.0.776131230148.issue17432@psf.upfronthosting.co.za>
2013-03-15 22:18:04bdirkslinkissue17432 messages
2013-03-15 22:18:04bdirkscreate