… | |
… | |
716 | |
716 | |
717 | return sv; |
717 | return sv; |
718 | } |
718 | } |
719 | |
719 | |
720 | static SV * |
720 | static SV * |
721 | newSVdt (data_type type, ...) |
721 | newSVdt (/*data_type*/int type, ...) |
722 | { |
722 | { |
723 | va_list ap; |
723 | va_list ap; |
724 | |
724 | |
725 | va_start (ap, type); |
725 | va_start (ap, type); |
726 | SV *sv = newSVdt_va (ap, type); |
726 | SV *sv = newSVdt_va (ap, data_type (type)); |
727 | va_end (ap); |
727 | va_end (ap); |
728 | |
728 | |
729 | return sv; |
729 | return sv; |
730 | } |
730 | } |
731 | |
731 | |
… | |
… | |
987 | } |
987 | } |
988 | } |
988 | } |
989 | } |
989 | } |
990 | |
990 | |
991 | bool |
991 | bool |
992 | attachable::invoke (event_type event, ...) |
992 | attachable::invoke (/*event_type*/int event, ...) |
993 | { |
993 | { |
994 | data_type dt; |
994 | data_type dt; |
995 | |
995 | |
996 | // callback call ordering should be: |
996 | // callback call ordering should be: |
997 | // 1. per-object callback |
997 | // 1. per-object callback |
998 | // 2. per-class object |
998 | // 2. per-class object |
999 | // 3. per-type callback |
999 | // 3. per-type callback |
1000 | // 4. global callbacks |
1000 | // 4. global callbacks |
1001 | |
1001 | |
1002 | AV *callbacks = 0; |
1002 | AV *callbacks = 0; |
1003 | gather_callbacks (callbacks, event); |
1003 | gather_callbacks (callbacks, event_type (event)); |
1004 | |
1004 | |
1005 | // short-circuit processing if no callbacks found/defined |
1005 | // short-circuit processing if no callbacks found/defined |
1006 | if (!callbacks) |
1006 | if (!callbacks) |
1007 | return 0; |
1007 | return 0; |
1008 | |
1008 | |