ret = NS_COMFALSE;
ret = NS_PYXPCOM_NO_SUCH_METHOD;
static nsresult do_dispatch(	PyObject *pPyObject,	PyObject **ppResult,	const char *szMethodName,	const char *szFormat,	va_list va	){	NS_PRECONDITION(ppResult, "Must provide a result buffer");	*ppResult = nsnull;	// Build the Invoke arguments...	PyObject *args = NULL;	PyObject *method = NULL;	PyObject *real_ob = NULL;	nsresult ret = NS_ERROR_FAILURE;	if ( szFormat )		args = Py_VaBuildValue((char *)szFormat, va);	else		args = PyTuple_New(0);	if ( !args )		goto done;	// make sure a tuple.	if ( !PyTuple_Check(args) ) {		PyObject *a = PyTuple_New(1);		if ( a == NULL )		{			Py_DECREF(args);			goto done;		}		PyTuple_SET_ITEM(a, 0, args);		args = a;	}	// Bit to a hack here to maintain the use of a policy.	// We actually get the policies underlying object	// to make the call on.	real_ob = PyObject_GetAttrString(pPyObject, "_obj_");	if (real_ob == NULL) {		PyErr_Format(PyExc_AttributeError, "The policy object does not have an '_obj_' attribute.");		goto done;	}	method = PyObject_GetAttrString(real_ob, (char *)szMethodName);	if ( !method ) {		PyErr_Clear();		ret = NS_COMFALSE;		goto done;	}	// Make the call	*ppResult = PyEval_CallObject(method, args);	ret = *ppResult ? NS_OK : NS_ERROR_FAILURE;done:	Py_XDECREF(method);	Py_XDECREF(real_ob);	Py_XDECREF(args);	return ret;}