You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kouhei Sutou <ko...@cozmixng.org> on 2006/04/20 15:31:08 UTC

typedef of svn_client_list_func_t

Hi,

The typedef of svn_client_list_func_t is the following:

  typedef svn_error_t *(svn_client_list_func_t)(...);
                       /\

It seems that '*' is missed before 'svn_client_list_func_t':

  typedef svn_error_t *(*svn_client_list_func_t)(...);
                        ^

Thanks,
--
kou

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

Re: typedef of svn_client_list_func_t

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
Philip Martin writes:
 > "Peter N. Lundblad" <pe...@famlundblad.se> writes:
 > 
 > > Kouhei Sutou writes:
 > >  > 
 > I think both are valid C and when used as a function parameter there
 > is an automatic conversion from "function returning foo" to "pointer
 > to function returning foo".

Yeah, I believe that as well, though I haven't cared to check out the details.


 > > I changed this in r19438.
 > 
 > Strictly speaking it's an ABI change and affects anyone writing code

How cool this isn't released yet, then:-)  It's new in 1.4. But good
point anyway.

 > I think this change is probably harmless in practice, but why does
 > Kouhei Sutou need it?  Is it a swig problem?
 > 

I assume it is swig related and since we seem to do this everywhere
else,
I just went and did the change.

Thanks,
//Peter

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

Re: typedef of svn_client_list_func_t

Posted by Kouhei Sutou <ko...@cozmixng.org>.
Hi,

In <87...@debian2.lan>
  "Re: typedef of svn_client_list_func_t" on Thu, 20 Apr 2006 20:06:16 +0100,
  Philip Martin <ph...@codematters.co.uk> wrote:

> >  > The typedef of svn_client_list_func_t is the following:
> >  > 
> >  >   typedef svn_error_t *(svn_client_list_func_t)(...);
> >  >                        /\
> >  > 
> >  > It seems that '*' is missed before 'svn_client_list_func_t':
> >  > 
> >  >   typedef svn_error_t *(*svn_client_list_func_t)(...);
> >  >                         ^
> 
> I think both are valid C and when used as a function parameter there
> is an automatic conversion from "function returning foo" to "pointer
> to function returning foo".

> I think this change is probably harmless in practice, but why does
> Kouhei Sutou need it?  Is it a swig problem?

Yes. This is harmless in SWIG too. It's just a coding
problem. A typedef of other callback functions has '*'
but the typedef of svn_client_list_func_t doesn't have
'*'. This is strange look.



Peter, thanks for your change.


Regards,
--
kou

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

Re: typedef of svn_client_list_func_t

Posted by Philip Martin <ph...@codematters.co.uk>.
"Peter N. Lundblad" <pe...@famlundblad.se> writes:

> Kouhei Sutou writes:
>  > 
>  > The typedef of svn_client_list_func_t is the following:
>  > 
>  >   typedef svn_error_t *(svn_client_list_func_t)(...);
>  >                        /\
>  > 
>  > It seems that '*' is missed before 'svn_client_list_func_t':
>  > 
>  >   typedef svn_error_t *(*svn_client_list_func_t)(...);
>  >                         ^

I think both are valid C and when used as a function parameter there
is an automatic conversion from "function returning foo" to "pointer
to function returning foo".

>  > 
>
> I changed this in r19438.

Strictly speaking it's an ABI change and affects anyone writing code
like:

   svn_error_t *some_cb(...);
   svn_client_list_func_t *cb = some_cb;

I think this change is probably harmless in practice, but why does
Kouhei Sutou need it?  Is it a swig problem?

-- 
Philip Martin

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

Re: typedef of svn_client_list_func_t

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
Kouhei Sutou writes:
 > 
 > The typedef of svn_client_list_func_t is the following:
 > 
 >   typedef svn_error_t *(svn_client_list_func_t)(...);
 >                        /\
 > 
 > It seems that '*' is missed before 'svn_client_list_func_t':
 > 
 >   typedef svn_error_t *(*svn_client_list_func_t)(...);
 >                         ^
 > 

I changed this in r19438.

Regards,
//Peter

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