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:
parent
44f4dd4dc0
commit
0e75ebbc34
1 changed files with 15 additions and 4 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue