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

Re: svn commit: r23239 - trunk/subversion/libsvn_subr

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-02-14 11:29:53 CET

On Fri, Feb 02, 2007 at 08:54:11PM +0100, Lieven Govaerts wrote:
> >Are you intending for this code to work when compiled with UNICODE
> >defined? If yes, you just called CreateFileW with an ANSI filename. If
> >no, why do you call GetTempPathA explicitly? (There are also other
> >instances of this elsewhere, references to TCHAR etc).
>
> Not really no, I fixed those instances which I found, there were only
> two, did you see more?
>

Well, no more instances of using explicit ANSI functions or polymorphic
data types, no, but you're still using the polymorphic functions
(e.g. CreateFile, which will either refer to CreateFileA or CreateFileW
depending on whether UNICODE is defined).

You could go through and explicitly use ANSI names for all the A/W
functions and structures, but it might just be easier to add a

#ifdef UNICODE
#error This code will not currently compile using Unicode functions
#endif

to the start of the file.

> >Finally, is it okay to assume that all command-line programs will be
> >happy for us to add in our own exception handler? Seems a bit rude for
> >a library to just assume that, though I doubt there's any real harm.
>
> You mean applications that wrap svn.exe? Since the current behavior is
> to hang the process with a dialog I don't presume it matters much.
> Further I assume only the svn* executables to invoke svn_cmdline_init,
> is that correct?
>

No, svn_cmdline_init() is for use by any command-line application that
wants to use Subversion functions. It's not entirely clear whether it's
even legal to bypass the initialisation that it does, though I suspect
it would work fine.

I suspect there's probably nothing to worry about - the chances of a
Windows-based command-line application having installed it's own crash
handler are slim (and there's not much we could do to detect it anyway).

> There's also the SVN_USE_WIN32_CRASHHANDLER define to disable building
> the crash handler altogether.
>

Yes, there is now. I guess that's a sufficient solution.

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Wed Feb 14 11:30:11 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.