gnupic: Re: [gnupic] gpasm memory leaks


Previous by date: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, David
Next by date: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, Robert Pearce
Previous in thread: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, David
Next in thread: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, Robert Pearce

Subject: Re: [gnupic] gpasm memory leaks
From: "Tamas Rudnai" ####@####.####
Date: 1 Jun 2007 06:30:35 +0100
Message-Id: <492f1420705312230xfaaeb49pfe928acf5a2eaf7e@mail.gmail.com>

Sorry, then I misunderstood the question completely too, please ignore that
mail.

reference is a C++ stuff, the original C does not know anything like that.
You can use the fine preprocessor for avoiding using the -> markings like
this:

void foo(sth_t *something)
{
#define something (*something)
    printf("see: %s, %u\n", something.text, something.num);
#undef something
}

however, I would not recommend it.

Tamas


On 6/1/07, David ####@####.#### wrote:
>
> On Thu, 31 May 2007 18:24:48 -0700
> Jeff ####@####.#### wrote:
>
> > On Thu May 31 2007 15:32, David Barnett wrote:
> > >  I had a real
> > > headache when I finished with all the changes and learned that C
> > > doesn't directly support pass-by-reference =(.
> > >
> >     calledFunction(&referencedData);
> >
> > Did I misunderstand your statement?
> Yep. I mean declare the parameter type (in the function prototype) to be
> a reference instead of a pointer. You can get almost the same effect
> the way you have above, but if you switch from one to the other, you
> have to go through and add or remove a '*' or '&' on each access of
> that parameter (or worse, hunt down '.' and '->'). It's not really
> worth all this discussion, it was just a gripe that it sucked and also
> I was surprised I didn't already know.
>
> David Barnett
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####
>
>

Previous by date: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, David
Next by date: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, Robert Pearce
Previous in thread: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, David
Next in thread: 1 Jun 2007 06:30:35 +0100 Re: [gnupic] gpasm memory leaks, Robert Pearce


Powered by ezmlm-browse 0.20.