Mercurial > octave
diff libinterp/corefcn/defun-int.h @ 29967:da1678140f7e
make interpreter functions in .oct files static
* find-defun-files.sh, mk-pkg-add.sh, mk-doc.pl: Adjust regular
expression patterns to also find DEFUN_STATIC_DLD, DEFUNX_STATIC_DLD,
DEFMETHOD_STATIC_DLD, and DEFMETHODX_STATIC_DLD.
* defun-int.h (FORWARD_DECLARE_STATIC_FUNX,
FORWARD_DECLARE_STATIC_METHODX, FORWARD_DECLARE_STATIC_FUN,
FORWARD_DECLARE_STATIC_METHOD): New macros.
* defun-dld.h (DEFUN_STATIC_DLD, DEFUNX_STATIC_DLD,
DEFMETHOD_STATIC_DLD, DEFMETHODX_STATIC_DLD): New macros.
If OCTAVE_USE_STATIC_DEFUN is defined, make DEFUN_DLD,
DEFUNX_DLD, DEFMTHOD_DLD, and DEFMETHODX_DLD expand to the static
versions.
* oct-conf-post.in.h: Define OCTAVE_USE_STATIC_DEFUN.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 15 Aug 2021 15:06:09 -0400 |
parents | 939bef0b66e0 |
children | a61e1a0f6024 |
line wrap: on
line diff
--- a/libinterp/corefcn/defun-int.h Sun Aug 15 15:00:49 2021 -0400 +++ b/libinterp/corefcn/defun-int.h Sun Aug 15 15:06:09 2021 -0400 @@ -160,6 +160,20 @@ #define DECLARE_METHOD(name, interp_name, args_name, nargout_name) \ DECLARE_METHODX (F ## name, interp_name, args_name, nargout_name) +#define FORWARD_DECLARE_STATIC_FUNX(name) \ + static octave_value_list \ + name (const octave_value_list&, int) + +#define FORWARD_DECLARE_STATIC_METHODX(name) \ + static octave_value_list \ + name (octave::interpreter&, const octave_value_list&, int) + +#define FORWARD_DECLARE_STATIC_FUN(name) \ + FORWARD_DECLARE_STATIC_FUNX (F ## name) + +#define FORWARD_DECLARE_STATIC_METHOD(name) \ + FORWARD_DECLARE_STATIC_METHODX (F ## name) + #define DECLARE_STATIC_FUNX(name, args_name, nargout_name) \ static octave_value_list \ name (const octave_value_list& args_name, int nargout_name)