Mercurial > hg > octave-nkf
diff src/ops.h @ 5533:667ad2becb63
[project @ 2005-11-10 21:40:48 by jwe]
author | jwe |
---|---|
date | Thu, 10 Nov 2005 21:40:49 +0000 |
parents | 4c8a2e4e0717 |
children | ce79d238f142 |
line wrap: on
line diff
--- a/src/ops.h +++ b/src/ops.h @@ -334,14 +334,24 @@ CATOPDECL (name, a1, a2) \ { \ CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ - return octave_value (v1.t1 ## _value (). f (v2.t2 ## _value (), ra_idx)); \ + return octave_value (v1.t1 ## _value () . f (v2.t2 ## _value (), ra_idx)); \ } #define DEFNDCATOP_FN(name, t1, t2, e1, e2, f) \ CATOPDECL (name, a1, a2) \ { \ CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ - return octave_value (v1.e1 ## _value (). f (v2.e2 ## _value (), ra_idx)); \ + return octave_value (v1.e1 ## _value () . f (v2.e2 ## _value (), ra_idx)); \ + } + +#define DEFNDCHARCATOP_FN(name, t1, t2, f) \ + CATOPDECL (name, a1, a2) \ + { \ + CAST_BINOP_ARGS (octave_ ## t1&, const octave_ ## t2&); \ + \ + return octave_value (v1.char_array_value () . f (v2.char_array_value (), ra_idx), \ + true, ((a1.is_sq_string () || a2.is_sq_string ()) \ + ? '\'' : '"')); \ } // For compatibility, the second arg is always converted to the type