inline bool wxPyErr_Occurred()
{
bool rval;
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
rval = PyErr_Occurred() != NULL;
wxPyEndBlockThreads(blocked);
return rval;
void SetAXProp(const wxString& name, PyObject* value)
{
const wxPropX& prop = GetAXPropDesc(name);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (! PyErr_Occurred() ) {
if (! prop.CanSet()) {
wxString msg;
{
PyObject* rval = NULL;
const wxPropX& prop = GetAXPropDesc(name);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (! PyErr_Occurred() ) {
if (! prop.CanGet()) {
wxString msg;
PyObject* rval = NULL;
const wxFuncX& func = GetAXMethodDesc(name);
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
if (! PyErr_Occurred() ) {
nargs = func.params.size();
if (nargs > 0)
}
static void wxActiveXEvent__preCallInit(wxActiveXEvent *self,PyObject *pyself){
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
PyObject* pList = PyList_New(0);
PyObject_SetAttrString(pyself, "paramList", pList);
Py_DECREF(pList);
wxPyEndBlockThreads(blocked);
}
static void wxActiveXEvent__postCallCleanup(wxActiveXEvent *self,PyObject *pyself){
- bool blocked = wxPyBeginBlockThreads();
+ wxPyBlock_t blocked = wxPyBeginBlockThreads();
for (int i=0; i<self->ParamCount(); i+=1) {
PyObject* val = PyObject_GetAttrString(
pyself, (char*)(const char*)self->ParamName(i).mb_str());
wxInputStream *arg2 = (wxInputStream *) 0 ;
bool result;
wxPyInputStream *temp2 ;
- bool created2 ;
PyObject * obj0 = 0 ;
PyObject * obj1 = 0 ;
char *kwnames[] = {
if (SWIG_arg_fail(1)) SWIG_fail;
{
if (wxPyConvertSwigPtr(obj1, (void **)&temp2, wxT("wxPyInputStream"))) {
- arg2 = temp2->m_wxis;
- created2 = false;
+ arg2 = wxPyCBInputStream_copy((wxPyCBInputStream*)temp2->m_wxis);
} else {
PyErr_Clear(); // clear the failure of the wxPyConvert above
- arg2 = wxPyCBInputStream_create(obj1, false);
+ arg2 = wxPyCBInputStream_create(obj1, true);
if (arg2 == NULL) {
- PyErr_SetString(PyExc_TypeError, "Expected wxInputStream or Python file-like object.");
+ PyErr_SetString(PyExc_TypeError, "Expected wx.InputStream or Python file-like object.");
SWIG_fail;
}
- created2 = true;
}
}
{
{
resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj);
}
- {
- if (created2)
- delete arg2;
- }
return resultobj;
fail:
- {
- if (created2)
- delete arg2;
- }
return NULL;
}