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:
Haoyu Bai 2009-02-10 14:21:43 +00:00
commit 03e840f3ec
2 changed files with 6 additions and 2 deletions

View file

@ -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