diff options
| author | Jason Ekstrand <jason@jlekstrand.net> | 2013-03-08 22:26:12 -0600 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2013-03-18 23:04:32 -0400 |
| commit | ca5b1946cb0f186d604858bec75bba0435f9adc9 (patch) | |
| tree | fb177d5c74e02a7cdd6e58a1cd9921fb62239ce7 /src/connection.c | |
| parent | client: Invoke new_id closure arguments as pointers instead of integers (diff) | |
| download | wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar.gz wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar.bz2 wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar.lz wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar.xz wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.tar.zst wayland-ca5b1946cb0f186d604858bec75bba0435f9adc9.zip | |
Change wl_closure_invoke to take an opcode instead of an actual function pointer
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/connection.c')
| -rw-r--r-- | src/connection.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/connection.c b/src/connection.c index b952da1..dca134b 100644 --- a/src/connection.c +++ b/src/connection.c @@ -862,12 +862,13 @@ convert_arguments_to_ffi(const char *signature, uint32_t flags, void wl_closure_invoke(struct wl_closure *closure, uint32_t flags, - struct wl_object *target, void (*func)(void), void *data) + struct wl_object *target, uint32_t opcode, void *data) { int count; ffi_cif cif; ffi_type *ffi_types[WL_CLOSURE_MAX_ARGS + 2]; void * ffi_args[WL_CLOSURE_MAX_ARGS + 2]; + void (* const *implementation)(void); count = arg_count_for_signature(closure->message->signature); @@ -882,7 +883,8 @@ wl_closure_invoke(struct wl_closure *closure, uint32_t flags, ffi_prep_cif(&cif, FFI_DEFAULT_ABI, count + 2, &ffi_type_void, ffi_types); - ffi_call(&cif, func, NULL, ffi_args); + implementation = target->implementation; + ffi_call(&cif, implementation[opcode], NULL, ffi_args); } static int |
