Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
8b905bd9
Kaydet (Commit)
8b905bd9
authored
Eki 25, 2011
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #13226: Add RTLD_xxx constants to the os module. These constants can by
used with sys.setdlopenflags().
üst
e0be4232
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
5 deletions
+54
-5
os.rst
Doc/library/os.rst
+13
-0
sys.rst
Doc/library/sys.rst
+5
-5
test_posix.py
Lib/test/test_posix.py
+7
-0
NEWS
Misc/NEWS
+3
-0
posixmodule.c
Modules/posixmodule.c
+26
-0
No files found.
Doc/library/os.rst
Dosyayı görüntüle @
8b905bd9
...
@@ -1393,6 +1393,19 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
...
@@ -1393,6 +1393,19 @@ or `the MSDN <http://msdn.microsoft.com/en-us/library/z0kc8e3z.aspx>`_ on Window
the C library.
the C library.
.. data:: RTLD_LAZY
RTLD_NOW
RTLD_GLOBAL
RTLD_LOCAL
RTLD_NODELETE
RTLD_NOLOAD
RTLD_DEEPBIND
See the Unix manual page :manpage:`dlopen(3)`.
.. versionadded:: 3.3
.. _os-file-dir:
.. _os-file-dir:
Files and Directories
Files and Directories
...
...
Doc/library/sys.rst
Dosyayı görüntüle @
8b905bd9
...
@@ -801,11 +801,11 @@ always available.
...
@@ -801,11 +801,11 @@ always available.
the interpreter loads extension modules. Among other things, this will enable a
the interpreter loads extension modules. Among other things, this will enable a
lazy resolving of symbols when importing a module, if called as
lazy resolving of symbols when importing a module, if called as
``sys.setdlopenflags(0)``. To share symbols across extension modules, call as
``sys.setdlopenflags(0)``. To share symbols across extension modules, call as
``sys.setdlopenflags(
ctypes.RTLD_GLOBAL)``. Symbolic names for the
``sys.setdlopenflags(
os.RTLD_GLOBAL)``. Symbolic names for the flag modules
flag modules can be either found in the :mod:`ctypes` module, or in the :mod:`DLFCN`
can be found in the :mod:`os` module (``RTLD_xxx`` constants, e.g.
module. If :mod:`DLFCN` is not available, it can be generated from
:data:`os.RTLD_LAZY`).
:file:`/usr/include/dlfcn.h` using the :program:`h2py` script. Availability:
Unix.
Availability:
Unix.
.. function:: setprofile(profilefunc)
.. function:: setprofile(profilefunc)
...
...
Lib/test/test_posix.py
Dosyayı görüntüle @
8b905bd9
...
@@ -984,6 +984,13 @@ class PosixTester(unittest.TestCase):
...
@@ -984,6 +984,13 @@ class PosixTester(unittest.TestCase):
self
.
assertIs
(
b
,
l
)
self
.
assertIs
(
b
,
l
)
self
.
assertEqual
(
l
.
count
(),
3
)
self
.
assertEqual
(
l
.
count
(),
3
)
def
test_rtld_constants
(
self
):
# check presence of major RTLD_* constants
posix
.
RTLD_LAZY
posix
.
RTLD_NOW
posix
.
RTLD_GLOBAL
posix
.
RTLD_LOCAL
class
PosixGroupsTester
(
unittest
.
TestCase
):
class
PosixGroupsTester
(
unittest
.
TestCase
):
def
setUp
(
self
):
def
setUp
(
self
):
...
...
Misc/NEWS
Dosyayı görüntüle @
8b905bd9
...
@@ -341,6 +341,9 @@ Core and Builtins
...
@@ -341,6 +341,9 @@ Core and Builtins
Library
Library
-------
-------
-
Issue
#
13226
:
Add
RTLD_xxx
constants
to
the
os
module
.
These
constants
can
by
used
with
sys
.
setdlopenflags
().
-
Issue
#
10278
:
Add
clock_getres
(),
clock_gettime
()
and
CLOCK_xxx
constants
to
-
Issue
#
10278
:
Add
clock_getres
(),
clock_gettime
()
and
CLOCK_xxx
constants
to
the
time
module
.
time
.
clock_gettime
(
time
.
CLOCK_MONOTONIC
)
provides
a
the
time
module
.
time
.
clock_gettime
(
time
.
CLOCK_MONOTONIC
)
provides
a
monotonic
clock
monotonic
clock
...
...
Modules/posixmodule.c
Dosyayı görüntüle @
8b905bd9
...
@@ -121,6 +121,10 @@ corresponding Unix manual entries for more information on calls.");
...
@@ -121,6 +121,10 @@ corresponding Unix manual entries for more information on calls.");
#endif
#endif
#endif
#endif
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
/* Various compilers have only certain posix functions */
/* Various compilers have only certain posix functions */
/* XXX Gosh I wish these were all moved into pyconfig.h */
/* XXX Gosh I wish these were all moved into pyconfig.h */
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
#if defined(PYCC_VACPP) && defined(PYOS_OS2)
...
@@ -11423,6 +11427,28 @@ all_ins(PyObject *d)
...
@@ -11423,6 +11427,28 @@ all_ins(PyObject *d)
if
(
ins
(
d
,
"XATTR_SIZE_MAX"
,
(
long
)
XATTR_SIZE_MAX
))
return
-
1
;
if
(
ins
(
d
,
"XATTR_SIZE_MAX"
,
(
long
)
XATTR_SIZE_MAX
))
return
-
1
;
#endif
#endif
#ifdef RTLD_LAZY
if
(
PyModule_AddIntMacro
(
d
,
RTLD_LAZY
))
return
-
1
;
#endif
#ifdef RTLD_NOW
if
(
PyModule_AddIntMacro
(
d
,
RTLD_NOW
))
return
-
1
;
#endif
#ifdef RTLD_GLOBAL
if
(
PyModule_AddIntMacro
(
d
,
RTLD_GLOBAL
))
return
-
1
;
#endif
#ifdef RTLD_LOCAL
if
(
PyModule_AddIntMacro
(
d
,
RTLD_LOCAL
))
return
-
1
;
#endif
#ifdef RTLD_NODELETE
if
(
PyModule_AddIntMacro
(
d
,
RTLD_NODELETE
))
return
-
1
;
#endif
#ifdef RTLD_NOLOAD
if
(
PyModule_AddIntMacro
(
d
,
RTLD_NOLOAD
))
return
-
1
;
#endif
#ifdef RTLD_DEEPBIND
if
(
PyModule_AddIntMacro
(
d
,
RTLD_DEEPBIND
))
return
-
1
;
#endif
#if defined(PYOS_OS2)
#if defined(PYOS_OS2)
if
(
insertvalues
(
d
))
return
-
1
;
if
(
insertvalues
(
d
))
return
-
1
;
#endif
#endif
...
...
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