mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Patch #497126: Always compile dl.
This commit is contained in:
parent
7198a525f3
commit
93227275dc
4 changed files with 17 additions and 7 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue