A fix for incorrect wrapping of wxPallet.GetRGB

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn 2002-02-13 22:00:29 +00:00
parent d973988695
commit 154747f5be
2 changed files with 46 additions and 27 deletions

View File

@ -11517,16 +11517,25 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject
wxPalette * _arg0;
int _arg1;
byte * _arg2;
int temp;
byte * _arg3;
int temp0;
byte * _arg4;
int temp1;
PyObject * _argo0 = 0;
PyObject * _argo2 = 0;
PyObject * _argo3 = 0;
PyObject * _argo4 = 0;
char *_kwnames[] = { "self","pixel","OUTPUT","OUTPUT","OUTPUT", NULL };
char *_kwnames[] = { "self","pixel", NULL };
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OiOOO:wxPalette_GetRGB",_kwnames,&_argo0,&_arg1,&_argo2,&_argo3,&_argo4))
{
_arg2 = (byte*)&temp;
}
{
_arg3 = (byte*)&temp0;
}
{
_arg4 = (byte*)&temp1;
}
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPalette_GetRGB",_kwnames,&_argo0,&_arg1))
return NULL;
if (_argo0) {
if (_argo0 == Py_None) { _arg0 = NULL; }
@ -11535,27 +11544,6 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject
return NULL;
}
}
if (_argo2) {
if (_argo2 == Py_None) { _arg2 = NULL; }
else if (SWIG_GetPtrObj(_argo2,(void **) &_arg2,"_byte_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of wxPalette_GetRGB. Expected _byte_p.");
return NULL;
}
}
if (_argo3) {
if (_argo3 == Py_None) { _arg3 = NULL; }
else if (SWIG_GetPtrObj(_argo3,(void **) &_arg3,"_byte_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of wxPalette_GetRGB. Expected _byte_p.");
return NULL;
}
}
if (_argo4) {
if (_argo4 == Py_None) { _arg4 = NULL; }
else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_byte_p")) {
PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxPalette_GetRGB. Expected _byte_p.");
return NULL;
}
}
{
PyThreadState* __tstate = wxPyBeginAllowThreads();
_result = (bool )wxPalette_GetRGB(_arg0,_arg1,_arg2,_arg3,_arg4);
@ -11563,6 +11551,21 @@ static PyObject *_wrap_wxPalette_GetRGB(PyObject *self, PyObject *args, PyObject
wxPyEndAllowThreads(__tstate);
if (PyErr_Occurred()) return NULL;
} _resultobj = Py_BuildValue("i",_result);
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg2));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg3));
_resultobj = t_output_helper(_resultobj, o);
}
{
PyObject *o;
o = PyInt_FromLong((long) (*_arg4));
_resultobj = t_output_helper(_resultobj, o);
}
return _resultobj;
}

View File

@ -350,10 +350,26 @@
$target = t_output_helper($target, o);
}
%typemap(python,ignore) bool *OUTPUT = bool *T_OUTPUT;
%typemap(python,argout) bool *OUTPUT = bool *T_OUTPUT;
%typemap(python,ignore) byte *T_OUTPUT(int temp)
{
$target = (byte*)&temp;
}
%typemap(python,argout) byte *T_OUTPUT
{
PyObject *o;
o = PyInt_FromLong((long) (*$source));
$target = t_output_helper($target, o);
}
%typemap(python,ignore) byte *OUTPUT = byte *T_OUTPUT;
%typemap(python,argout) byte *OUTPUT = byte *T_OUTPUT;
//---------------------------------------------------------------------------
// Typemaps to convert return values that are base class pointers
// to the real derived type, if possible. See wxPyMake_wxObject in