tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()


From: Sean Conner
Subject: Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()
Date: Thu, 30 Aug 2012 17:58:47 -0400
User-agent: Mutt/1.4.1i

It was thus said that the Great grischka once stated:
> Sean Conner wrote:
> >  I do not like this idea, and here's why:  it produces a function that 
> >  does
> >two different things depending upon one parameter:
> 
> Count.  It is three different things.
> 
> >     In both cases, it returns the number of bytes required to relocate
> >     the code.
> 
> No.

  Let me amend my previous statement on this---you are correct.  And it's
way worse than I expected.  tcc_relocate_ex() returns the number of bytes
iff ptr is NULL; otherwise it returns 0 on success and -1 on an error.  

  Somehow, I get the feeling that changing tcc_relocate_ex() to

        int tcc_relocate_ex(TCCState *state,void *ptr,size_t *psize);

would be an uphill battle.

  -spc





reply via email to

[Prev in Thread] Current Thread [Next in Thread]