Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-10 Thread Bryce Harrington
On Tue, Mar 10, 2015 at 12:01:53PM -0700, Bill Spitzak wrote: > > > On 03/09/2015 11:41 PM, Pekka Paalanen wrote: > >On Mon, 09 Mar 2015 11:13:20 -0700 > >Bill Spitzak wrote: > > > >>On 03/09/2015 06:34 AM, Pekka Paalanen wrote: > >> > >>>What performance concerns do you have? > >> > >>I suspect

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-10 Thread Bill Spitzak
On 03/09/2015 11:41 PM, Pekka Paalanen wrote: On Mon, 09 Mar 2015 11:13:20 -0700 Bill Spitzak wrote: On 03/09/2015 06:34 AM, Pekka Paalanen wrote: What performance concerns do you have? I suspect the worry was about allocating and freeing a temporary array, but your idea of the caller pa

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Pekka Paalanen
On Mon, 09 Mar 2015 11:13:20 -0700 Bill Spitzak wrote: > On 03/09/2015 06:34 AM, Pekka Paalanen wrote: > > > What performance concerns do you have? > > I suspect the worry was about allocating and freeing a temporary array, > but your idea of the caller passing the array avoids it. > > I feel

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Bill Spitzak
On 03/09/2015 06:34 AM, Pekka Paalanen wrote: What performance concerns do you have? I suspect the worry was about allocating and freeing a temporary array, but your idea of the caller passing the array avoids it. I feel like it would be better to reduce the number of arguments to only a s

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Daniel Stone
Hi, On 9 March 2015 at 07:49, Pekka Paalanen wrote: > On Mon, 23 Feb 2015 17:20:37 -0800 > Bryce Harrington wrote: >> However, I suspect this API would be better named as >> wl_global_find_first(). >> >> A more general wl_global_find() I would expect to be returning a list of >> results. >> >> O

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Pekka Paalanen
On Mon, 9 Mar 2015 01:51:27 -0700 Bryce Harrington wrote: > On Mon, Mar 09, 2015 at 09:49:19AM +0200, Pekka Paalanen wrote: > > On Mon, 23 Feb 2015 17:20:37 -0800 > > Bryce Harrington wrote: > > > > > On Mon, Feb 23, 2015 at 11:30:57AM -0800, Bill Spitzak wrote: > > > > Which of the 4 arguments

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Bryce Harrington
On Mon, Mar 09, 2015 at 09:49:19AM +0200, Pekka Paalanen wrote: > On Mon, 23 Feb 2015 17:20:37 -0800 > Bryce Harrington wrote: > > > On Mon, Feb 23, 2015 at 11:30:57AM -0800, Bill Spitzak wrote: > > > Which of the 4 arguments do you use for your use case? > > > > > > Because this can only return

Re: [PATCH wayland] server: add helper functions for wl_global

2015-03-09 Thread Pekka Paalanen
On Mon, 23 Feb 2015 17:20:37 -0800 Bryce Harrington wrote: > On Mon, Feb 23, 2015 at 11:30:57AM -0800, Bill Spitzak wrote: > > Which of the 4 arguments do you use for your use case? > > > > Because this can only return the first match I suspect some of the > > NULL tests are pretty useless, beca

Re: [PATCH wayland] server: add helper functions for wl_global

2015-02-23 Thread Bryce Harrington
On Mon, Feb 23, 2015 at 11:30:57AM -0800, Bill Spitzak wrote: > Which of the 4 arguments do you use for your use case? > > Because this can only return the first match I suspect some of the > NULL tests are pretty useless, because you have to specify arguments > that you know will return the one a

Re: [PATCH wayland] server: add helper functions for wl_global

2015-02-23 Thread Daniel Stone
Hi, On 23 February 2015 at 16:36, Jonny Lamb wrote: > Il 23/02/2015 17:28, Derek Foreman ha scritto: >> On 23/02/15 10:02 AM, Jonny Lamb wrote: >>> The intention here is to be able to find an existing wl_global using >>> some search parameters and then get some information about it. >> >> I'm not

Re: [PATCH wayland] server: add helper functions for wl_global

2015-02-23 Thread Jonny Lamb
Il 23/02/2015 17:28, Derek Foreman ha scritto: On 23/02/15 10:02 AM, Jonny Lamb wrote: The intention here is to be able to find an existing wl_global using some search parameters and then get some information about it. I'm not sure I see a need for this, but if there is need there should also

Re: [PATCH wayland] server: add helper functions for wl_global

2015-02-23 Thread Derek Foreman
On 23/02/15 10:02 AM, Jonny Lamb wrote: > The intention here is to be able to find an existing wl_global using > some search parameters and then get some information about it. I'm not sure I see a need for this, but if there is need there should also be documentation. :) > --- > src/wayland-serv

[PATCH wayland] server: add helper functions for wl_global

2015-02-23 Thread Jonny Lamb
The intention here is to be able to find an existing wl_global using some search parameters and then get some information about it. --- src/wayland-server.c | 33 + src/wayland-server.h | 4 2 files changed, 37 insertions(+) diff --git a/src/wayland-server.c