[slang-users] const char* argument in functions like
SLsmg_write_nstring
Remko van der Vossen
wich at stack.nl
Wed May 23 08:12:06 EDT 2007
Hello everyone,
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
write strings from a C++ std::string with its c_str() member function as
this returns a const char*.
Furthermore I see no reason whatsoever why SLsmg_write_nstring and the
likes should not use const char* type, save for internal variables being
of unsigned char* type which is easily solvable and for
SLutf8_skip_chars taking unsigned char* instead of const unsigned char*
which should also be changed in my opinion.
Taking $type instead of const $type only limits the possible inputs of
the function when it is not necessary. As such I think it would be an
improvement if this was changed.
Regards,
Remko van der Vossen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mailman.jedsoft.org/pipermail/slang-users-l/attachments/20070523/73f05ad8/attachment.bin
More information about the slang-users-l
mailing list