Walter Mundt <emage@spamcop.net>


Patch
r860004

r860004 | djames | 2006-06-04 20:40:15 +0000 (Sun, 04 Jun 2006)

Add necessary plumbing to Python bindings to allow the callbacks defined
in svn_client_ctx_t to function.

Patch by: Walter Mundt <emage@spamcop.net>
          me
Review by: me

[ In subversion/bindings/swig ]

* include/proxy_apr.swg
  (): Document new "owned reference" management functions at top of file.
  (apr_pool_t::_add_owned_ref, apr_pool_t::_remove_owned_ref): New
  pool "owned reference" management functions.
  (apr_pool_t::destroy): Now clears all "owned reference" items.
* python/libsvn_swig_py/swigutil_py.c
  (proxy_get_pool): New static function for getting the parent pool of
  a proxy object.  Logic extracted from svn_swig_MustGetPtr.
  (svn_swig_py_pool_set_owned_ref): New helper function to manage pool
  "owned references."
  (svn_swig_MustGetPtr): Extracted proxy_get_pool function from here.
* include/svn_types.swg
  (PY_AS_VOID): New typemap for converting PyObjects into void* batons.
  Uses svn_swig_py_pool_set_owned_ref helper to manage reference counts.
* svn_client.i
  (): Mark svn_client_ctx_t baton members as PY_AS_VOID
  (svn_swig_py_cancel_func): new opaque pointer constant
  (svn_swig_py_get_commit_log_func): new opaque pointer constant
  (svn_swig_py_notify_func): new opaque pointer constant
* python/tests/client.py
  (): Fixed up doc comments throughout.
  (SubversionRepositoryTestCase): Renamed test case class to
  SubversionClientTestCase (original name is a probable typo)
  (test_mkdir_url, test_log3_url): New tests.
  (test_client_ctx_baton_lifetime): New test for PY_AS_VOID reference
  counting semantics.