From ea1a34083cd11e55b7416f7143952fad67a78b4f Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Tue, 1 Mar 2016 10:31:33 -0800 Subject: [PATCH] GUAC-1389: Explain significance of the type-punning union. --- src/libguac/client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libguac/client.c b/src/libguac/client.c index a37cbe48..418b9da5 100644 --- a/src/libguac/client.c +++ b/src/libguac/client.c @@ -529,6 +529,8 @@ int guac_client_load_plugin(guac_client* client, const char* protocol) { char protocol_lib[GUAC_PROTOCOL_LIBRARY_LIMIT] = GUAC_PROTOCOL_LIBRARY_PREFIX; + /* Type-pun for the sake of dlsym() - cannot typecast a void* to a function + * pointer otherwise */ union { guac_client_init_handler* client_init; void* obj;