diff options
author | Campbell Barton <campbell@blender.org> | 2022-11-07 14:34:35 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-11-07 14:38:32 +0300 |
commit | e555ede626dade2c9b6449ec7dcdda22b2585fd4 (patch) | |
tree | 0e57bfd1828802cdc4e3fc6eca915f682fccdc18 /source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp | |
parent | 719332d1208e69689ebad9729955226a92c877cb (diff) |
Cleanup: unify struct declaration style for Python types, update names
Use struct identifiers in comments before the value.
This has some advantages:
- The struct identifiers didn't mix well with other code-comments,
where other comments were wrapped onto the next line.
- Minor changes could re-align all other comments in the struct.
- PyVarObject_HEAD_INIT & tp_name are no longer placed on the same line.
Remove overly verbose comments copied from PyTypeObject (Python v2.x),
these aren't especially helpful and get outdated.
Also corrected some outdated names:
- PyTypeObject.tp_print -> tp_vectorcall_offset
- PyTypeObject.tp_reserved -> tp_as_async
Diffstat (limited to 'source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp')
-rw-r--r-- | source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp index 7f5b98da223..73049f8e0c2 100644 --- a/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp +++ b/source/blender/freestyle/intern/python/UnaryFunction0D/BPy_UnaryFunction0DVectorViewShape.cpp @@ -121,43 +121,44 @@ static PyObject *UnaryFunction0DVectorViewShape___call__(BPy_UnaryFunction0DVect /*-----------------------BPy_UnaryFunction0DVectorViewShape type definition ---------------------*/ PyTypeObject UnaryFunction0DVectorViewShape_Type = { - PyVarObject_HEAD_INIT(nullptr, 0) "UnaryFunction0DVectorViewShape", /* tp_name */ - sizeof(BPy_UnaryFunction0DVectorViewShape), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)UnaryFunction0DVectorViewShape___dealloc__, /* tp_dealloc */ - 0, /* tp_vectorcall_offset */ - nullptr, /* tp_getattr */ - nullptr, /* tp_setattr */ - nullptr, /* tp_reserved */ - (reprfunc)UnaryFunction0DVectorViewShape___repr__, /* tp_repr */ - nullptr, /* tp_as_number */ - nullptr, /* tp_as_sequence */ - nullptr, /* tp_as_mapping */ - nullptr, /* tp_hash */ - (ternaryfunc)UnaryFunction0DVectorViewShape___call__, /* tp_call */ - nullptr, /* tp_str */ - nullptr, /* tp_getattro */ - nullptr, /* tp_setattro */ - nullptr, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */ - UnaryFunction0DVectorViewShape___doc__, /* tp_doc */ - nullptr, /* tp_traverse */ - nullptr, /* tp_clear */ - nullptr, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - nullptr, /* tp_iter */ - nullptr, /* tp_iternext */ - nullptr, /* tp_methods */ - nullptr, /* tp_members */ - nullptr, /* tp_getset */ - &UnaryFunction0D_Type, /* tp_base */ - nullptr, /* tp_dict */ - nullptr, /* tp_descr_get */ - nullptr, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)UnaryFunction0DVectorViewShape___init__, /* tp_init */ - nullptr, /* tp_alloc */ - nullptr, /* tp_new */ + PyVarObject_HEAD_INIT(nullptr, 0) + /*tp_name*/ "UnaryFunction0DVectorViewShape", + /*tp_basicsize*/ sizeof(BPy_UnaryFunction0DVectorViewShape), + /*tp_itemsize*/ 0, + /*tp_dealloc*/ (destructor)UnaryFunction0DVectorViewShape___dealloc__, + /*tp_vectorcall_offset*/ 0, + /*tp_getattr*/ nullptr, + /*tp_setattr*/ nullptr, + /*tp_as_async*/ nullptr, + /*tp_repr*/ (reprfunc)UnaryFunction0DVectorViewShape___repr__, + /*tp_as_number*/ nullptr, + /*tp_as_sequence*/ nullptr, + /*tp_as_mapping*/ nullptr, + /*tp_hash*/ nullptr, + /*tp_call*/ (ternaryfunc)UnaryFunction0DVectorViewShape___call__, + /*tp_str*/ nullptr, + /*tp_getattro*/ nullptr, + /*tp_setattro*/ nullptr, + /*tp_as_buffer*/ nullptr, + /*tp_flags*/ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, + /*tp_doc*/ UnaryFunction0DVectorViewShape___doc__, + /*tp_traverse*/ nullptr, + /*tp_clear*/ nullptr, + /*tp_richcompare*/ nullptr, + /*tp_weaklistoffset*/ 0, + /*tp_iter*/ nullptr, + /*tp_iternext*/ nullptr, + /*tp_methods*/ nullptr, + /*tp_members*/ nullptr, + /*tp_getset*/ nullptr, + /*tp_base*/ &UnaryFunction0D_Type, + /*tp_dict*/ nullptr, + /*tp_descr_get*/ nullptr, + /*tp_descr_set*/ nullptr, + /*tp_dictoffset*/ 0, + /*tp_init*/ (initproc)UnaryFunction0DVectorViewShape___init__, + /*tp_alloc*/ nullptr, + /*tp_new*/ nullptr, }; /////////////////////////////////////////////////////////////////////////////////////////// |