Changeset 12379 in vbox for trunk/src/libs/xpcom18a4/python
- Timestamp:
- Sep 10, 2008 9:53:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
r11904 r12379 72 72 73 73 #ifdef VBOX_PYXPCOM 74 #define MODULE_NAME "VBoxPython" 74 # ifdef VBOX_PYXPCOM_VERSIONED 75 # if PY_VERSION_HEX >= 0x02080000 76 # define MODULE_NAME "VBoxPython2_8" 77 # elif PY_VERSION_HEX >= 0x02070000 78 # define MODULE_NAME "VBoxPython2_7" 79 # elif PY_VERSION_HEX >= 0x02060000 80 # define MODULE_NAME "VBoxPython2_6" 81 # elif PY_VERSION_HEX >= 0x02050000 82 # define MODULE_NAME "VBoxPython2_5" 83 # elif PY_VERSION_HEX >= 0x02040000 84 # define MODULE_NAME "VBoxPython2_4" 85 # elif PY_VERSION_HEX >= 0x02030000 86 # define MODULE_NAME "VBoxPython2_3" 87 # else 88 # error "Fix module versioning. 89 # endif 90 # else 91 # define MODULE_NAME "VBoxPython" 92 # endif 75 93 #else 76 94 #define MODULE_NAME "_xpcom" … … 163 181 return PyXPCOMMethod_GetComponentManager(self, args); 164 182 } 165 183 166 184 static PyObject * 167 185 PyXPCOMMethod_XPTI_GetInterfaceInfoManager(PyObject *self, PyObject *args) … … 208 226 // will return the "original" gateway when QI'd for nsISupports) 209 227 if (!Py_nsISupports::InterfaceFromPyObject( 210 obIS, 211 Py_nsIID_NULL, 212 getter_AddRefs(pis), 228 obIS, 229 Py_nsIID_NULL, 230 getter_AddRefs(pis), 213 231 PR_FALSE)) 214 232 return NULL; … … 266 284 nsIInternalPython *iob = NULL; 267 285 PyObject *ret = NULL; 268 if (!Py_nsISupports::InterfaceFromPyObject(ob, 269 NS_GET_IID(nsISupports), 270 &uob, 286 if (!Py_nsISupports::InterfaceFromPyObject(ob, 287 NS_GET_IID(nsISupports), 288 &uob, 271 289 PR_FALSE)) 272 290 goto done; … … 356 374 nsCOMPtr<nsISupports> presult; 357 375 Py_BEGIN_ALLOW_THREADS; 358 nsCOMPtr<nsIProxyObjectManager> proxyMgr = 376 nsCOMPtr<nsIProxyObjectManager> proxyMgr = 359 377 do_GetService(kProxyObjectManagerCID, &rv_proxy); 360 378 … … 404 422 405 423 nsCOMPtr<nsIVariant> var; 406 if (!Py_nsISupports::InterfaceFromPyObject(ob, 407 NS_GET_IID(nsISupports), 408 getter_AddRefs(var), 424 if (!Py_nsISupports::InterfaceFromPyObject(ob, 425 NS_GET_IID(nsISupports), 426 getter_AddRefs(var), 409 427 PR_FALSE)) 410 428 return PyErr_Format(PyExc_ValueError, … … 482 500 {"GetServiceManager", PyXPCOMMethod_GetServiceManager, 1}, 483 501 {"GetGlobalServiceManager", PyXPCOMMethod_GetGlobalServiceManager, 1}, // deprecated 484 {"IID", PyXPCOMMethod_IID, 1}, // IID is wrong - deprecated - not just IID, but CID, etc. 502 {"IID", PyXPCOMMethod_IID, 1}, // IID is wrong - deprecated - not just IID, but CID, etc. 485 503 {"ID", PyXPCOMMethod_IID, 1}, // This is the official name. 486 504 {"NS_ShutdownXPCOM", PyXPCOMMethod_NS_ShutdownXPCOM, 1}, … … 517 535 // 518 536 extern "C" NS_EXPORT 519 void 537 void 520 538 init_xpcom() { 521 539 PyObject *oModule; … … 591 609 592 610 extern "C" NS_EXPORT 593 void 611 void 612 # ifdef VBOX_PYXPCOM_VERSIONED 613 # if PY_VERSION_HEX >= 0x02080000 614 initVBoxPython2_8() { 615 # elif PY_VERSION_HEX >= 0x02070000 616 initVBoxPython2_7() { 617 # elif PY_VERSION_HEX >= 0x02060000 618 initVBoxPython2_6() { 619 # elif PY_VERSION_HEX >= 0x02050000 620 initVBoxPython2_5() { 621 # elif PY_VERSION_HEX >= 0x02040000 622 # error "you must test VBOX_PYXPCOM_VERSIONED on 2.4" 594 623 initVBoxPython() { 624 # elif PY_VERSION_HEX >= 0x02030000 625 # error "you must test VBOX_PYXPCOM_VERSIONED on 2.3" 626 initVBoxPython() { 627 # else 628 # error "Fix module versioning. 629 # endif 630 # else 631 initVBoxPython() { 632 # endif 595 633 static bool s_vboxInited = false; 596 634 if (!s_vboxInited) { … … 610 648 rc = RTR3Init(); 611 649 } 612 #endif 650 #endif 613 651 614 652 rc = com::Initialize();
Note:
See TracChangeset
for help on using the changeset viewer.