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

Re: Ruby test failure

From: Kouhei Sutou <kou_at_cozmixng.org>
Date: 2006-03-21 06:38:16 CET

Hi,

In <20060320133928.GA631@lorenz.farside.org.uk>
  "Re: Ruby test failure" on Mon, 20 Mar 2006 13:39:28 +0000,
  Malcolm Rowe <malcolm-svn-dev@farside.org.uk> wrote:

> > > Okay, so now if r2c_swig_type2() fails, we will now raise an error,
> > > but svn_swig_rb_get_pool() will still dereference pool_wrapper regardless,
> > > won't it?
> >
> > Yes. Because svn_swig_rb_get_pool() uses r2c_swig_type2(),
> > svn_swig_rb_get_pool() will raises an error without checking
> > in svn_swig_rb_get_pool().
> >
>
> I'm not quite sure if you're agreeing with me (I'm not sure what 'raises
> an error without checking' means); if you're not, could you explain a
> bit more?
>
> Shouldn't we be checking for a failure from calling r2c_swig_type2()?
> Or if it's 'never going to happen', at least set *result to NULL after
> we call SWIG_Error(), so that we'll get a more predictable crash later?

I'm sorry. I understood your comment by mistake.

We don't need to check any error for r2c_swig_type2() in
svn_swig_rb_get_pool(). Because r2c_swig_type2() raises an
exception when an error is occurred. Ruby's exception works
like longjmp() in C. So, the r2c_swig_type2() call don't
return to svn_swig_rb_get_pool() if an error occurred in
r2c_swig_type2().

# I'm sorry for my poor English...

Thanks,

--
kou
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 21 06:38:43 2006

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.