[pywin32-checkins] pywin32/com/win32comext/ifilter/src PyIFilter.cpp, 1.6, 1.6.4.1
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Roger U. <ru...@us...> - 2008-08-29 08:32:39
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11748 Modified Files: Tag: py3k PyIFilter.cpp Log Message: Changes to build for Py3k Index: PyIFilter.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src/PyIFilter.cpp,v retrieving revision 1.6 retrieving revision 1.6.4.1 diff -C2 -d -r1.6 -r1.6.4.1 *** PyIFilter.cpp 2 Mar 2005 02:25:02 -0000 1.6 --- PyIFilter.cpp 29 Aug 2008 08:32:47 -0000 1.6.4.1 *************** *** 283,287 **** #define ADD_IID(tok) AddIID(dict, #tok, tok) ! // @object PyIFilter|Description of the interface static struct PyMethodDef PyIFilter_methods[] = { --- 283,287 ---- #define ADD_IID(tok) AddIID(dict, #tok, tok) ! // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering static struct PyMethodDef PyIFilter_methods[] = { *************** *** 300,304 **** ! static struct PyMethodDef g_methods[] = { { "LoadIFilter", pyLoadIFilter, 1 }, // @pymeth Init|Description of Init --- 300,304 ---- ! static struct PyMethodDef ifilter_functions[] = { { "LoadIFilter", pyLoadIFilter, 1 }, // @pymeth Init|Description of Init *************** *** 315,331 **** /* Module initialisation */ ! extern "C" __declspec(dllexport) void initifilter() { ! char *modName = "ifilter"; ! PyObject *oModule; ! PyWinGlobals_Ensure(); ! // Create the module and add the functions ! oModule = Py_InitModule(modName, g_methods); ! if (!oModule) /* Eeek - some serious error! */ return; ! PyObject *dict = PyModule_GetDict(oModule); ! if (!dict) return; /* Another serious error!*/ // Register all of our interfaces, gateways and IIDs. --- 315,351 ---- /* Module initialisation */ ! extern "C" __declspec(dllexport) ! #if (PY_VERSION_HEX < 0x03000000) ! void initifilter(void) ! #else ! PyObject *PyInit_ifilter(void) ! #endif { ! PyObject *dict, *module; PyWinGlobals_Ensure(); ! #if (PY_VERSION_HEX < 0x03000000) ! module = Py_InitModule("ifilter", ifilter_functions); ! if (!module) return; ! dict = PyModule_GetDict(module); ! if (!dict) ! return; ! #else ! ! static PyModuleDef ifilter_def = { ! PyModuleDef_HEAD_INIT, ! "ifilter", ! "Wraps the interfaces used with Indexing Service filtering", ! -1, ! ifilter_functions ! }; ! module = PyModule_Create(&ifilter_def); ! if (!module) ! return NULL; ! dict = PyModule_GetDict(module); ! if (!dict) ! return NULL; ! #endif // Register all of our interfaces, gateways and IIDs. *************** *** 380,382 **** ADD_CONSTANT(FILTER_S_LAST_TEXT); // NOTE: New constants should go in ifiltercon.py ! } \ No newline at end of file --- 400,406 ---- ADD_CONSTANT(FILTER_S_LAST_TEXT); // NOTE: New constants should go in ifiltercon.py ! ! #if (PY_VERSION_HEX >= 0x03000000) ! return module; ! #endif ! } |