Changeset 22394 in vbox for trunk/src/libs/xpcom18a4/python
- Timestamp:
- Aug 22, 2009 7:11:19 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51357
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/python/src/module/_xpcom.cpp
r22359 r22394 573 573 } 574 574 575 PR_STATIC_CALLBACK(void *) PyHandleEvent(PLEvent *ev) 576 { 577 return nsnull; 578 } 579 580 PR_STATIC_CALLBACK(void) PyDestroyEvent(PLEvent *ev) 581 { 582 delete ev; 583 } 584 585 static PyObject* 586 PyXPCOMMethod_InterruptWait(PyObject *self, PyObject *args) 587 { 588 nsIEventQueue* q = g_mainEventQ; 589 PRInt32 result = 0; 590 nsresult rc; 591 592 PLEvent *ev = new PLEvent(); 593 if (!ev) 594 { 595 result = 1; 596 goto done; 597 } 598 q->InitEvent (ev, NULL, PyHandleEvent, PyDestroyEvent); 599 rc = q->PostEvent (ev); 600 if (NS_FAILED(rc)) 601 { 602 result = 2; 603 goto done; 604 } 605 606 done: 607 return PyInt_FromLong(result); 608 } 609 575 610 static void deinitVBoxPython(); 576 611 … … 678 713 #ifdef VBOX 679 714 {"WaitForEvents", PyXPCOMMethod_WaitForEvents, 1}, 715 {"InterruptWait", PyXPCOMMethod_InterruptWait, 1}, 680 716 {"DeinitCOM", PyXPCOMMethod_DeinitCOM, 1}, 681 717 {"AttachThread", PyXPCOMMethod_AttachThread, 1},
Note:
See TracChangeset
for help on using the changeset viewer.