#655 SCHEME_STRINGP and SCHEME_STR_VAL not valid

open
nobody
mzscheme (10)
5
2012-12-21
2006-03-22
Tats
No

When compiling a file using Swig and MzScheme I get the
following error:

$ make
swig -c++ -mzscheme TypeModule.i
g++ -c -I. -I../../libdronemz/ TypeModule.cpp
mzc --cc TypeModule_wrap.cxx
mzc version 301, Copyright (c) 2004-2005 PLT Scheme Inc.
"TypeModule_wrap.cxx":
compile-extension:
TypeModule_wrap.cxx: In function `Scheme_Object*
_wrap_create(int,
Scheme_Object**)':
TypeModule_wrap.cxx:467: error: `SCHEME_STRINGP'
undeclared (first use this
function)
TypeModule_wrap.cxx:467: error: (Each undeclared
identifier is reported only
once for each function it appears in.)
TypeModule_wrap.cxx:469: error: `SCHEME_STR_VAL'
undeclared (first use this
function)
make: *** [all] Error 1
$

From the documentation of MzScheme version 300:
SCHEME_STRINGP(), etc. have been replaced by
SCHEME_CHAR_STRINGP(),
etc. and SCHEME_BYTE_STRINGP(), etc. A character is
represented by the
`mzchar' type, which corresponds to an unsigned integer
(4 bytes).
Use the functions scheme_char_string_to_byte_string() and
scheme_byte_string_to_char_string() to convert between
string types
via UTF-8. Several UTF-8/UTF-16 <-> mzchar conversion
functions are
also provided.

I don't know why SCHEME_STR_VAL doesn't work but it's
probably a similar issue.

++ t

Discussion