525
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1994, 1995, 1996, 1997, 1999, 2005, 2006, 2007 |
|
4 John W. Eaton |
525
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
525
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
525
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_defun_dld_h) |
|
25 #define octave_defun_dld_h 1 |
|
26 |
|
27 #if defined (octave_defun_h) |
|
28 #error defun.h and defun-dld.h both included in same file! |
|
29 #endif |
|
30 |
|
31 #include "defun-int.h" |
|
32 |
550
|
33 // Define a builtin function that may be loaded dynamically at run |
|
34 // time. |
|
35 // |
|
36 // If Octave is not configured for dynamic linking of builtin |
2968
|
37 // functions, this is the same as DEFUN, except that it will generate |
|
38 // an extra externally visible function. |
2465
|
39 // |
2968
|
40 // The first DECLARE_FUN is for the benefit of the installer function |
|
41 // and the second is for the definition of the function. |
550
|
42 |
2465
|
43 #if defined (MAKE_BUILTINS) |
3295
|
44 |
2465
|
45 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ |
5796
|
46 DEFUN_DLD_INTERNAL (name, args_name, nargout_name, false, doc) |
|
47 |
|
48 // This one can be used when `name' cannot be used directly (if it is |
|
49 // already defined as a macro). In that case, name is already a |
|
50 // quoted string, and the internal name of the function must be passed |
|
51 // too (the convention is to use a prefix of "F", so "foo" becomes "Ffoo"). |
|
52 |
|
53 #define DEFUNX_DLD(name, fname, fsname, args_name, nargout_name, doc) \ |
|
54 DEFUNX_DLD_INTERNAL (name, fname, args_name, nargout_name, false, doc) |
3295
|
55 |
2465
|
56 #else |
3295
|
57 |
1957
|
58 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ |
|
59 DECLARE_FUN (name, args_name, nargout_name); \ |
2968
|
60 DEFINE_FUN_INSTALLER_FUN (name, doc) \ |
1957
|
61 DECLARE_FUN (name, args_name, nargout_name) |
3295
|
62 |
5796
|
63 #define DEFUNX_DLD(name, fname, fsname, args_name, nargout_name, doc) \ |
|
64 DECLARE_FUNX (fname, args_name, nargout_name); \ |
|
65 DEFINE_FUNX_INSTALLER_FUN (name, fname, fsname, doc) \ |
|
66 DECLARE_FUNX (fname, args_name, nargout_name) |
|
67 |
703
|
68 #endif |
525
|
69 |
|
70 #endif |
|
71 |
|
72 /* |
|
73 ;;; Local Variables: *** |
|
74 ;;; mode: C++ *** |
|
75 ;;; End: *** |
|
76 */ |