X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/185d7c3ee4c6e4a9ddaf811ae38e57d68a0fdff3..1bc4d9b0130f8fe6e9ce44fb3dd6b8d61088160c:/wxPython/src/my_typemaps.i diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index b42c841801..f0246d6055 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -131,24 +131,15 @@ delete [] $source; } - - - - %typemap(python,build) int PCOUNT { - if (_in_points) { - $target = PyList_Size(_in_points); - } - else { - $target = 0; - } + $target = NPOINTS; } -%typemap(python,in) wxPoint* points { - $target = wxPoint_LIST_helper($source); - if ($target == NULL) { - return NULL; - } +%typemap(python,in) wxPoint* points (int NPOINTS) { + $target = wxPoint_LIST_helper($source, &NPOINTS); + if ($target == NULL) { + return NULL; + } } %typemap(python,freearg) wxPoint* points { delete [] $source; @@ -156,6 +147,7 @@ + //--------------------------------------------------------------------------- %{ @@ -264,7 +256,7 @@ static char* wxStringErrorMsg = "string type is required for parameter"; //--------------------------------------------------------------------------- // Typemap to convert strings to wxColour. Two string formats are accepted, -// either a colour name, for a hex colour spec like "#RRGGBB" +// either a colour name, or a hex colour spec like "#RRGGBB" %typemap(python,in) wxColour& (wxColour temp) { $target = &temp;