A
Alf P. Steinbach /Usenet
* Martin v. Loewis, on 07.07.2010 21:56:
The main problem that the required MSVC redistributables are not necessarily
present on the end user's system.
Oh.
Well then.
Cheers,
- Alf
I was guessing that at one time there was no PyMem_Malloc. And that it
was introduced to fix Windows-specific problems, but inadvertently
without updating the macro. It's just a guess as to reasons why the
macro uses malloc directly.
It might indeed be that the function version was introduced specifically
for Windows. However, the macro was left intentionally: both for
backwards compatibility, and for use inside Python itself.
[...]Except for the problems with file descriptors I think a practical
interim solution for extensions implemented in C could be to just link
the runtime lib statically.
When I wrote "link the runtime lib statically" that was an alternative
to the usual link-as-DLL.
Ok, I lost the thread. When you said "a practical interim solution"
you were talking about what problem? I thought the discussion was
about the need to link with the same DLL version as Python.
The main problem that the required MSVC redistributables are not necessarily
present on the end user's system.
However, it would surely make sense to link with a different DLL than
the one that Python links with, assuming that would actually work.
It's actually straight-forward (or used to be, until they came up with
the SxS madness). It was actually the case that people did so
unexpectingly, and it seemed to work fine, except that it crashed when
passing FILE*. Then we started explaining that mixing CRTs is risky.
Oh.
Well then.
Cheers,
- Alf