[pywin32-checkins] pywin32/com/win32comext/bits/src bits.cpp, 1.2, 1.3
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-12-08 13:16:42
|
Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv11284/com/win32comext/bits/src Modified Files: bits.cpp Log Message: py3k friendly: PYWIN_MODULE_* macros to help with module's init etc. Index: bits.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/src/bits.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** bits.cpp 12 Feb 2008 00:10:57 -0000 1.2 --- bits.cpp 8 Dec 2008 13:16:36 -0000 1.3 *************** *** 106,122 **** }; ! extern "C" __declspec(dllexport) void initbits() { ! PyObject *module; ! module = Py_InitModule("bits", bits_methods); ! if (module==NULL) ! return; ! PyObject *dict = PyModule_GetDict(module); ! if (dict==NULL) ! return; // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // auth scheme PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_BASIC", BG_AUTH_SCHEME_BASIC); --- 106,117 ---- }; ! PYWIN_MODULE_INIT_FUNC(bits) { ! PYWIN_MODULE_INIT_PREPARE(bits, bits_methods, ! "A module, encapsulating the Background Intelligent Transfer Service (bits)"); // Register all of our interfaces, gateways and IIDs. PyCom_RegisterExtensionSupport(dict, register_data, sizeof(register_data)/sizeof(PyCom_InterfaceSupportInfo)); ! // auth scheme PyModule_AddIntConstant(module, "BG_AUTH_SCHEME_BASIC", BG_AUTH_SCHEME_BASIC); *************** *** 130,143 **** PyModule_AddIntConstant(module, "BG_AUTH_TARGET_PROXY", BG_AUTH_TARGET_PROXY); - // Requires Vista // // cert store location ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER", BG_CERT_STORE_LOCATION_CURRENT_USER); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_SERVICE", BG_CERT_STORE_LOCATION_CURRENT_SERVICE); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_SERVICES", BG_CERT_STORE_LOCATION_SERVICES); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_USERS", BG_CERT_STORE_LOCATION_USERS); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY", BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY); ! // PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE); // error context --- 125,137 ---- PyModule_AddIntConstant(module, "BG_AUTH_TARGET_PROXY", BG_AUTH_TARGET_PROXY); // // cert store location ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER", BG_CERT_STORE_LOCATION_CURRENT_USER); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_SERVICE", BG_CERT_STORE_LOCATION_CURRENT_SERVICE); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_SERVICES", BG_CERT_STORE_LOCATION_SERVICES); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_USERS", BG_CERT_STORE_LOCATION_USERS); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY", BG_CERT_STORE_LOCATION_CURRENT_USER_GROUP_POLICY); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_GROUP_POLICY); ! PyModule_AddIntConstant(module, "BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE", BG_CERT_STORE_LOCATION_LOCAL_MACHINE_ENTERPRISE); // error context *************** *** 186,189 **** // PyModule_AddIntConstant(module, "BG_NOTIFY_FILE_TRANSFERRED", BG_NOTIFY_FILE_TRANSFERRED); ! PyModule_AddIntConstant(module, "BG_JOB_ENUM_ALL_USERS", BG_JOB_ENUM_ALL_USERS); } --- 180,184 ---- // PyModule_AddIntConstant(module, "BG_NOTIFY_FILE_TRANSFERRED", BG_NOTIFY_FILE_TRANSFERRED); ! PyModule_AddIntConstant(module, "BG_JOB_ENUM_ALL_USERS", BG_JOB_ENUM_ALL_USERS); ! PYWIN_MODULE_INIT_RETURN_SUCCESS; } |