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: David Mertens
Subject: Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()
Date: Wed, 5 Sep 2012 00:47:29 -0500

1) I prefer the two-function interface, especially with the nicer
names Sean suggested, but who cares, beggars can't be choosers.
2) This whole exchange took more effort than it should have taken.
3) Thanks! Now it works! (I presume; I've not yet tested it.)

David

On Mon, Sep 3, 2012 at 6:07 AM, grischka <address@hidden> wrote:
> Michael Matz wrote:
>>
>> You earnestly added this interface abomination to avoid exporting a
>> function?    Well, as you asked: yes it's ugly, and yes it's confusing.
>> (and it's also non-C, ((void*)-1) might not be representable; the only
>> integer literal that definitely is convertible into a pointer is 0; but I'll
>> admit that this would just be a nitpick).  But why you think this interface
>> would be better than an explicit one with two functions is a complete
>> mystery to me.  I mean, really, can you give a reason?  I'm seriously
>> interested.
>
>
> So you seriously wanted to export the wrapper AND its subroutine?
> I mean, after all, an API is an abstraction layer and not a
> self-service store.
>
> Anyhow, I think it is not more complex/ugly/confusing than the
> alternative.  We would need to show users:
>  - the "abomination" just minus the TCC_RELOCATE_AUTO part
>  - plus the declaration of tcc_relocate + usage comment
>  - some hint at least how the two functions relate to each other
>
> So, my reasons, short version: Smaller libtcc.h
>
> --- grischka
>
>
>> Ciao,
>> Michael.
>
>
>
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/tinycc-devel



-- 
 "Debugging is twice as hard as writing the code in the first place.
  Therefore, if you write the code as cleverly as possible, you are,
  by definition, not smart enough to debug it." -- Brian Kernighan



reply via email to

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