Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/bindings/swig/python/core.py view on Meta::CPAN
__setattr__ = lambda self, name, value: _swig_setattr(self, svn_location_segment_receiver_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, svn_location_segment_receiver_t, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
def set_parent_pool(self, parent_pool=None):
"""Create a new proxy object for svn_location_segment_receiver_t"""
import libsvn.core, weakref
self.__dict__["_parent_pool"] = \
parent_pool or libsvn.core.application_pool;
if self.__dict__["_parent_pool"]:
self.__dict__["_is_valid"] = weakref.ref(
self.__dict__["_parent_pool"]._is_valid)
def assert_valid(self):
"""Assert that this object is using valid pool memory"""
if "_is_valid" in self.__dict__:
assert self.__dict__["_is_valid"](), "Variable has already been deleted"
def __getattr__(self, name):
"""Get an attribute from this object"""
self.assert_valid()
value = _swig_getattr(self, self.__class__, name)
members = self.__dict__.get("_members")
if members is not None:
_copy_metadata_deep(value, members.get(name))
_assert_valid_deep(value)
return value
def __setattr__(self, name, value):
"""Set an attribute on this object"""
self.assert_valid()
self.__dict__.setdefault("_members",{})[name] = value
return _swig_setattr(self, self.__class__, name, value)
def __call__(self, *args):
return svn_location_invoke_segment_receiver(self, *args)
svn_location_segment_receiver_t_swigregister = _core.svn_location_segment_receiver_t_swigregister
svn_location_segment_receiver_t_swigregister(svn_location_segment_receiver_t)
SVN_ALLOCATOR_RECOMMENDED_MAX_FREE = _core.SVN_ALLOCATOR_RECOMMENDED_MAX_FREE
def svn_pool_create(*args):
"""svn_pool_create(apr_pool_t parent_pool, apr_allocator_t * allocator) -> apr_pool_t"""
return _core.svn_pool_create(*args)
def svn_pool_create_allocator(*args):
"""svn_pool_create_allocator(svn_boolean_t thread_safe) -> apr_allocator_t *"""
return _core.svn_pool_create_allocator(*args)
SVN_VER_MAJOR = _core.SVN_VER_MAJOR
SVN_VER_MINOR = _core.SVN_VER_MINOR
SVN_VER_PATCH = _core.SVN_VER_PATCH
SVN_VER_MICRO = _core.SVN_VER_MICRO
SVN_VER_LIBRARY = _core.SVN_VER_LIBRARY
SVN_VER_TAG = _core.SVN_VER_TAG
SVN_VER_NUMTAG = _core.SVN_VER_NUMTAG
SVN_VER_REVISION = _core.SVN_VER_REVISION
SVN_VER_NUM = _core.SVN_VER_NUM
SVN_VER_NUMBER = _core.SVN_VER_NUMBER
SVN_VERSION = _core.SVN_VERSION
def svn_ver_compatible(*args):
"""svn_ver_compatible(svn_version_t const * my_version, svn_version_t const * lib_version) -> svn_boolean_t"""
return _core.svn_ver_compatible(*args)
def svn_ver_equal(*args):
"""svn_ver_equal(svn_version_t const * my_version, svn_version_t const * lib_version) -> svn_boolean_t"""
return _core.svn_ver_equal(*args)
class svn_version_checklist_t:
"""Proxy of C svn_version_checklist_t struct"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, svn_version_checklist_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, svn_version_checklist_t, name)
__repr__ = _swig_repr
__swig_setmethods__["label"] = _core.svn_version_checklist_t_label_set
__swig_getmethods__["label"] = _core.svn_version_checklist_t_label_get
__swig_setmethods__["version_query"] = _core.svn_version_checklist_t_version_query_set
__swig_getmethods__["version_query"] = _core.svn_version_checklist_t_version_query_get
def set_parent_pool(self, parent_pool=None):
"""Create a new proxy object for svn_version_checklist_t"""
import libsvn.core, weakref
self.__dict__["_parent_pool"] = \
parent_pool or libsvn.core.application_pool;
if self.__dict__["_parent_pool"]:
self.__dict__["_is_valid"] = weakref.ref(
self.__dict__["_parent_pool"]._is_valid)
def assert_valid(self):
"""Assert that this object is using valid pool memory"""
if "_is_valid" in self.__dict__:
assert self.__dict__["_is_valid"](), "Variable has already been deleted"
def __getattr__(self, name):
"""Get an attribute from this object"""
self.assert_valid()
value = _swig_getattr(self, self.__class__, name)
members = self.__dict__.get("_members")
if members is not None:
_copy_metadata_deep(value, members.get(name))
_assert_valid_deep(value)
src/subversion/subversion/bindings/swig/python/core.py view on Meta::CPAN
self.__dict__.setdefault("_members",{})[name] = value
return _swig_setattr(self, self.__class__, name, value)
apr_file_t_swigregister = _core.apr_file_t_swigregister
apr_file_t_swigregister(apr_file_t)
class apr_hash_t:
"""Proxy of C apr_hash_t struct"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, apr_hash_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, apr_hash_t, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
def set_parent_pool(self, parent_pool=None):
"""Create a new proxy object for apr_hash_t"""
import libsvn.core, weakref
self.__dict__["_parent_pool"] = \
parent_pool or libsvn.core.application_pool;
if self.__dict__["_parent_pool"]:
self.__dict__["_is_valid"] = weakref.ref(
self.__dict__["_parent_pool"]._is_valid)
def assert_valid(self):
"""Assert that this object is using valid pool memory"""
if "_is_valid" in self.__dict__:
assert self.__dict__["_is_valid"](), "Variable has already been deleted"
def __getattr__(self, name):
"""Get an attribute from this object"""
self.assert_valid()
value = _swig_getattr(self, self.__class__, name)
members = self.__dict__.get("_members")
if members is not None:
_copy_metadata_deep(value, members.get(name))
_assert_valid_deep(value)
return value
def __setattr__(self, name, value):
"""Set an attribute on this object"""
self.assert_valid()
self.__dict__.setdefault("_members",{})[name] = value
return _swig_setattr(self, self.__class__, name, value)
apr_hash_t_swigregister = _core.apr_hash_t_swigregister
apr_hash_t_swigregister(apr_hash_t)
import threading
application_pool = None
application_pool_lock = threading.Lock()
class GenericSWIGWrapper:
def __init__(self, this, pool):
"""Create new Generic SWIG wrapper object"""
import weakref
self.this = this
self._parent_pool = pool
self._is_valid = weakref.ref(pool._is_valid)
def set_parent_pool(self, pool):
"""Set the parent pool of this object"""
self._parent_pool = pool
def valid(self):
"""Is this object valid?"""
return self._is_valid()
def assert_valid(self):
"""Assert that this object is still valid"""
assert self.valid(), "This object has already been destroyed"
def _unwrap(self):
"""Return underlying SWIG object"""
self.assert_valid()
return self.this
def _mark_weakpool_invalid(weakpool):
if weakpool and weakpool() and hasattr(weakpool(), "_is_valid"):
del weakpool()._is_valid
class apr_pool_t:
"""Proxy of C apr_pool_t struct"""
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, apr_pool_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, apr_pool_t, name)
def __init__(self, *args, **kwargs): raise AttributeError("No constructor defined")
__repr__ = _swig_repr
def set_parent_pool(self, parent_pool=None):
"""Create a new memory pool"""
global application_pool
try:
application_pool_lock.acquire()
self._parent_pool = parent_pool or application_pool
self._mark_valid()
# Protect important functions from GC
self._apr_pool_destroy = _core.apr_pool_destroy
self._svn_swig_py_clear_application_pool = \
_core.svn_swig_py_clear_application_pool
# If we are an application-level pool,
# then set this pool to be the application-level pool
if not self._parent_pool:
svn_swig_py_set_application_pool(self, self)
application_pool = self
finally:
application_pool_lock.release()
( run in 0.622 second using v1.01-cache-2.11-cpan-796a6f069b2 )