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

Re: svn commit: rev 7296 - trunk/subversion/bindings/swig

From: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2003-10-07 16:05:30 CEST

Russell Yanofsky wrote:
> ...
> But it doesn't look like there's any way to tell apr_hash_make
> to just use malloc.

On second thought, maybe we could use functions like these to simulate a
heap-allocated hash table:

apr_hash_t * create_hash()
{
  apr_pool_t * pool;
  apr_pool_create(&pool, NULL);
  return apr_hash_make(pool);
}

void free_hash(apr_hash_t * hash)
{
  if (!hash) return;
  apr_pool_destroy(apr_hash_pool_get(hash));
}

Would these be acceptable way of creating and destroying the hash member?
(How about if they handled errors and followed the coding standard?)

- Russ

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Oct 7 16:06:26 2003

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.