diff --git a/CHANGES.current b/CHANGES.current index 816c0a4e4..1b1352296 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.39 (in progress) ============================ +2008-02-08: bhy + Change the SIZE mapped by %pybuffer_mutable_binary and %pybuffer_binary in pybuffer.i from + the length of the buffer to the number of items in the buffer. + 2008-02-08: wsfulton Fix %feature not working for conversion operators, reported by Matt Sprague, for example: %feature("cs:methodmodifiers") operator bool "protected"; diff --git a/Lib/python/pybuffer.i b/Lib/python/pybuffer.i index 5acbb0aa4..121cd709f 100644 --- a/Lib/python/pybuffer.i +++ b/Lib/python/pybuffer.i @@ -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