Hi Thomas,
On 14/11/18 17:29, Thomas Huth wrote:
On 2018-11-14 16:32, Philippe Mathieu-Daudé wrote:
What about enforcing the constness in the typedef?
-- >8 --
@@ -32 +32 @@ typedef struct VMStateDescription VMStateDescription;
-typedef struct VMStateField VMStateField;
+typedef const struct VMStateField VMStateField;
---
Please don't. For rationale, see:
https://www.kernel.org/doc/html/v4.19/process/coding-style.html#typedefs
Thanks for the pointer, I am interested in understanding why not do
that. However in the link you pasted I don't see a rational about
enforcing constness, I understand that since this case doesn't match the
5 rules, we should use 'struct VMStateField' directly and remove the
typedef.