[Python-bugs-list] [ python-Bugs-497126 ] dl module and flags

noreply@sourceforge.net noreply@sourceforge.net
Sat, 29 Dec 2001 15:28:36 -0800


Bugs item #497126, was opened at 2001-12-27 11:58
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497126&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gustavo Niemeyer (niemeyer)
>Assigned to: Martin v. Löwis (loewis)
Summary: dl module and flags

Initial Comment:
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.



----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-12-29 15:28

Message:
Logged In: YES 
user_id=21627

Looks fine; I'll apply it shortly.

----------------------------------------------------------------------

Comment By: Gustavo Niemeyer (niemeyer)
Date: 2001-12-29 14:23

Message:
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!


----------------------------------------------------------------------

Comment By: Gustavo Niemeyer (niemeyer)
Date: 2001-12-28 12:35

Message:
Logged In: YES 
user_id=7887

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

Thanks!


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-12-28 11:59

Message:
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?

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=497126&group_id=5470