On Thu, 10 Apr 2014 11:57:12 -0700
Kristian Høgsberg <[email protected]> wrote:

> On Thu, Apr 10, 2014 at 3:41 AM, Pekka Paalanen <[email protected]> wrote:
> > On Tue,  8 Apr 2014 20:51:45 +0200
> > John Kåre Alsaker <[email protected]> wrote:
> >
> > John, you forgot the commit message.
> >
> >> ---
> >>  src/gl-renderer.h | 1 -
> >>  1 file changed, 1 deletion(-)
> >>
> >> diff --git a/src/gl-renderer.h b/src/gl-renderer.h
> >> index db42f6c..6cd5f54 100644
> >> --- a/src/gl-renderer.h
> >> +++ b/src/gl-renderer.h
> >> @@ -101,4 +101,3 @@ struct gl_renderer_interface {
> >>       void (*print_egl_error_state)(void);
> >>  };
> >>
> >> -struct gl_renderer_interface gl_renderer_interface;
> >
> > The rationale here is, that this line would create an instance of
> > gl_renderer_interface in every compilation unit that included
> > gl-renderer.h. This is not necessary, and it can actually be harmful by
> > masking the real exported gl_renderer_interface symbol, if you added
> > another compilation unit to gl-renderer.so, causing a runtime failure in
> > loading it. (Which is how John found this.)
> >
> > gl-renderer.c already creates the exported symbol.
> 
> I don't think that was ever the intention, I think we just forgot an
> extern there.  And now that we look it up using dlsym() we don't need
> the forward declaration anymore.

That's just the reason why removing it is correct, and what problems it
may cause, without any reference to why it may have been there.

The gl_renderer_interface was from the beginning looked it up via
dlsym(). We have never relied on it being a directly available symbol.


Thanks,
pq
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to