Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes:

| >>>>> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
| 
| Lars> What do we need it for?
| 
| Lars> Ok, we can get a bit better error reporting but thats about it.
| 
| Isn't it better than testing all argument in each case LFUN_xxx?

You mean so that we can have a centralized testing at the top of the
function?

dispatch(..)
  string string_arg
  char char_arg;
  int int_arg;
  long long_arg;
  string string_arg2
  char char_arg2;
  int int_arg2;
  long long_arg2;
  string string_arg3
  char char_arg3;
  int int_arg3;
  long long_arg3;

  if (lyxaction.func(LFUN_BUFFER_NEW).arg1 == type_info<string>)
        string_arg = stream_cast<string, string>funcslot[1]
  .....

unless you have a better idea I think we should check at each case.

        Lgb

Reply via email to