summaryrefslogtreecommitdiff
path: root/Modules/dlmodule.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2002-01-01 20:18:30 +0000
committerMartin v. Löwis <martin@v.loewis.de>2002-01-01 20:18:30 +0000
commit342b5ea314de55489d35f34f70f56274ae9f7a15 (patch)
tree6834f3790fdca8fcbd962a6cb772acb30941140d /Modules/dlmodule.c
parent80b03ffbc9c4a8f08b2e6edd9225c28a78b66102 (diff)
downloadcpython-342b5ea314de55489d35f34f70f56274ae9f7a15.tar.gz
Patch #497126: Always compile dl.
Diffstat (limited to 'Modules/dlmodule.c')
-rw-r--r--Modules/dlmodule.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c
index 18b97d8584..46ae926a3a 100644
--- a/Modules/dlmodule.c
+++ b/Modules/dlmodule.c
@@ -158,6 +158,13 @@ dl_open(PyObject *self, PyObject *args)
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 @@ initdl(void)
{
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;