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

Re: Python Command-line Client Bindings

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-06-29 19:41:07 CEST

David James wrote:

> Here's an example of a function (from main.c) which is difficult to
> Swigify without using malloc/free.
> int svn_cmdline_main (int argc, const char * const *argv)
> (This is the 'main' function from clients/cmdline/main.c)
>
> When you call the svn_cmdline_main function using Python strings, we
> need to allocate memory to store C-compatible versions of these
> strings. We can easily accomplish this using malloc/free. Allocating a
> brand new APR pool for this purpose would be very wasteful, especially
> since the purpose of the svn_cmdline_main function already allocates
> its own root pool. So, I think the best solution here is to use
> malloc/free. What do you think?

What's the point of calling the command line client's main from python
in the first place? Won't that just call through to the underlying
svn_client_foo functions, bypassing all the python wrappers you intend
to test by building this 'command line client in python'?

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 29 19:43:21 2005

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