You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2002/09/01 15:32:26 UTC

Re: svn commit: rev 3110 - trunk/subversion/include

On Sat, 2002-08-31 at 19:55, gstein@tigris.org wrote:
> While as OSCON, I was talking with some people who want to embed SVN
> in their program. In order to dynamically allocate some of the
> structures, they need a context pointer to hold their private state
> (e.g. the target of a thunking vtable layer). To help these people
> out, we simply add a little context field to some of our structures.
> Normally, this will be NULL (especially if the structure is statically
> allocated constant data).

I don't understand why they can't aggregate an svn_delta_editor_t with a
void * themselves.  Why are we polluting our structures?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by Greg Stein <gs...@lyra.org>.
On Sun, Sep 01, 2002 at 01:29:41PM -0500, Karl Fogel wrote:
> Branko Cibej <br...@xbc.nu> writes:
> > >I don't understand why they can't aggregate an svn_delta_editor_t with a
> > >void * themselves.  Why are we polluting our structures?
> > 
> > I concur. -1 on putting stuff that we don't need into our structures,
> > they're verbose enough as it is. Especially as there's no compelling
> > need for that.
> 
> I was also confused as to the need for this change.  Subversion itself
> can't possibly use that void *ctx, so Greg Hudson's suggestion that
> the caller aggregate svn_delta_editor_t with whatever other data they
> need seems the way to go...  But would like to hear more from Greg
> Stein about specific use cases before saying -1; maybe there's
> something tricky we're missing here.  Greg?

I was a bit dubious doing it, and checking it in, too. But I also seem to
recall some pretty compelling arguments for it.

I'll follow up with Gerald Richter (the person who suggested it), and
explain here, or back it out.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> >I don't understand why they can't aggregate an svn_delta_editor_t with a
> >void * themselves.  Why are we polluting our structures?
> 
> I concur. -1 on putting stuff that we don't need into our structures,
> they're verbose enough as it is. Especially as there's no compelling
> need for that.

I was also confused as to the need for this change.  Subversion itself
can't possibly use that void *ctx, so Greg Hudson's suggestion that
the caller aggregate svn_delta_editor_t with whatever other data they
need seems the way to go...  But would like to hear more from Greg
Stein about specific use cases before saying -1; maybe there's
something tricky we're missing here.  Greg?

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by Daniele Nicolodi <da...@grinta.net>.
On Sun, Sep 01, 2002 at 06:00:04PM +0200, Branko ??ibej wrote:

> I concur. -1 on putting stuff that we don't need into our structures, 
> they're verbose enough as it is. Especially as there's no compelling 
> need for that.

I agree. Put extra entries in structures is for facilitate wrapping into
other languages/applications is completely unusufull. A structure could
be every wrapped into another one structure/class and that should be
done everytime.

Ciao
-- 
Daniele
		    --- http://www.grinta.net ---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by Branko Čibej <br...@xbc.nu>.
Greg Hudson wrote:

>On Sat, 2002-08-31 at 19:55, gstein@tigris.org wrote:
>  
>
>>While as OSCON, I was talking with some people who want to embed SVN
>>in their program. In order to dynamically allocate some of the
>>structures, they need a context pointer to hold their private state
>>(e.g. the target of a thunking vtable layer). To help these people
>>out, we simply add a little context field to some of our structures.
>>Normally, this will be NULL (especially if the structure is statically
>>allocated constant data).
>>    
>>
>
>I don't understand why they can't aggregate an svn_delta_editor_t with a
>void * themselves.  Why are we polluting our structures?
>  
>

I concur. -1 on putting stuff that we don't need into our structures, 
they're verbose enough as it is. Especially as there's no compelling 
need for that.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by "Glenn A. Thompson" <gt...@cdr.net>.
> I know this changes the API but it's important enough to de-opaque-a-fy

s/it's/ if it's/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 3110 - trunk/subversion/include

Posted by "Glenn A. Thompson" <gt...@cdr.net>.
Hey:

Greg Hudson wrote:

> On Sat, 2002-08-31 at 19:55, gstein@tigris.org wrote:
> > While as OSCON, I was talking with some people who want to embed SVN
> > in their program. In order to dynamically allocate some of the
> > structures, they need a context pointer to hold their private state
> > (e.g. the target of a thunking vtable layer). To help these people
> > out, we simply add a little context field to some of our structures.
> > Normally, this will be NULL (especially if the structure is statically
> > allocated constant data).
>
> I don't understand why they can't aggregate an svn_delta_editor_t with a
> void * themselves.  Why are we polluting our structures?

Isn't user_data (tied to a context) usually provided as a formal parameter.
Then given back as a formal parameter. I don't think I've ever used an API
which wanted me to use it's opaque structures.

I know this changes the API but it's important enough to de-opaque-a-fy
Subversion structures. It's important enough to be declared formally in the
API.
I missed the original post so I'm not clear on which structures.  So if I'm
all wet... Nevermind:-)

gat


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org