[PATCH libinput] util: harmonize container_of() definition with linux kernel one

2017-05-15 Thread Gabriel Laskar
simplify list_for_each() and list_for_each_safe(). Signed-off-by: Gabriel Laskar --- As they were no documentation for all the list functions/macros I did not add one for list_first_entry(), if it is necessary, I will add them. src/evdev-lid.c | 4 +--- src/evdev-mt-touchpad.h | 4

[PATCH libinput 1/2] util: use offsetof in container_of

2017-05-14 Thread Gabriel Laskar
gcc and clang supports offsetof (defined in stddef.h) as defined by C99 and POSIX.1-2001, use it in container_of. Signed-off-by: Gabriel Laskar --- src/libinput-util.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libinput-util.h b/src/libinput-util.h index

[PATCH libinput 2/2] udev/hwdb_parser.py: use python3 from env instead of /usr/bin

2017-05-14 Thread Gabriel Laskar
python installation does not always lives in /usr/bin, this allows to use virtualenv for example. Signed-off-by: Gabriel Laskar --- udev/parse_hwdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev/parse_hwdb.py b/udev/parse_hwdb.py index 97f04f4..b4f0b1b 100755 --- a

[PATCH libinput 0/2] Small fixes

2017-05-14 Thread Gabriel Laskar
closely the one used in the linux kernel. Would you care for a patch for that? Gabriel Laskar (2): util: use offsetof in container_of udev/hwdb_parser.py: use python3 from env instead of /usr/bin src/libinput-util.h | 5 +++-- udev/parse_hwdb.py | 2 +- 2 files changed, 4 insertions(+), 3

Re: [PATCH libinput 1/5] util: drop GCC specifics for container_of

2017-05-10 Thread Gabriel Laskar
member - (char *)(sample))) Is there any reason for container_of to not use offsetof defined in stddef.h? -- Gabriel Laskar ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel