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: grischka
Subject: Re: [Tinycc-devel] tcc_relocate() and tcc_relocate_ex()
Date: Mon, 03 Sep 2012 13:07:23 +0200
User-agent: Thunderbird 2.0.0.24 (Windows/20100228)

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.




reply via email to

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