Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
342b5ea3
Commit
342b5ea3
authored
Jan 01, 2002
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #497126: Always compile dl.
parent
80b03ffb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
7 deletions
+17
-7
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS
Misc/NEWS
+4
-0
Modules/dlmodule.c
Modules/dlmodule.c
+7
-7
setup.py
setup.py
+5
-0
No files found.
Misc/ACKS
View file @
342b5ea3
...
...
@@ -312,6 +312,7 @@ Fredrik Nehr
Chad Netzer
Max Neunhffer
George Neville-Neil
Gustavo Niemeyer
Oscar Nierstrasz
Hrvoje Niksic
Bill Noon
...
...
Misc/NEWS
View file @
342b5ea3
...
...
@@ -12,6 +12,10 @@ Core and builtins
Extension modules
- dl is now build on every system that has dlfcn.h. Failure in case
of sizeof(int)!=sizeof(long)!=sizeof(void*) is delayed until dl.open
is called.
Library
- ftplib: to safeguard the user's privacy, anonymous login will use
...
...
Modules/dlmodule.c
View file @
342b5ea3
...
...
@@ -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
;
...
...
setup.py
View file @
342b5ea3
...
...
@@ -567,6 +567,11 @@ class PyBuildExt(build_ext):
define_macros
=
expat_defs
,
libraries
=
[
'expat'
])
)
# Dynamic loading module
dl_inc
=
find_file
(
'dlfcn.h'
,
[],
inc_dirs
)
if
dl_inc
is
not
None
:
exts
.
append
(
Extension
(
'dl'
,
[
'dlmodule.c'
])
)
# Platform-specific libraries
if
platform
==
'linux2'
:
# Linux-specific modules
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment