mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/__init__.py: Fix on systems that don't have dlopen or don't support RTLD_GLOBAL and
Original commit message from CVS: reviewed by: Edward Hervey <edward.hervey@collabora.co.uk> * gst/__init__.py: Fix on systems that don't have dlopen or don't support RTLD_GLOBAL and RTLD_LAZY.
This commit is contained in:
parent
d5c7296122
commit
e9bf8a0868
2 changed files with 24 additions and 10 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2008-11-08 Alessandro Decina <alessandro.d@gmail.com>
|
||||||
|
|
||||||
|
reviewed by: Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
|
||||||
|
* gst/__init__.py:
|
||||||
|
Fix on systems that don't have dlopen or don't support RTLD_GLOBAL and
|
||||||
|
RTLD_LAZY.
|
||||||
|
|
||||||
2008-11-07 Jan Schmidt <jan.schmidt@sun.com>
|
2008-11-07 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
* gst/gst.override:
|
* gst/gst.override:
|
||||||
|
|
|
@ -146,9 +146,13 @@ class Fraction(Value):
|
||||||
return float(self.num) / float(self.denom)
|
return float(self.num) / float(self.denom)
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
dlsave = sys.getdlopenflags()
|
|
||||||
try:
|
try:
|
||||||
|
dlsave = sys.getdlopenflags()
|
||||||
from DLFCN import RTLD_GLOBAL, RTLD_LAZY
|
from DLFCN import RTLD_GLOBAL, RTLD_LAZY
|
||||||
|
except AttributeError:
|
||||||
|
# windows doesn't have sys.getdlopenflags()
|
||||||
|
RTLD_GLOBAL = -1
|
||||||
|
RTLD_LAZY = -1
|
||||||
except ImportError:
|
except ImportError:
|
||||||
RTLD_GLOBAL = -1
|
RTLD_GLOBAL = -1
|
||||||
RTLD_LAZY = -1
|
RTLD_LAZY = -1
|
||||||
|
@ -172,18 +176,20 @@ except:
|
||||||
|
|
||||||
if RTLD_GLOBAL != -1 and RTLD_LAZY != -1:
|
if RTLD_GLOBAL != -1 and RTLD_LAZY != -1:
|
||||||
sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL)
|
sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL)
|
||||||
try:
|
|
||||||
import libxml2
|
try:
|
||||||
except:
|
import libxml2
|
||||||
pass
|
except:
|
||||||
from _gst import *
|
pass
|
||||||
import interfaces
|
from _gst import *
|
||||||
|
import interfaces
|
||||||
|
|
||||||
|
if RTLD_GLOBAL != -1 and RTLD_LAZY != -1:
|
||||||
|
sys.setdlopenflags(dlsave)
|
||||||
|
del sys
|
||||||
|
|
||||||
version = get_gst_version
|
version = get_gst_version
|
||||||
|
|
||||||
sys.setdlopenflags(dlsave)
|
|
||||||
del sys
|
|
||||||
|
|
||||||
# Fixes for API cleanups that would cause an API breakage.
|
# Fixes for API cleanups that would cause an API breakage.
|
||||||
# See #446674
|
# See #446674
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue