more %apply char* fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8530c08222
commit
ff7ab7afac
4 changed files with 5 additions and 5 deletions
|
|
@ -126,7 +126,7 @@
|
|||
%typemap(out) double %{ $result = $1; %}
|
||||
|
||||
/* char * - treat as String */
|
||||
%typemap(in) char * %{ $1 = ($1_type)$input; %}
|
||||
%typemap(in) char * %{ $1 = ($1_ltype)$input; %}
|
||||
%typemap(out) char * %{ $result = SWIG_csharp_string_callback((const char *)$1); %}
|
||||
|
||||
%typemap(out, null="") void ""
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ SIMPLE_MAP(unsigned long long, gh_scm2ulong_long, gh_ulong_long2scm, integer);
|
|||
/* Strings */
|
||||
|
||||
%typemap (in, doc="$NAME is a string") char *(int must_free = 0) {
|
||||
$1 = ($1_type)SWIG_scm2str($input);
|
||||
$1 = ($1_ltype)SWIG_scm2str($input);
|
||||
must_free = 1;
|
||||
}
|
||||
%typemap (varin, doc="NEW-VALUE is a string") char * {$1 = SWIG_scm2str($input);}
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
|
||||
// strings (char* and char[])
|
||||
%typemap(in,checkfn="lua_isstring") const char*, char*
|
||||
%{$1 = ($1_type)lua_tostring(L, $input);%}
|
||||
%{$1 = ($1_ltype)lua_tostring(L, $input);%}
|
||||
|
||||
%typemap(in,checkfn="lua_isstring") const char[ANY], char[ANY]
|
||||
%{$1 = (char*)lua_tostring(L, $input);%}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
if (alloc == SWIG_NEWOBJ) {
|
||||
swig_acquire_ownership_array(buf);
|
||||
}
|
||||
$result = %reinterpret_cast(buf, $ltype);
|
||||
$result = %reinterpret_cast(buf, $1_ltype);
|
||||
}
|
||||
%typemap(directorfree,noblock=1) Char *
|
||||
{
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
if (!SWIG_IsOK(res)) {
|
||||
%dirout_fail(res, "$type");
|
||||
}
|
||||
static $*ltype tmp = buf;
|
||||
static $*1_ltype tmp = buf;
|
||||
$result = &tmp;
|
||||
if (alloc == SWIG_NEWOBJ) {
|
||||
swig_acquire_ownership_array(buf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue