This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: dl module and flags
Type: Stage:
Components: None Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: loewis, niemeyer
Priority: normal Keywords:

Created on 2001-12-27 19:58 by niemeyer, last changed 2022-04-10 16:04 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
python-2.2-dlmodule.patch niemeyer, 2001-12-29 22:23
Messages (6)
msg8507 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2001-12-27 19:58
With the introduction of sys.setdlopenflags, the dl 
module got some special usefulness, carrying the 
flags used in this function. On the other hand, the 
dl module is not available on every platform where 
dlopen is. Alpha, for example, is not able to import 
the dl module because sizeof(int) is not equal to 
sizeof(long), as the assertion in initdl() ensures.

I can think about two obvious solutions:

a) Move RTLD_* flags to some standard module (sys?)

b) Make some of the functionality in dlmodule.c 
optional, instead of the whole module.

msg8508 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2001-12-28 19:59
Logged In: YES 
user_id=21627

If you need dlfcn.h constants without having the dl module,
you need to run h2py for dlfcn.h. Moving the constants to
sys is not acceptable.

OTOH, allowing to use dlmodule on all systems seems
reasonable. I believe the problem is that dl.call uses a
function type that has all arguments "long", and still
allows to pass char* and int. So moving the test into
dl_call might be appropriate. Would you like to prepare a patch?
msg8509 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2001-12-28 20:35
Logged In: YES 
user_id=7887

Sure... I'll build a patch and let you know.

Thanks!
msg8510 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2001-12-29 22:23
Logged In: YES 
user_id=7887

It's ready!! I've attached it to this bug.
 
Please, let me know if any change is needed.

Thanks!
msg8511 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2001-12-29 23:28
Logged In: YES 
user_id=21627

Looks fine; I'll apply it shortly.
msg8512 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-01-01 20:20
Logged In: YES 
user_id=21627

Thanks again for the patch, applied as

setup.py 1.74
ACKS 1.154
NEWS 1.344
dlmodule.c 2.19
History
Date User Action Args
2022-04-10 16:04:50adminsetgithub: 35838
2001-12-27 19:58:14niemeyercreate