Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / v9 / share / swig / 1.3.26 / ocaml / std_common.i
CommitLineData
920dae64
AT
1// -*- C++ -*-
2// SWIG typemaps for STL - common utilities
3// Art Yerkes
4// Modified from: Luigi Ballabio
5// Aug 3, 2002
6//
7// Ocaml implementation
8
9%include <std/std_except.i>
10
11%apply size_t { std::size_t };
12
13%{
14#include <string>
15 CAML_VALUE SwigString_FromString(const std::string& s) {
16 return caml_val_string((char *)s.c_str());
17 }
18 std::string SwigString_AsString(CAML_VALUE o) {
19 return std::string((char *)caml_ptr_val(o,0));
20 }
21%}