07/25/2006: mutandiz
[allegrocl] more additions to std::string, some tweaks and small bug fixes -nocwrap mode. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
0d30f52e97
commit
2709b65d83
4 changed files with 29 additions and 14 deletions
|
|
@ -82,6 +82,7 @@ namespace std {
|
|||
bool operator >= ( const basic_string<charT> &other ) const {
|
||||
return self->compare( other ) != -1;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -94,12 +95,20 @@ namespace std {
|
|||
typedef basic_string<char> string;
|
||||
typedef basic_string<wchar_t> wstring;
|
||||
|
||||
// automatically convert constant std::strings to cl:strings
|
||||
%typemap(ctype) string "char *";
|
||||
%typemap(in) string "$1 = string($input);";
|
||||
%typemap(out) string "$result = (char *)(&$1)->c_str();";
|
||||
%typemap(lisptype) string "cl:string";
|
||||
%typemap(lout) string "(cl::setq ACL_ffresult $body)";
|
||||
|
||||
%typemap(ctype) wstring "wchar_t *";
|
||||
%typemap(in) wstring "$1 = string($input);";
|
||||
%typemap(out) wstring "$result = (wchar_t *)(&$1)->c_str();";
|
||||
%typemap(lisptype) wstring "cl:string";
|
||||
%typemap(lout) wstring "(cl::setq ACL_ffresult (excl:native-to-string $body
|
||||
:external-format #+little-endian :fat-le #-little-endian :fat))";
|
||||
|
||||
/* Overloading check */
|
||||
// %typemap(in) string {
|
||||
// if (caml_ptr_check($input))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue