Backout xptcall because linux tboxes are stupid, I think.
git-svn-id: svn://10.0.0.236/trunk@215369 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -44,7 +44,7 @@ from xpcom import xpt, COMException, nsError, logger
|
||||
from xpcom._xpcom import IID_nsISupports, IID_nsIClassInfo, \
|
||||
IID_nsISupportsCString, IID_nsISupportsString, \
|
||||
IID_nsISupportsWeakReference, IID_nsIWeakReference, \
|
||||
XPTI_GetInterfaceInfoManager, GetComponentManager, NS_InvokeByIndex
|
||||
XPTI_GetInterfaceInfoManager, GetComponentManager, XPTC_InvokeByIndex
|
||||
|
||||
# Attribute names we may be __getattr__'d for, but know we don't want to delegate
|
||||
# Could maybe just look for startswith("__") but this may screw things for some objects.
|
||||
@@ -60,7 +60,7 @@ _float_interfaces = _just_float_interfaces + _just_long_interfaces + _just_int_i
|
||||
|
||||
method_template = """
|
||||
def %s(self, %s):
|
||||
return NS_InvokeByIndex(self._comobj_, %d, (%s, (%s)))
|
||||
return XPTC_InvokeByIndex(self._comobj_, %d, (%s, (%s)))
|
||||
"""
|
||||
def _MakeMethodCode(method):
|
||||
# Build a declaration
|
||||
@@ -457,7 +457,7 @@ class _Interface(_XPCOMBase):
|
||||
if len(param_infos)!=1: # Only expecting a retval
|
||||
raise RuntimeError, "Can't get properties with this many args!"
|
||||
args = ( param_infos, () )
|
||||
return NS_InvokeByIndex(self._comobj_, method_index, args)
|
||||
return XPTC_InvokeByIndex(self._comobj_, method_index, args)
|
||||
|
||||
# See if we have a method info waiting to be turned into a method.
|
||||
# Do this last as it is a one-off hit.
|
||||
@@ -485,7 +485,7 @@ class _Interface(_XPCOMBase):
|
||||
if len(param_infos)!=1: # Only expecting a single input val
|
||||
raise RuntimeError, "Can't set properties with this many args!"
|
||||
real_param_infos = ( param_infos, (val,) )
|
||||
return NS_InvokeByIndex(self._comobj_, method_index, real_param_infos)
|
||||
return XPTC_InvokeByIndex(self._comobj_, method_index, real_param_infos)
|
||||
|
||||
def __repr__(self):
|
||||
return "<XPCOM interface '%s'>" % (self._object_name_,)
|
||||
|
||||
@@ -144,7 +144,7 @@ PyXPCOMMethod_XPTI_GetInterfaceInfoManager(PyObject *self, PyObject *args)
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
PyXPCOMMethod_NS_InvokeByIndex(PyObject *self, PyObject *args)
|
||||
PyXPCOMMethod_XPTC_InvokeByIndex(PyObject *self, PyObject *args)
|
||||
{
|
||||
PyObject *obIS, *obParams;
|
||||
nsCOMPtr<nsISupports> pis;
|
||||
@@ -182,7 +182,7 @@ PyXPCOMMethod_NS_InvokeByIndex(PyObject *self, PyObject *args)
|
||||
|
||||
nsresult r;
|
||||
Py_BEGIN_ALLOW_THREADS;
|
||||
r = NS_InvokeByIndex(pis, index, arg_helper.m_num_array, arg_helper.m_var_array);
|
||||
r = XPTC_InvokeByIndex(pis, index, arg_helper.m_num_array, arg_helper.m_var_array);
|
||||
Py_END_ALLOW_THREADS;
|
||||
if ( NS_FAILED(r) )
|
||||
return PyXPCOM_BuildPyException(r);
|
||||
@@ -435,7 +435,7 @@ static struct PyMethodDef xpcom_methods[]=
|
||||
{"GetComponentManager", PyXPCOMMethod_GetComponentManager, 1},
|
||||
{"GetComponentRegistrar", PyXPCOMMethod_GetComponentRegistrar, 1},
|
||||
{"XPTI_GetInterfaceInfoManager", PyXPCOMMethod_XPTI_GetInterfaceInfoManager, 1},
|
||||
{"NS_InvokeByIndex", PyXPCOMMethod_XPTC_InvokeByIndex, 1},
|
||||
{"XPTC_InvokeByIndex", PyXPCOMMethod_XPTC_InvokeByIndex, 1},
|
||||
{"GetServiceManager", PyXPCOMMethod_GetServiceManager, 1},
|
||||
{"IID", PyXPCOMMethod_IID, 1}, // IID is wrong - deprecated - not just IID, but CID, etc.
|
||||
{"ID", PyXPCOMMethod_IID, 1}, // This is the official name.
|
||||
|
||||
Reference in New Issue
Block a user