X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/faf3cb3590e7bead27735c94014df39025cfc12b..d3b4d1131395d0413bd904579a310f6d9f7382f7:/utils/wxPython/src/helpers.cpp diff --git a/utils/wxPython/src/helpers.cpp b/utils/wxPython/src/helpers.cpp index a89b3502e8..834319f037 100644 --- a/utils/wxPython/src/helpers.cpp +++ b/utils/wxPython/src/helpers.cpp @@ -21,12 +21,6 @@ #include #include "helpers.h" -#ifdef __WXGTK__ -#ifdef wxUSE_GDK_IMLIB -#include "gdk_imlib/gdk_imlib.h" -#endif -#endif - //--------------------------------------------------------------------------- //wxHashTable* wxPyWindows = NULL; @@ -103,7 +97,7 @@ void wxPyApp::AfterMainLoop(void) { #ifdef __WXGTK__ wxApp::CommonCleanUp(); #endif - delete wxPythonApp; +// delete wxPythonApp; } @@ -140,12 +134,6 @@ void __wxPreStart() gtk_init( &argc, &argv ); delete [] argv; -#ifdef wxUSE_GDK_IMLIB - gdk_imlib_init(); - gtk_widget_push_visual(gdk_imlib_get_visual()); - gtk_widget_push_colormap(gdk_imlib_get_colormap()); -#endif - wxApp::CommonInit(); #endif @@ -370,6 +358,29 @@ void wxPyTimer::Notify() { // imcluded in every file... +byte* byte_LIST_helper(PyObject* source) { + if (!PyList_Check(source)) { + PyErr_SetString(PyExc_TypeError, "Expected a list object."); + return NULL; + } + int count = PyList_Size(source); + byte* temp = new byte[count]; + if (! temp) { + PyErr_SetString(PyExc_MemoryError, "Unable to allocate temporary array"); + return NULL; + } + for (int x=0; x