Commit e9bf8a08 authored by Alessandro Decina's avatar Alessandro Decina

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.
parent d5c72961
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>
* gst/gst.override:
......
......@@ -146,9 +146,13 @@ class Fraction(Value):
return float(self.num) / float(self.denom)
import sys
dlsave = sys.getdlopenflags()
try:
dlsave = sys.getdlopenflags()
from DLFCN import RTLD_GLOBAL, RTLD_LAZY
except AttributeError:
# windows doesn't have sys.getdlopenflags()
RTLD_GLOBAL = -1
RTLD_LAZY = -1
except ImportError:
RTLD_GLOBAL = -1
RTLD_LAZY = -1
......@@ -172,18 +176,20 @@ except:
if RTLD_GLOBAL != -1 and RTLD_LAZY != -1:
sys.setdlopenflags(RTLD_LAZY | RTLD_GLOBAL)
try:
import libxml2
except:
pass
from _gst import *
import interfaces
version = get_gst_version
try:
import libxml2
except:
pass
from _gst import *
import interfaces
sys.setdlopenflags(dlsave)
if RTLD_GLOBAL != -1 and RTLD_LAZY != -1:
sys.setdlopenflags(dlsave)
del sys
version = get_gst_version
# Fixes for API cleanups that would cause an API breakage.
# See #446674
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment