Re: [ghudson@MIT.EDU: Re: svn commit: rev 3110 - trunk/subversion/include]
From: Greg Stein <gstein_at_lyra.org>
Date: 2002-09-03 21:36:08 CEST
On Tue, Sep 03, 2002 at 10:13:22AM -0500, Karl Fogel wrote:
Actually, I think it can be summarized pretty simply:
* FOO returns you an object OBJ, expecting you to pass it back to its
* you want associate your own context with OBJ for other purposes
* where does your context pointer go?
In Gerald's recommendation, OBJ should have a context pointer in it for this
Another direction is that you are acting as FOO, and need to return an OBJ,
I believe both directions are solved without the embedded context pointer,
typedef struct {
} my_dav_resource;
...
rsrc = apr_palloc(r->pool, sizeof(*rsrc));
For the second case, you use embedded structures:
typedef struct {
...
On this second example, you could potentially need more code if the embedded
my_dav_resource *rsrc = (my_dav_resource *)((const char *)r -
This concept would apply to the mod_dav structures, too.
Gerald: do you have any issues with this wrapper structure style?
Cheers,
-- Greg Stein, http://www.lyra.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org For additional commands, e-mail: dev-help@subversion.tigris.orgReceived on Tue Sep 3 21:37:30 2002 |
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.