Commit 118cda6c authored by Niels Möller's avatar Niels Möller
Browse files

* src/command.h (command_2): Made invoke a method, not a function

pointer. Updated users.
(COMMAND_2_INVOKE): New macro.
(collect_info_3): Deleted class.
(collect_info_2): Deleted class.
(collect_info_1): Deleted class.
(STATIC_COLLECT_1): Deleted macro.
(STATIC_COLLECT_2): Deleted macro.
(STATIC_COLLECT_2_FINAL): Deleted macro.
(STATIC_COLLECT_3_FINAL): Deleted macro.

Rev: src/command.h:1.58
parent 15609758
...@@ -335,71 +335,6 @@ do_catch_report_collect(struct command_simple *s, ...@@ -335,71 +335,6 @@ do_catch_report_collect(struct command_simple *s,
{ STATIC_COMMAND_SIMPLE(do_catch_report_collect), i } { STATIC_COMMAND_SIMPLE(do_catch_report_collect), i }
/* Commands that need to collect some arguments before actually doing
* anything. */
/* The collect_info_n classes keeps track about what to do with the
* next argument. As long as we collect arguments without doing
* anything, the f field in collect_info_n will point to the
* constructor make_collect_state_n. */
/* GABA:
(name collect_info_3)
(f method "struct lsh_object *"
"struct lsh_object *" "struct lsh_object *"
"struct lsh_object *")))
/* GABA:
(name collect_info_2)
(f method "struct lsh_object *"
"struct lsh_object *" "struct lsh_object *")
(next object collect_info_3)))
/* GABA:
(name collect_info_1)
(super command_simple)
(f method "struct lsh_object *"
"struct lsh_object *")
(next object collect_info_2)))
struct lsh_object *
do_collect_1(struct command_simple *s, struct lsh_object *a);
struct lsh_object *
make_collect_state_1(struct collect_info_1 *info,
struct lsh_object *a);
struct lsh_object *
make_collect_state_2(struct collect_info_2 *info,
struct lsh_object *a,
struct lsh_object *b);
#define STATIC_COLLECT_1(next) \
{ { { STATIC_HEADER, do_call_simple_command }, do_collect_1}, \
make_collect_state_1, next }
#define STATIC_COLLECT_2(next) \
{ STATIC_HEADER, make_collect_state_2, next }
extern struct command command_die_on_null;
struct command *make_trace(const char *name, struct command *real); struct command *make_trace(const char *name, struct command *real);
struct lsh_object *collect_trace(const char *name, struct lsh_object *real); struct lsh_object *collect_trace(const char *name, struct lsh_object *real);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment