changed the mapped 'SIZE' of buffer interface from the length of raw buffer to number of items in the buffer. So it would be easier to use with type other than 'char'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11125 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6d03b7ce6a
commit
03e840f3ec
2 changed files with 6 additions and 2 deletions
|
|
@ -21,7 +21,7 @@
|
|||
%argument_fail(res, "(TYPEMAP, SIZE)", $symname, $argnum);
|
||||
}
|
||||
$1 = ($1_ltype) buf;
|
||||
$2 = ($2_ltype) size;
|
||||
$2 = ($2_ltype) (size/sizeof($*1_type));
|
||||
}
|
||||
%enddef
|
||||
|
||||
|
|
@ -73,7 +73,7 @@
|
|||
%argument_fail(res, "(TYPEMAP, SIZE)", $symname, $argnum);
|
||||
}
|
||||
$1 = ($1_ltype) buf;
|
||||
$2 = ($2_ltype) size;
|
||||
$2 = ($2_ltype) (size / sizeof($*1_type));
|
||||
}
|
||||
%enddef
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue