slang-users mailing list

[2007 Date Index] [2007 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

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


Hallo John,

"John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> Remko van der Vossen <wich@xxxxxxxx> 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



[2007 date index] [2007 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]