You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by William Ferguson <wi...@hubbub.com.au> on 2005/04/28 03:55:51 UTC

svn_stream_t

I'm writing a client that invokes ra_plugin_t->get_file so I need a stream
to manage the retrieved contents.
I understand that I'm going to have to create a stream, probably via
something like svn_stream_create(), but the compiler complains long before
that with :
[exec] src\c\RepositoryAccess.c(287) : error C2079: 'resourceStream' uses
undefined struct 'svn_stream_t'

even though I have included svn_io.h

How do I gain access to the definition of struct svn_stream_t?

There is a typedef in svn_io.h but it seems that the definition for the
struct itself is hidden away in stream.c

Please be gentle with the replies as I'm a Java not a C developer and am
really only trying to build a Java interface to the RA layer.


William

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

Re: svn_stream_t

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Thu, 28 Apr 2005, William Ferguson wrote:

> I'm writing a client that invokes ra_plugin_t->get_file so I need a stream
> to manage the retrieved contents.
> I understand that I'm going to have to create a stream, probably via
> something like svn_stream_create(), but the compiler complains long before
> that with :
> [exec] src\c\RepositoryAccess.c(287) : error C2079: 'resourceStream' uses
> undefined struct 'svn_stream_t'
>
> even though I have included svn_io.h
>
You seem to be declaring like this
svn_stream_t resourceStream;
You should declare it as a pointer, like this:
svn_stream_t *resourceStream;

> How do I gain access to the definition of struct svn_stream_t?
>
> There is a typedef in svn_io.h but it seems that the definition for the
> struct itself is hidden away in stream.c
>
That's what we call an opaque type (or incomplete type). You can create
pointersto the struct, but no instance of the struct itself. It lets us
change te struct without worrying about binary compatibility.

Hope it helps,
//Peter

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