Patch #497126: Always compile dl.
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index 18b97d8..46ae926 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -158,6 +158,13 @@
char *name;
int mode;
PyUnivPtr *handle;
+ if (sizeof(int) != sizeof(long) ||
+ sizeof(long) != sizeof(char *)) {
+ PyErr_SetString(PyExc_SystemError,
+ "module dl requires sizeof(int) == sizeof(long) == sizeof(char*)");
+ return NULL;
+ }
+
if (PyArg_Parse(args, "z", &name))
mode = RTLD_LAZY;
else {
@@ -204,13 +211,6 @@
{
PyObject *m, *d, *x;
- if (sizeof(int) != sizeof(long) ||
- sizeof(long) != sizeof(char *)) {
- PyErr_SetString(PyExc_SystemError,
- "module dl requires sizeof(int) == sizeof(long) == sizeof(char*)");
- return;
- }
-
/* Initialize object type */
Dltype.ob_type = &PyType_Type;