[pywin32-checkins] pywin32/com/win32comext/ifilter/src PyIFilter.cpp, 1.7, 1.8
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-09 07:21:12
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14086/com/win32comext/ifilter/src Modified Files: PyIFilter.cpp Log Message: More modules use the PYWIN_MODULE_* macros Index: PyIFilter.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/ifilter/src/PyIFilter.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** PyIFilter.cpp 13 Nov 2008 11:11:58 -0000 1.7 --- PyIFilter.cpp 9 Dec 2008 07:21:06 -0000 1.8 *************** *** 280,285 **** } ! #define ADD_CONSTANT(tok) AddConstant(dict, #tok, tok) ! #define ADD_IID(tok) AddIID(dict, #tok, tok) // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering --- 280,285 ---- } ! #define ADD_CONSTANT(tok) if (0 != AddConstant(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR ! #define ADD_IID(tok) if (0 != AddIID(dict, #tok, tok)) PYWIN_MODULE_INIT_RETURN_ERROR // @object PyIFilter|Wraps the interfaces used with Indexing Service filtering *************** *** 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,322 ---- /* Module initialisation */ ! PYWIN_MODULE_INIT_FUNC(ifilter) { ! PYWIN_MODULE_INIT_PREPARE(ifilter, ifilter_functions, ! "Wraps the interfaces used with Indexing Service filtering"); // Register all of our interfaces, gateways and IIDs. *************** *** 380,382 **** --- 371,375 ---- ADD_CONSTANT(FILTER_S_LAST_TEXT); // NOTE: New constants should go in ifiltercon.py + + PYWIN_MODULE_INIT_RETURN_SUCCESS; } |