Py##
name##Buffer_Type.tp_name = (
char*)
"ROOT.Py"#
name"Buffer"; \
Py##
name##Buffer_Type.tp_base = &PyBuffer_Type; \
Py##
name##Buffer_Type.tp_as_buffer = PyBuffer_Type.tp_as_buffer; \
Py##
name##Buffer_SeqMethods.sq_length = (
lenfunc)buffer_length; \
Py##
name##Buffer_Type.tp_as_sequence = &Py##
name##Buffer_SeqMethods; \
if ( PyBuffer_Type.tp_as_mapping ) { \
Py##
name##Buffer_MapMethods.mp_length = (
lenfunc)buffer_length; \
Py##
name##Buffer_MapMethods.mp_subscript = (binaryfunc)
name##_buffer_subscript;\
Py##
name##Buffer_MapMethods.mp_ass_subscript = (objobjargproc)pyroot_buffer_ass_subscript;\
Py##
name##Buffer_Type.tp_as_mapping = &Py##
name##Buffer_MapMethods; \
} \
Py##
name##Buffer_Type.tp_str = (reprfunc)
name##_buffer_str; \
Py##
name##Buffer_Type.tp_methods = buffer_methods; \
Py##
name##Buffer_Type.tp_getset = buffer_getset; \
PyType_Ready( &Py##
name##Buffer_Type );