*
* This file was automatically generated by :
* Simplified Wrapper and Interface Generator (SWIG)
- * Version 1.1 (Build 810)
+ * Version 1.1 (Build 883)
*
* Portions Copyright (c) 1995-1998
* The University of Utah and The Regents of the University of California.
#ifdef __cplusplus
extern "C" {
#endif
+
extern void SWIG_MakePtr(char *, void *, char *);
extern void SWIG_RegisterMapping(char *, char *, void *(*)(void *));
extern char *SWIG_GetPtr(char *, void **, char *);
#include <wx/stream.h>
#include <wx/list.h>
-static PyObject* l_output_helper(PyObject* target, PyObject* o) {
- PyObject* o2;
- if (!target) {
- target = o;
- } else if (target == Py_None) {
- Py_DECREF(Py_None);
- target = o;
- } else {
- if (!PyList_Check(target)) {
- o2 = target;
- target = PyList_New(0);
- PyList_Append(target, o2);
- Py_XDECREF(o2);
- }
- PyList_Append(target,o);
- Py_XDECREF(o);
- }
- return target;
-}
static PyObject* t_output_helper(PyObject* target, PyObject* o) {
PyObject* o2;
return target;
}
-static char* wxStringErrorMsg = "string type is required for parameter";
+#if PYTHON_API_VERSION >= 1009
+ static char* wxStringErrorMsg = "String or Unicode type required";
+#else
+ static char* wxStringErrorMsg = "string type is required for parameter";
+#endif
// C++
// definitions of wxStringPtrList and wxPyInputStream
#include <wx/listimpl.cpp>
if (!PyObject_HasAttrString(py, name))
return NULL;
PyObject* o = PyObject_GetAttrString(py, name);
- if (!PyMethod_Check(o) && !PyCFunction_Check(o))
+ if (!PyMethod_Check(o) && !PyCFunction_Check(o)) {
+ Py_DECREF(o);
return NULL;
+ }
return o;
}
PyObject * _arg0;
PyObject * _obj0 = 0;
char *_kwnames[] = { "p", NULL };
+ char _ptemp[128];
self = self;
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:new_wxInputStream",_kwnames,&_obj0))
{
_result = (wxPyInputStream *)new_wxPyInputStream(_arg0);
-}{
- char _ptemp[128];
- if (_result) {
+} if (_result) {
SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyInputStream_p");
_resultobj = Py_BuildValue("s",_ptemp);
+ } else {
+ Py_INCREF(Py_None);
+ _resultobj = Py_None;
}
- else
- _resultobj=0;
-}
return _resultobj;
}
}
}
{
+#if PYTHON_API_VERSION >= 1009
+ char* tmpPtr; int tmpSize;
+ if (!PyString_Check(_obj1) && !PyUnicode_Check(_obj1)) {
+ PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
+ return NULL;
+ }
+ if (PyString_AsStringAndSize(_obj1, &tmpPtr, &tmpSize) == -1)
+ return NULL;
+ _arg1 = new wxString(tmpPtr, tmpSize);
+#else
if (!PyString_Check(_obj1)) {
PyErr_SetString(PyExc_TypeError, wxStringErrorMsg);
return NULL;
}
- _arg1 = new wxString(PyString_AsString(_obj1), PyString_Size(_obj1));
+ _arg1 = new wxString(PyString_AS_STRING(_obj1), PyString_GET_SIZE(_obj1));
+#endif
}
{
wxOutputStream_write(_arg0,*_arg1);
{ "_EBool","_int",0},
{ "_EBool","_wxWindowID",0},
{ "_unsigned_long","_long",0},
- { "_wxPyInputStream","_class_wxPyInputStream",0},
- { "_class_wxOutputStream","_wxOutputStream",0},
{ "_signed_int","_wxCoord",0},
{ "_signed_int","_wxPrintQuality",0},
{ "_signed_int","_EBool",0},
{ "_WXTYPE","_unsigned_short",0},
{ "_unsigned_short","_WXTYPE",0},
{ "_unsigned_short","_short",0},
- { "_class_wxPyInputStream","_wxPyInputStream",0},
{ "_signed_short","_WXTYPE",0},
{ "_signed_short","_short",0},
{ "_unsigned_char","_byte",0},
{ "_wxCoord","_size_t",0},
{ "_wxCoord","_time_t",0},
{ "_wxCoord","_wxPrintQuality",0},
- { "_wxOutputStream","_class_wxOutputStream",0},
{0,0,0}};
static PyObject *SWIG_globals;
SWIG_globals = SWIG_newvarlink();
m = Py_InitModule("streamsc", streamscMethods);
d = PyModule_GetDict(m);
+
+ wxPyPtrTypeMap_Add("wxInputStream", "wxPyInputStream");
{
int i;
for (i = 0; _swig_mapping[i].n1; i++)