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;
+
//---------------------------------------------------------------------------
%{
//---------------------------------------------------------------------------
// 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;