You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2001/11/02 22:10:58 UTC

Re: svn commit: rev 381 - trunk/subversion/mod_dav_svn

> Author: gstein
> Date: 2001-11-02 20:53 GMT
> New Revision: 381
> 
> Modified:
>    trunk/subversion/mod_dav_svn/dav_svn.h
> Log:
> Documentation updates.

Delicious, thanks Greg!

One question:

> +
> +/* register our live property URIs with mod_dav. */
>  void dav_svn_register_uris(apr_pool_t *p);

Wow.  I know you didn't change the prototype in this commit, only
added a doc string, but now that I look at that prototype, I am way
puzzled.  I can see from the code that it's modifying a static const
variable.  Never mind the const part (??), what about thread-safeness?

Minor note: At first, I thought maybe there were some properties
hanging off the pool P or something, and the function was affecting
those.  That turns out not to be the case, of course.  Might be nice
to mention P in the doc string, so that other people won't make the
same wrong turn?  Your call.

-K

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

Re: svn commit: rev 381 - trunk/subversion/mod_dav_svn

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Stein <gs...@lyra.org> writes:
> I'm not sure how to document it differently. It simply calls mod_dav with
> some information. It isn't a complicated function... it is really just about
> passing along some information so mod_dav "knows" about us.
> 
> Can you suggest a better docstring?

Not without understanding mod_dav better.

It's just weird, at first glance, that it's registering something
somewhere, but neither the something nor the somewhere are
visible. :-)  If one understands what's going on, it's probably not so
confusing.


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

Re: svn commit: rev 381 - trunk/subversion/mod_dav_svn

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Nov 02, 2001 at 04:10:58PM -0600, Karl Fogel wrote:
>...
> > +/* register our live property URIs with mod_dav. */
> >  void dav_svn_register_uris(apr_pool_t *p);
> 
> Wow.  I know you didn't change the prototype in this commit, only
> added a doc string, but now that I look at that prototype, I am way
> puzzled.  I can see from the code that it's modifying a static const
> variable.

Not modifying. Passing a pointer to a static, const value to the mod_dav
function dav_register_liveprop_group().

> Never mind the const part (??), what about thread-safeness?

dav_svn_register_uris() is called once, at module load time. See
mod_dav_svn.c::register_hooks().

> Minor note: At first, I thought maybe there were some properties
> hanging off the pool P or something, and the function was affecting
> those.  That turns out not to be the case, of course.  Might be nice
> to mention P in the doc string, so that other people won't make the
> same wrong turn?  Your call.

I'm not sure how to document it differently. It simply calls mod_dav with
some information. It isn't a complicated function... it is really just about
passing along some information so mod_dav "knows" about us.

Can you suggest a better docstring?

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