… | |
… | |
73 | #define INVOKE_MAP(event, map, ...) INVOKE_(EVENT_ ## MAP ## _ ## event, ARG_MAP (map) , ## __VA_ARGS__) |
73 | #define INVOKE_MAP(event, map, ...) INVOKE_(EVENT_ ## MAP ## _ ## event, ARG_MAP (map) , ## __VA_ARGS__) |
74 | |
74 | |
75 | //TODO should index into @result |
75 | //TODO should index into @result |
76 | #define RESULT(idx,type) cfperl_result_ ## type (idx) |
76 | #define RESULT(idx,type) cfperl_result_ ## type (idx) |
77 | #define RESULT_INT(idx) RESULT(idx, INT) |
77 | #define RESULT_INT(idx) RESULT(idx, INT) |
|
|
78 | #define RESULT_MAP(idx) RESULT(idx, MAP) |
78 | |
79 | |
79 | bool cfperl_invoke (event_type event, ...); |
80 | bool cfperl_invoke (event_type event, ...); |
80 | int cfperl_result_INT (int idx); |
81 | int cfperl_result_INT (int idx); |
|
|
82 | int cfperl_result_MAP (int idx); |
81 | |
83 | |
82 | struct attachable_base |
84 | struct attachable_base |
83 | { |
85 | { |
84 | SV *self; |
86 | SV *self; |
85 | AV *cb; // CF+ perl self and callback |
87 | AV *cb; // CF+ perl self and callback |