The great merge

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2002-11-30 22:01:28 +00:00
commit 12a43edc2d
1508 changed files with 125983 additions and 44037 deletions

26
Lib/guile/std_common.i Normal file
View file

@ -0,0 +1,26 @@
//
// SWIG typemaps for STL - common utilities
// Luigi Ballabio
// Aug 3, 2002
//
// Guile implementation
%{
#include <string>
SCM SWIG_bool2scm(bool b) {
int i = b ? 1 : 0;
return gh_bool2scm(i);
}
std::string SWIG_scm2string(SCM x) {
char* temp;
std::string s;
temp = gh_scm2newstr(x, NULL);
s = std::string(temp);
if (temp) scm_must_free(temp);
return s;
}
SCM SWIG_string2scm(const std::string& s) {
return gh_str02scm(s.c_str());
}
%}