[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH/RFC] Fix refcount on some Python callbacks

From: Jelmer Vernooij <jelmer_at_samba.org>
Date: Sun, 13 Apr 2008 02:11:20 +0200

The attached patch fixes the reference counting in the Python part of %
callback_typemap. At the moment the reference counter of the Python
function is not increased when passing it as a baton. This means that if
Subversion is the only one still referencing the function it will be
garbage collected, causing Subversion to segfault when it tries to call
the Python callback.

However, this patch doesn't decrement the reference counter once the
callback is no longer used since there is no place to free batons as far
as I know. That means we'll potentially keep Python methods around in
memory that aren't used. Is that a problem or is there perhaps some way
to work around this?

Cheers,

Jelmer

-- 
Jelmer Vernooij <jelmer@samba.org> - http://samba.org/~jelmer/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-04-13 02:11:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.