Commit Graph

22 Commits

Author SHA1 Message Date
Antoine Pitrou c7c96a90bc Recorded merge of revisions 81029 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines

  Untabify C files. Will watch buildbots.
........
2010-05-09 15:15:40 +00:00
Mark Hammond a942cc0e77 Merged revisions 69038 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69038 | mark.hammond | 2009-01-28 10:12:23 +1100 (Wed, 28 Jan 2009) | 3 lines

  On Windows, use the Python 'Activation Context' when loading extensions
  to avoid problems loading the CRT from a private assembly.  Via bug 4566.
........
2009-01-27 23:30:15 +00:00
Christian Heimes b2302ba977 Applied #1069410
The "can't load dll" message box on Windows is suppressed while an extension is loaded by calling SetErrorMode in dynload_win.c. The error is still reported properly.
2008-01-23 17:15:06 +00:00
Christian Heimes 123d5c9396 Moved include "Python.h" in front of other imports to silence a warning. 2008-01-04 03:15:05 +00:00
Amaury Forgeot d'Arc e0b7695286 Partial port of r59682 from py3k.
On Windows, when import fails to load a dll module, the message says
"error code 193" instead of a more informative text.

It turns out that FormatMessage needs additional parameters for some error codes.
For example: 193 means "%1 is not a valid Win32 application".
Since it is impossible to know which parameter to pass, we use
FORMAT_MESSAGE_IGNORE_INSERTS to get the raw message, which is still better
than the number.
2008-01-04 02:04:15 +00:00
Kristján Valur Jónsson 629ec26f63 Include <windows.h> after python.h, so that WINNT is properly set before windows.h is included. Fixes warnings in PC builds. 2007-05-26 19:31:39 +00:00
Kristján Valur Jónsson f371cb1694 Remove obsolete comment. Importing of .dll files has been discontinued, only .pyd files supported on windows now. 2007-04-25 00:19:26 +00:00
Martin v. Löwis 0e8bd7e1cc Patch #1495999: Part two of Windows CE changes.
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
2006-06-10 12:23:46 +00:00
Martin v. Löwis c95dd9488a Disable .DLL as an extension for extension modules. 2006-04-04 07:04:07 +00:00
Thomas Heller 1df04617b7 When importing an extension on Windows, the code reads the PE 'import
table' of the dll, to make sure that the dll really was build for the
correct Python version.  It does this by looking for an entry
'pythonXY.dll' (X.Y is the Python version number).

The code now checks the size of the dll's import table before reading
entries from it.  Before this patch, the code crashed trying to read
the import table when the size was zero (as in Win2k's wmi.dll, for
example).

Look for imports of 'pythonXY_d.dll' in a debug build instead of
'pythonXY.dll'.

Fixes SF 951851: Crash when reading "import table" of certain windows dlls.

Already backported to the 2.3 branch.
2004-07-02 08:53:57 +00:00
Fred Drake e20131efc3 Fix a couple of whitespace consistency nits. 2002-08-26 21:20:30 +00:00
Martin v. Löwis 6238d2b024 Patch #569753: Remove support for WIN16.
Rename all occurrences of MS_WIN32 to MS_WINDOWS.
2002-06-30 15:26:10 +00:00
Jeremy Hylton 518ab1c02a Use PyOS_snprintf instead of sprintf. 2001-11-28 20:42:20 +00:00
Marc-André Lemburg d4c0a9c59b Fixes for possible buffer overflows in sprintf() usages. 2001-11-28 11:47:00 +00:00
Mark Hammond fb1f68ed7c Always pass a full path name to LoadLibraryEx(). Fixes some Windows 9x problems. As discussed on python-dev 2001-05-09 00:50:59 +00:00
Mark Hammond 1f7838bcc0 Detect conflicting Python DLL on module import under Windows - as per [ Patch #101676 ] 2000-10-05 10:54:45 +00:00
Guido van Rossum 8586991099 REMOVED all CWI, CNRI and BeOpen copyright markings.
This should match the situation in the 1.6b1 tree.
2000-09-01 23:29:29 +00:00
Guido van Rossum ffcc3813d8 Change copyright notice - 2nd try. 2000-06-30 23:58:06 +00:00
Guido van Rossum fd71b9e9d4 Change copyright notice. 2000-06-30 23:50:40 +00:00
Guido van Rossum 582acece2e Trent Mick's Win64 changes: size_t vs. int or long; also some overflow
tests.
2000-06-28 22:07:35 +00:00
Guido van Rossum 96a8fb7e99 Cleanup patches from Greg Stein:
* in import.c, #ifdef out references to dynamic loading based on
  HAVE_DYNAMIC_LOADING

* clean out the platform-specific crud from importdl.c.
  [ maybe fold this function into import.c and drop the importdl.c file? Greg.]

* change GetDynLoadFunc's "funcname" parameter to "shortname". change
  "name" to "fqname" for clarification.

* each GetDynLoadFunc now creates its own funcname value.

  WARNING: as I mentioned previously, we may run into an issue with a
  missing "_" on some platforms. Testing will show this pretty quickly,
  however.

* move pathname munging into dynload_shlib.c
1999-12-22 14:09:35 +00:00
Guido van Rossum 22a1d3671b The old platform-specific contents of importdl.c, broken down into one
file per platform (really: per style of Dl API; e.g. all platforms
using dlopen() are grouped together in dynload_shlib.c.).

This is part of a set of patches by Greg Stein.
1999-12-20 21:18:49 +00:00