The 'directorin' typemap now accepts , etc expansions instead of having to use workarounds - _name, _name etc.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12879 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b2b2dd65de
commit
4c898b023c
23 changed files with 80 additions and 78 deletions
|
|
@ -159,7 +159,7 @@
|
|||
%typemap(directorin,noblock=1,fragment=#SWIG_FromCharPtr)
|
||||
Char *, Char const*, Char *const, Char const *const,
|
||||
Char const *&, Char *const &, Char const *const & {
|
||||
$input = SWIG_FromCharPtr((const Char *)$1_name);
|
||||
$input = SWIG_FromCharPtr((const Char *)$1);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -326,9 +326,9 @@
|
|||
{
|
||||
size_t size = $1_dim0;
|
||||
%#ifndef SWIG_PRESERVE_CARRAY_SIZE
|
||||
while (size && ($1_name[size - 1] == '\0')) --size;
|
||||
while (size && ($1[size - 1] == '\0')) --size;
|
||||
%#endif
|
||||
$input = SWIG_FromCharPtrAndSize($1_name, size);
|
||||
$input = SWIG_FromCharPtrAndSize($1, size);
|
||||
}
|
||||
|
||||
/* directorout */
|
||||
|
|
@ -389,7 +389,7 @@
|
|||
%typemap(directorin,noblock=1,fragment=#SWIG_FromCharPtrAndSize)
|
||||
Char FIXSIZE[ANY], const Char FIXSIZE[ANY]
|
||||
{
|
||||
$input = SWIG_FromCharPtrAndSize($1_name, $1_dim0);
|
||||
$input = SWIG_FromCharPtrAndSize($1, $1_dim0);
|
||||
}
|
||||
|
||||
#endif /* SWIG_DIRECTOR_TYPEMAPS */
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#if defined(SWIG_DIRECTOR_TYPEMAPS)
|
||||
|
||||
%typemap(directorin) SWIG_Object "$input = $1_name;";
|
||||
%typemap(directorin) SWIG_Object "$input = $1;";
|
||||
%typemap(directorout) SWIG_Object "$result = $input;";
|
||||
|
||||
#endif /* SWIG_DIRECTOR_TYPEMAPS */
|
||||
|
|
|
|||
|
|
@ -344,15 +344,15 @@
|
|||
/* directorin */
|
||||
|
||||
%typemap(directorin,noblock=1) SWIGTYPE *, SWIGTYPE *const& {
|
||||
$input = SWIG_NewPointerObj(%as_voidptr($1_name), $descriptor, %newpointer_flags);
|
||||
$input = SWIG_NewPointerObj(%as_voidptr($1), $descriptor, %newpointer_flags);
|
||||
}
|
||||
|
||||
%typemap(directorin,noblock=1) SWIGTYPE {
|
||||
$input = SWIG_NewPointerObj(%as_voidptr(&$1_name), $&descriptor, %newpointer_flags);
|
||||
$input = SWIG_NewPointerObj(%as_voidptr(&$1), $&descriptor, %newpointer_flags);
|
||||
}
|
||||
|
||||
%typemap(directorin,noblock=1) SWIGTYPE & {
|
||||
$input = SWIG_NewPointerObj(%as_voidptr(&$1_name), $descriptor, %newpointer_flags);
|
||||
$input = SWIG_NewPointerObj(%as_voidptr(&$1), $descriptor, %newpointer_flags);
|
||||
}
|
||||
|
||||
/* directorout */
|
||||
|
|
@ -480,7 +480,7 @@
|
|||
/* directorin */
|
||||
|
||||
%typemap(directorin,noblock=1) SWIGTYPE (CLASS::*) {
|
||||
$input = SWIG_NewMemberObj(%as_voidptr(&$1_name), sizeof($type), $descriptor);
|
||||
$input = SWIG_NewMemberObj(%as_voidptr(&$1), sizeof($type), $descriptor);
|
||||
}
|
||||
|
||||
/* directorout */
|
||||
|
|
@ -540,7 +540,7 @@
|
|||
/* directorin */
|
||||
|
||||
%typemap(directorin,noblock=1) SWIGTYPE ((*)(ANY)) {
|
||||
$input = SWIG_NewFunctionPtrObj((void*)($1_name), $descriptor);
|
||||
$input = SWIG_NewFunctionPtrObj((void*)($1), $descriptor);
|
||||
}
|
||||
|
||||
/* directorout */
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@
|
|||
|
||||
%define %value_directorin_typemap(from_meth,frag,Type...)
|
||||
%typemap(directorin,noblock=1,fragment=frag) Type *DIRECTORIN {
|
||||
$input = from_meth(%static_cast(*$1_name,Type));
|
||||
$input = from_meth(%static_cast(*$1,Type));
|
||||
}
|
||||
%typemap(directorin,noblock=1,fragment=frag) Type, const Type& {
|
||||
$input = from_meth(%static_cast($1_name,Type));
|
||||
$input = from_meth(%static_cast($1,Type));
|
||||
}
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
|
||||
%typemap(directorin,noblock=1) void *, void const*, void *const, void const *const,
|
||||
void const *&, void *const &, void const *const & {
|
||||
$input = SWIG_NewPointerObj(%as_voidptr($1_name), $descriptor, %newpointer_flags);
|
||||
$input = SWIG_NewPointerObj(%as_voidptr($1), $descriptor, %newpointer_flags);
|
||||
}
|
||||
|
||||
/* directorout */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue