You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Branko Čibej <br...@xbc.nu> on 2006/01/24 19:14:11 UTC

Re: svn commit: r18202 - in trunk/subversion: include libsvn_client libsvn_subr

zhakov@tigris.org wrote:
> Author: zhakov
> Date: Tue Jan 24 08:12:31 2006
> New Revision: 18202
>
> Modified:
>    trunk/subversion/include/svn_xml.h
>    trunk/subversion/libsvn_client/prop_commands.c
>    trunk/subversion/libsvn_subr/xml.c
>
> Log:
> Factor out svn_xml_is_xml_name_valid() to eliminate usage of
> svn_ctype_table variable outside of libsvn_subr library. This needed because
> exporting variables from Windows DLLs requires __declspec(dllexport). 
> See disscussion here: http://svn.haxx.se/dev/archive-2005-12/0178.shtml
>   
Later on in that discussion, I did mention that the svn_ctype macros are 
a public API. Exporting just svn_xml_is_xml_name_valid doesn't help, 
because the macros will still break when used outside libsvn_subr. I 
don't care if they're not used elsewhere right now, they a) should be, 
and b) are a public API which must work.

Therefore, I suggest exporting a new function, svn_ctype_get_table() 
which returns the svn_ctype_table, deprecating the public status of the 
latter, and reimplementing the macros with the new function.

(You can give that funtion __attribute__((pure, const)) to give gcc more 
opportunity for optimisation.)

-- Brane


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

Re: svn commit: r18202 - in trunk/subversion: include libsvn_client libsvn_subr

Posted by Ivan Zhakov <ch...@gmail.com>.
On 1/24/06, Branko Čibej <br...@xbc.nu> wrote:
> zhakov@tigris.org wrote:
> > Author: zhakov
> > Date: Tue Jan 24 08:12:31 2006
> > New Revision: 18202
> >
> > Modified:
> >    trunk/subversion/include/svn_xml.h
> >    trunk/subversion/libsvn_client/prop_commands.c
> >    trunk/subversion/libsvn_subr/xml.c
> >
> > Log:
> > Factor out svn_xml_is_xml_name_valid() to eliminate usage of
> > svn_ctype_table variable outside of libsvn_subr library. This needed because
> > exporting variables from Windows DLLs requires __declspec(dllexport).
> > See disscussion here: http://svn.haxx.se/dev/archive-2005-12/0178.shtml
> >
> Later on in that discussion, I did mention that the svn_ctype macros are
> a public API. Exporting just svn_xml_is_xml_name_valid doesn't help,
> because the macros will still break when used outside libsvn_subr. I
> don't care if they're not used elsewhere right now, they a) should be,
> and b) are a public API which must work.
>
> Therefore, I suggest exporting a new function, svn_ctype_get_table()
> which returns the svn_ctype_table, deprecating the public status of the
> latter, and reimplementing the macros with the new function.

Yes, I remember this. I commited part of this change, in order to make
DLLs buildable if you  patch Windows generator. I'll introduce
svn_ctype_get_table() and reimplement svn_ctype macros in the near
future.

>
> (You can give that funtion __attribute__((pure, const)) to give gcc more
> opportunity for optimisation.)
I haven't gcc on my computer, so I leave this change for others.

--
Ivan Zhakov