jiridanek commented on a change in pull request #1032:
URL: https://github.com/apache/qpid-dispatch/pull/1032#discussion_r576084319
##########
File path: src/router_pynode.c
##########
@@ -307,11 +307,12 @@ static PyMethodDef RouterAdapter_methods[] = {
static PyTypeObject RouterAdapterType = {
PyVarObject_HEAD_INIT(NULL, 0)
- .tp_name = "dispatch.RouterAdapter", /* tp_name*/
- .tp_basicsize = sizeof(RouterAdapter), /* tp_basicsize*/
- .tp_flags = Py_TPFLAGS_DEFAULT, /* tp_flags*/
- .tp_doc = "Dispatch Router Adapter", /* tp_doc */
- .tp_methods = RouterAdapter_methods, /* tp_methods */
+ .tp_name = "dispatch.RouterAdapter",
+ .tp_basicsize = sizeof(RouterAdapter),
+ .tp_flags = Py_TPFLAGS_DEFAULT,
+ .tp_doc = "Dispatch Router Adapter",
+ .tp_methods = RouterAdapter_methods,
+ .tp_new = PyType_GenericNew,
Review comment:
for some reason, the code is always setting `tp_new` separately
afterwards; I think there is not real advantage to that (?) and this way is
cleaner
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]