Merged first chunk of Guile changes contributed by John Lenz.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4858 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
972acd608a
commit
34ea7f03ef
22 changed files with 1061 additions and 460 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue