{ \
PyUFuncObject *ufunc = \
(PyUFuncObject *)PyObject_GetAttrString(numpy, #
name); \
int _types[3] = {Register::getTypeCode<T1>(), Register::getTypeCode<T2>(), \
Register::getTypeCode<R>()}; \
if (!ufunc) { \
\
} \
if (sizeof(_types) / sizeof(int) != ufunc->nargs) { \
PyErr_Format(PyExc_AssertionError, \
"ufunc %s takes %d arguments, our loop takes %lu", #
name, \
ufunc->nargs, \
(unsigned long)(sizeof(_types) / sizeof(int))); \
Py_DECREF(ufunc); \
} \
if (PyUFunc_RegisterLoopForType((PyUFuncObject *)ufunc, code, \
internal::binary_op_##name<T1, T2, R>, \
_types, 0) < 0) { \
\
\
} \
Py_DECREF(ufunc); \
}