Update to reflect changes (additional typemaps) in the C backend.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13481 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Leif Middelschulte 2012-08-01 12:52:17 +00:00
commit 0e75ebbc34

View file

@ -13,11 +13,22 @@ class string;
%typemap(ctype) string * "char *"
%typemap(ctype) string & "char *"
%typemap(ctype) const string & "char *"
%typemap(proxy) string "char *"
%typemap(proxy) string * "char *"
%typemap(proxy) string & "char *"
%typemap(proxy) const string & "char *"
%typemap(couttype) string "char *"
%typemap(couttype) const string & "char *"
%typemap(couttype) string * "char *"
%typemap(couttype) string & "char *"
%typemap(couttype) const string & "char *"
%typemap(proxycouttype) string "char *"
%typemap(proxycouttype) string * "char *"
%typemap(proxycouttype) string & "char *"
%typemap(proxycouttype) const string & "char *"
%typemap(cppouttype, retobj="1") string "std::string*"
%typemap(cppouttype) const string &, string * "std::string*"
%typemap(cppouttype) const string &, string *, string & "std::string*"
%typemap(wrap_call) string ""
%typemap(wrap_call) const string &, string*, string& ""
%typemap(in) string {
if ($input) {
@ -38,12 +49,12 @@ class string;
}
}
%typemap(freearg) const string &, string * {
%typemap(freearg) const string &, string *, string & {
if ($1)
delete $1;
}
%typemap(out) string, const string &, string * {
%typemap(out) string, const string &, string *, string & {
const char *str = cppresult->c_str();
size_t len = strlen(str);
$result = (char *) malloc(len + 1);