38 |
38 |
39 EVHandler *last_handler_c = NULL; |
39 EVHandler *last_handler_c = NULL; |
40 |
40 |
41 int create_event_handler(EventHandlerConfig *cfg) { |
41 int create_event_handler(EventHandlerConfig *cfg) { |
42 if(event_handler_map == NULL) { |
42 if(event_handler_map == NULL) { |
43 event_handler_map = cxHashMapCreate(cxDefaultAllocator, 16); |
43 event_handler_map = cxHashMapCreate(cxDefaultAllocator, CX_STORE_POINTERS, 16); |
44 } |
44 } |
45 |
45 |
46 CxHashKey key = cx_hash_key_bytes((const unsigned char*)cfg->name.ptr, cfg->name.length); |
46 CxHashKey key = cx_hash_key_bytes((const unsigned char*)cfg->name.ptr, cfg->name.length); |
47 |
47 |
48 // if the event handler already exists, we don't modify it |
48 // if the event handler already exists, we don't modify it |