diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2002-01-01 20:18:30 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2002-01-01 20:18:30 +0000 |
commit | 93227275dcf18196c1b81a3c884dbd2e78c8f440 (patch) | |
tree | 38fac8a0362ab5455ca290de83ab65b59fb9a06c /Modules/dlmodule.c | |
parent | Patch #494783: Rename cmp_op enumerators. (diff) | |
download | cpython-93227275dcf18196c1b81a3c884dbd2e78c8f440.tar.gz cpython-93227275dcf18196c1b81a3c884dbd2e78c8f440.tar.bz2 cpython-93227275dcf18196c1b81a3c884dbd2e78c8f440.zip |
Patch #497126: Always compile dl.
Diffstat (limited to 'Modules/dlmodule.c')
-rw-r--r-- | Modules/dlmodule.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Modules/dlmodule.c b/Modules/dlmodule.c index 18b97d8584e..46ae926a3a0 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; |