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

Re: svn_client_create_context() question

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Fri, 12 Dec 2008 17:17:40 -0600

void pointer wrote:
> On Fri, Dec 12, 2008 at 4:19 PM, Branko Čibej <brane_at_xbc.nu> wrote:
>
>> This should go to the users@ list.
>>
>> void pointer wrote:
>>> Hi,
>>>
>>> I'm trying to learn how to use the SVN library so I can create my own
>>> GUI wrapper for subversion. However, I'm running into some problems
>>> doing so. I haven't found a lot of code examples/tutorials on how to
>>> use the library, so I've been trying to use as much documentation as
>>> possible, but it's not enough. Below is the code I'm trying to test on
>>> Windows XP:
>> If you look at where I'm calling svn_client_create_context(), you'll
>>> notice I'm passing in NULL for the apr_pool_t. I was hoping this
>>> parameter was optional, but this function call is crashing so I can
>>> only assume that I must create a pool. Can someone give me a code
>>> snippet showing how to do this? Thanks.
>>
> Should it? This seems like a very technical and developer-oriented question
> to me. I want to ask the question to the people who actually created this
> API to get the best answer possible. Either this question is in the correct
> place or I'm misunderstanding the purpose for the dev list.

This list is for development *of* Subversion, not development *with* Subversion.
  Many of the developers also subscribe to the users@ list, and would be equally
able to answer the question there. That being said...

> In any case, how does this code look:
>
>
> apr_pool_initialize();
> apr_pool_t* pool;
> apr_pool_create( &pool, NULL );
>
>
> This seems to work.

Yes, you need to initialize your pools when using them with Subversion. The
book has a section on "embedding Subversion":
http://svnbook.red-bean.com/en/1.5/svn.developer.usingapi.html

And HACKING talks about pool usage conventions inside Subversion, but which may
also be useful in this context: http://subversion.tigris.org/hacking.html#apr-pools

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=983578

Received on 2008-12-13 00:18:13 CET

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.