зеркало из https://github.com/mozilla/pjs.git
GetAsISupports was actually calling GetAsInterface.
Not part of the default build.
This commit is contained in:
Родитель
162332448b
Коммит
f55db5c8c8
|
@ -141,12 +141,11 @@ static PyObject *GetAsInterface(PyObject *self, PyObject *args) {
|
|||
static PyObject *GetAsISupports(PyObject *self, PyObject *args) {
|
||||
nsIVariant *pI = GetI(self);
|
||||
if (pI==NULL) return NULL;
|
||||
if (!PyArg_ParseTuple(args, ":GetAsInterface")) return NULL;
|
||||
if (!PyArg_ParseTuple(args, ":GetAsISupports")) return NULL;
|
||||
nsCOMPtr<nsISupports> p;
|
||||
nsIID *iid;
|
||||
nsresult nr = pI->GetAsInterface(&iid, getter_AddRefs(p));
|
||||
nsresult nr = pI->GetAsISupports(getter_AddRefs(p));
|
||||
if (NS_FAILED(nr)) return PyXPCOM_BuildPyException(nr);
|
||||
return Py_nsISupports::PyObjectFromInterface(p, *iid);
|
||||
return Py_nsISupports::PyObjectFromInterface(p, NS_GET_IID(nsISupports));
|
||||
}
|
||||
|
||||
extern PyObject *PyObject_FromVariantArray( Py_nsISupports*, nsIVariant *v);
|
||||
|
|
Загрузка…
Ссылка в новой задаче