diff --git a/extensions/python/xpcom/src/PyIVariant.cpp b/extensions/python/xpcom/src/PyIVariant.cpp index 8d1f0dcd4dd..ca5524408af 100644 --- a/extensions/python/xpcom/src/PyIVariant.cpp +++ b/extensions/python/xpcom/src/PyIVariant.cpp @@ -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 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);