Mercurial > octave
comparison libinterp/corefcn/pr-output.cc @ 31730:610a85b0ff62
use interpreter::feval instead of global feval function
* __eigs__.cc, bsxfun.cc, call-stack.cc, cellfun.cc, daspk.cc,
dasrt.cc, dassl.cc, data.cc, defun.cc, gh-manager.cc, graphics.cc,
gtk-manager.cc, gtk-manager.h, hook-fcn.cc, input.cc, interpreter.cc,
ls-mat5.cc, lsode.cc, mex.cc, pr-output.cc, quad.cc, quadcc.cc,
variables.cc, __init_fltk__.cc, __init_gnuplot__.cc, __ode15__.cc,
audiodevinfo.cc, cdef-method.cc, cdef-package.cc, cdef-property.cc,
ov-class.cc, ov-java.cc, ov-oncleanup.cc, op-class.cc, pt-assign.cc,
pt-eval.cc, pt-id.cc:
Change all uses of global feval function to use interpreter::feval
instead. If necessary, use __get_interpreter__ to access global
interpreter object.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 12 Jan 2023 10:22:04 -0500 |
parents | 597f3ee61a48 |
children | 21f9b34eb893 |
comparison
equal
deleted
inserted
replaced
31729:c581f5ce5656 | 31730:610a85b0ff62 |
---|---|
48 | 48 |
49 #include "Cell.h" | 49 #include "Cell.h" |
50 #include "defun.h" | 50 #include "defun.h" |
51 #include "error.h" | 51 #include "error.h" |
52 #include "errwarn.h" | 52 #include "errwarn.h" |
53 #include "interpreter.h" | |
53 #include "ovl.h" | 54 #include "ovl.h" |
54 #include "oct-stream.h" | 55 #include "oct-stream.h" |
55 #include "octave-preserve-stream-state.h" | 56 #include "octave-preserve-stream-state.h" |
56 #include "pager.h" | 57 #include "pager.h" |
57 #include "parse.h" | |
58 #include "pr-flt-fmt.h" | 58 #include "pr-flt-fmt.h" |
59 #include "pr-output.h" | 59 #include "pr-output.h" |
60 #include "sysdep.h" | 60 #include "sysdep.h" |
61 #include "unwind-prot.h" | 61 #include "unwind-prot.h" |
62 #include "utils.h" | 62 #include "utils.h" |
3446 %! format (old_fmt); | 3446 %! format (old_fmt); |
3447 %! format (old_spacing); | 3447 %! format (old_spacing); |
3448 %! end_unwind_protect | 3448 %! end_unwind_protect |
3449 */ | 3449 */ |
3450 | 3450 |
3451 DEFUN (display, args, , | 3451 DEFMETHOD (display, interp, args, , |
3452 classes: cell char double function_handle int8 int16 int32 int64 logical single struct uint8 uint16 uint32 uint64 | 3452 classes: cell char double function_handle int8 int16 int32 int64 logical single struct uint8 uint16 uint32 uint64 |
3453 doc: /* -*- texinfo -*- | 3453 doc: /* -*- texinfo -*- |
3454 @deftypefn {} {} display (@var{obj}) | 3454 @deftypefn {} {} display (@var{obj}) |
3455 Display the contents of the object @var{obj} prepended by its name. | 3455 Display the contents of the object @var{obj} prepended by its name. |
3456 | 3456 |
3457 The Octave interpreter calls the @code{display} function whenever it needs | 3457 The Octave interpreter calls the @code{display} function whenever it needs |
3519 if (valid_identifier (name)) | 3519 if (valid_identifier (name)) |
3520 print_newlines = value.print_name_tag (octave_stdout, name); | 3520 print_newlines = value.print_name_tag (octave_stdout, name); |
3521 | 3521 |
3522 // Use feval so that dispatch will also work for disp. | 3522 // Use feval so that dispatch will also work for disp. |
3523 | 3523 |
3524 feval ("disp", ovl (value)); | 3524 interp.feval ("disp", ovl (value)); |
3525 | 3525 |
3526 if (print_newlines) | 3526 if (print_newlines) |
3527 octave_stdout << std::endl; | 3527 octave_stdout << std::endl; |
3528 | 3528 |
3529 return ovl (); | 3529 return ovl (); |