<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Ship it!<br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Reviewed-by: Miguel A Vico Moya <mvicomoya@nvidia.com><br>
<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
--<br>
</div>
<div dir="auto" style="direction: ltr; margin: 0; padding: 0; font-family: sans-serif; font-size: 11pt; color: black; ">
Miguel<br>
</div>
<br>
</div>
<br>
<br>
<br>
<div class="gmail_quote">On Wed, Dec 13, 2017 at 4:05 AM -0800, "Emil Velikov" <span dir="ltr">
<<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="3D"ltr"">
<pre>From: Emil Velikov <emil.velikov@collabora.com>
private is a reserved keyword in C++. Thus if one is to have a backend
driver written in said language build will fail as below:
.../wayland-egl-backend.h:56:8: expected unqualified-id before ‘private’
Rename it to driver_private and update the test.
NOTE: version bump is not required since:
- this is a pure API change, ABI is identical
- hardware drivers already require [minor] changes to move to the
upstream wayland-egl-backend.h
Cc: Arnaud Vrac <rawoul@gmail.com>
Cc: Miguel A . Vico <mvicomoya@nvidia.com>
Suggested-by: Arnaud Vrac <rawoul@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
Patch depends on the https://patchwork.freedesktop.org/series/31663/
series. One could apply it directly after 1/8 of ^^ although I kept
it separate to emphasise, "why change" and "its safe".
---
egl/wayland-egl-abi-check.c | 6 +++---
egl/wayland-egl-backend.h | 2 +-
egl/wayland-egl.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/egl/wayland-egl-abi-check.c b/egl/wayland-egl-abi-check.c
index 62c51a2..faa6b57 100644
--- a/egl/wayland-egl-abi-check.c
+++ b/egl/wayland-egl-abi-check.c
@@ -91,7 +91,7 @@ struct wl_egl_window_v3 {
int attached_width;
int attached_height;
- void *private;
+ void *driver_private;
void (*resize_callback)(struct wl_egl_window *, void *);
void (*destroy_window_callback)(void *);
@@ -208,7 +208,7 @@ int main(int argc, char **argv)
CHECK_MEMBER (_v2, _v3, dy);
CHECK_MEMBER (_v2, _v3, attached_width);
CHECK_MEMBER (_v2, _v3, attached_height);
- CHECK_MEMBER (_v2, _v3, private);
+ CHECK_RENAMED_MEMBER(_v2, _v3, private, driver_private);
CHECK_MEMBER (_v2, _v3, resize_callback);
CHECK_MEMBER (_v2, _v3, destroy_window_callback);
@@ -223,7 +223,7 @@ int main(int argc, char **argv)
CHECK_MEMBER_CURRENT(_v3, dy);
CHECK_MEMBER_CURRENT(_v3, attached_width);
CHECK_MEMBER_CURRENT(_v3, attached_height);
- CHECK_MEMBER_CURRENT(_v3, private);
+ CHECK_MEMBER_CURRENT(_v3, driver_private);
CHECK_MEMBER_CURRENT(_v3, resize_callback);
CHECK_MEMBER_CURRENT(_v3, destroy_window_callback);
CHECK_MEMBER_CURRENT(_v3, surface);
diff --git a/egl/wayland-egl-backend.h b/egl/wayland-egl-backend.h
index 3c23a56..869c86f 100644
--- a/egl/wayland-egl-backend.h
+++ b/egl/wayland-egl-backend.h
@@ -53,7 +53,7 @@ struct wl_egl_window {
int attached_width;
int attached_height;
- void *private;
+ void *driver_private;
void (*resize_callback)(struct wl_egl_window *, void *);
void (*destroy_window_callback)(void *);
diff --git a/egl/wayland-egl.c b/egl/wayland-egl.c
index 02ac04e..a60f899 100644
--- a/egl/wayland-egl.c
+++ b/egl/wayland-egl.c
@@ -49,7 +49,7 @@ wl_egl_window_resize(struct wl_egl_window *egl_window,
egl_window->dy = dy;
if (egl_window->resize_callback)
- egl_window->resize_callback(egl_window, egl_window->private);
+ egl_window->resize_callback(egl_window, egl_window->driver_private);
}
WL_EXPORT struct wl_egl_window *
@@ -89,7 +89,7 @@ WL_EXPORT void
wl_egl_window_destroy(struct wl_egl_window *egl_window)
{
if (egl_window->destroy_window_callback)
- egl_window->destroy_window_callback(egl_window->private);
+ egl_window->destroy_window_callback(egl_window->driver_private);
free(egl_window);
}
--
2.15.0
</emil.velikov@collabora.com></rawoul@gmail.com></mvicomoya@nvidia.com></rawoul@gmail.com></emil.velikov@collabora.com></pre>
</div>
</blockquote>
</div>
</body>
</html>