[slang-users] Re: const char* argument in functions like SLsmg_write_nstring

Jörg Sommer joerg at alea.gnuu.de
Fri May 25 05:10:47 EDT 2007


Hallo John,

"John E. Davis" <davis at space.mit.edu> wrote:
> Remko van der Vossen <wich at stack.nl> wrote:
>>Why are the string arguments of functions like SLsmg_write_nstring not
>>of type const char* but of type char*? This makes it quite annoying to
>
> The main reason is that slang dates from a time when not all
> compilers supported the const keyword.  Moreover, at that time
> autoconf did not exist or if it did, it was not in wide-spread usage.
> Hence, the most portable solution was to avoid using const.
>
> I will revisit this issue for slang 3 -- until then you will have to
> use a typecast.

Why not introduce a new configure option --enable-const and make the
changes in SLang 2? In SLang 3 you can change the default from
--disable-const to --enable-const and everyone with a broken compiler can
still use SLang.

Bye, Jörg.
-- 
Was der Bauer nicht kennt, das frisst er nicht. Würde der Städter kennen,
was er frisst, er würde umgehend Bauer werden.
                                                       Oliver Hassencamp


More information about the slang-users-l mailing list