mirror of https://github.com/python/cpython
Fix some formatting
This commit is contained in:
parent
ed63754ef6
commit
d867bad0fc
|
@ -1078,9 +1078,10 @@ PyObject *_ctypes_callproc(PPROC pProc,
|
||||||
args[0].ffi_type = &ffi_type_pointer;
|
args[0].ffi_type = &ffi_type_pointer;
|
||||||
args[0].value.p = pIunk;
|
args[0].value.p = pIunk;
|
||||||
pa = &args[1];
|
pa = &args[1];
|
||||||
} else
|
} else {
|
||||||
#endif
|
#endif
|
||||||
pa = &args[0];
|
pa = &args[0];
|
||||||
|
}
|
||||||
|
|
||||||
/* Convert the arguments */
|
/* Convert the arguments */
|
||||||
for (i = 0; i < n; ++i, ++pa) {
|
for (i = 0; i < n; ++i, ++pa) {
|
||||||
|
@ -1096,9 +1097,7 @@ PyObject *_ctypes_callproc(PPROC pProc,
|
||||||
if (argtypes && argtype_count > i) {
|
if (argtypes && argtype_count > i) {
|
||||||
PyObject *v;
|
PyObject *v;
|
||||||
converter = PyTuple_GET_ITEM(argtypes, i);
|
converter = PyTuple_GET_ITEM(argtypes, i);
|
||||||
v = PyObject_CallFunctionObjArgs(converter,
|
v = PyObject_CallFunctionObjArgs(converter, arg, NULL);
|
||||||
arg,
|
|
||||||
NULL);
|
|
||||||
if (v == NULL) {
|
if (v == NULL) {
|
||||||
_ctypes_extend_error(PyExc_ArgError, "argument %d: ", i+1);
|
_ctypes_extend_error(PyExc_ArgError, "argument %d: ", i+1);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
@ -1175,9 +1174,10 @@ PyObject *_ctypes_callproc(PPROC pProc,
|
||||||
retval = PyErr_SetFromWindowsErr(*(int *)resbuf);
|
retval = PyErr_SetFromWindowsErr(*(int *)resbuf);
|
||||||
else
|
else
|
||||||
retval = PyLong_FromLong(*(int *)resbuf);
|
retval = PyLong_FromLong(*(int *)resbuf);
|
||||||
} else
|
} else {
|
||||||
#endif
|
#endif
|
||||||
retval = GetResult(restype, resbuf, checker);
|
retval = GetResult(restype, resbuf, checker);
|
||||||
|
}
|
||||||
cleanup:
|
cleanup:
|
||||||
for (i = 0; i < argcount; ++i)
|
for (i = 0; i < argcount; ++i)
|
||||||
Py_XDECREF(args[i].keep);
|
Py_XDECREF(args[i].keep);
|
||||||
|
@ -1313,9 +1313,9 @@ call_commethod(PyObject *self, PyObject *args)
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
FUNCFLAG_HRESULT, /* flags */
|
FUNCFLAG_HRESULT, /* flags */
|
||||||
argtypes, /* self->argtypes */
|
argtypes, /* self->argtypes */
|
||||||
NULL, /* self->restype */
|
NULL, /* self->restype */
|
||||||
NULL); /* checker */
|
NULL); /* checker */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1480,9 +1480,9 @@ call_cdeclfunction(PyObject *self, PyObject *args)
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
FUNCFLAG_CDECL, /* flags */
|
FUNCFLAG_CDECL, /* flags */
|
||||||
NULL, /* self->argtypes */
|
NULL, /* self->argtypes */
|
||||||
NULL, /* self->restype */
|
NULL, /* self->restype */
|
||||||
NULL); /* checker */
|
NULL); /* checker */
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue