summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/code/doc_src_uic.qdoc
diff options
context:
space:
mode:
authormae <qt-info@nokia.com>2010-03-03 18:39:45 (GMT)
committermae <qt-info@nokia.com>2010-03-03 18:39:45 (GMT)
commit1a7df5ef1fc81fbf2d548c40e3feeb8ef3bb5a8c (patch)
treebd482c10ffde3ceefae5d4ed8f09f87f8c05bccf /doc/src/snippets/code/doc_src_uic.qdoc
parenta2af08f9793b3884bdb770f89edd4754c0411654 (diff)
downloadQt-1a7df5ef1fc81fbf2d548c40e3feeb8ef3bb5a8c.zip
Qt-1a7df5ef1fc81fbf2d548c40e3feeb8ef3bb5a8c.tar.gz
Qt-1a7df5ef1fc81fbf2d548c40e3feeb8ef3bb5a8c.tar.bz2
make example work again
The code is now a bit on the imperative side, but that was the only working solution to remove the binding loops.
Diffstat (limited to 'doc/src/snippets/code/doc_src_uic.qdoc')
0 files changed, 0 insertions, 0 deletions
pan class="hl opt">; dl_funcptr p; if ((m = _PyImport_FindExtension(name, pathname)) != NULL) { Py_INCREF(m); return m; } lastdot = strrchr(name, '.'); if (lastdot == NULL) { packagecontext = NULL; shortname = name; } else { packagecontext = name; shortname = lastdot+1; } p = _PyImport_GetDynLoadFunc(name, shortname, pathname, fp); if (PyErr_Occurred()) return NULL; if (p == NULL) { PyErr_Format(PyExc_ImportError, "dynamic module does not define init function (init%.200s)", shortname); return NULL; } oldcontext = _Py_PackageContext; _Py_PackageContext = packagecontext; (*p)(); _Py_PackageContext = oldcontext; if (PyErr_Occurred()) return NULL; m = PyDict_GetItemString(PyImport_GetModuleDict(), name); if (m == NULL) { PyErr_SetString(PyExc_SystemError, "dynamic module not initialized properly"); return NULL; } /* Remember the filename as the __file__ attribute */ if (PyModule_AddStringConstant(m, "__file__", pathname) < 0) PyErr_Clear(); /* Not important enough to report */ if (_PyImport_FixupExtension(name, pathname) == NULL) return NULL; if (Py_VerboseFlag) PySys_WriteStderr( "import %s # dynamically loaded from %s\n", name, pathname); Py_INCREF(m); return m; } #endif /* HAVE_DYNAMIC_LOADING */