Merged first chunk of Guile changes contributed by John Lenz.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4858 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Matthias Köppe 2003-06-03 22:12:50 +00:00
commit e5ac3696bc
22 changed files with 1061 additions and 460 deletions

View file

@ -27,9 +27,9 @@ namespace std {
%typemap(in) string (char* tempptr) {
if (gh_string_p($input)) {
tempptr = gh_scm2newstr($input, NULL);
tempptr = SWIG_scm2str($input);
$1 = std::string(tempptr);
if (tempptr) scm_must_free(tempptr);
if (tempptr) SWIG_free(tempptr);
} else {
SWIG_exception(SWIG_TypeError, "string expected");
}
@ -38,9 +38,9 @@ namespace std {
%typemap(in) const string & (std::string temp,
char* tempptr) {
if (gh_string_p($input)) {
tempptr = gh_scm2newstr($input, NULL);
tempptr = SWIG_scm2str($input);
temp = std::string(tempptr);
if (tempptr) scm_must_free(tempptr);
if (tempptr) SWIG_free(tempptr);
$1 = &temp;
} else {
SWIG_exception(SWIG_TypeError, "string expected");