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

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

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2007-09-12 10:56:05 CEST

/On 9/12/07, Erik Huelsmann <ehuels@gmail.com> wrote:
> On 9/12/07, Karl Fogel <kfogel@red-bean.com> wrote:
> > "Erik Huelsmann" <ehuels@gmail.com> writes:
> > > I'll need to look at how we solved this in svn_ctypes.h, but as far as
> > > I recall there were problems with exporting variables from DLLs on
> > > Windows, because supposedly MSVC needs to reference a pointer to the
> > > variable whereas other compilers support manipulating the variable
> > > directly, see http://svn.haxx.se/dev/archive-2005-12/0364.shtml
> >
> > Hmm. I didn't quite understand that, and unfortunately svn.haxx.se is
> > unreachable from my home network right now. We can't just define the
> > object once in svn_iter.c, and then declare it "extern" in svn_iter.h?
> > Does MSVC have a problem with that? (I thought it was standard C89.)
>
> Oh, sure you can declare it as such, but it will only work with static
> libs, not with DLLs. For DLLs you need to declare it with the MSVC
> specific qualifier __cdecl(dllimport)/ __cdecl(dllexport). The
> discussion I referenced concludes that the way ctyes was set up until
> then was untennable. The end result is that ctypes was made internal
> to libsvn_subr. (Although it looks like the header wasn't updated to
> reflect that...)
I see two ways to fix it:
- Create new function to return svn_iter_break error object. Something
like svn_err_iter_break()
- Define svn_iter_shared_break variable in header file with static
modifier. In this case variable will be copied in each file using this
header.

Personally I don't like casting 1 to pointer. I find it too hacky :)

-- 
Ivan Zhakov
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 12 10:52:42 2007

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.