Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / share / swig / 1.3.26 / guile / std_common.i
CommitLineData
920dae64
AT
1//
2// SWIG typemaps for STL - common utilities
3// Luigi Ballabio
4// Aug 3, 2002
5//
6// Guile implementation
7
8%include <std/std_except.i>
9
10%apply size_t { std::size_t };
11
12#define SWIG_bool2scm(b) gh_bool2scm(b ? 1 : 0)
13#define SWIG_string2scm(s) gh_str02scm(s.c_str())
14
15%{
16#include <string>
17
18inline std::string SWIG_scm2string(SCM x) {
19 char* temp;
20 temp = SWIG_scm2str(x);
21 std::string s(temp);
22 if (temp) SWIG_free(temp);
23 return s;
24}
25%}