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

Re: svn_stream_t

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2005-04-28 09:58:16 CEST

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
Received on Thu Apr 28 09:54:10 2005

This is an archived mail posted to the Subversion Dev mailing list.