525
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 John W. Eaton |
525
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
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) \ |
3364
|
46 DEFUN_DLD_INTERNAL (name, args_name, nargout_name, 0, doc) |
3295
|
47 |
2465
|
48 #else |
3295
|
49 |
1957
|
50 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ |
|
51 DECLARE_FUN (name, args_name, nargout_name); \ |
2968
|
52 DEFINE_FUN_INSTALLER_FUN (name, doc) \ |
1957
|
53 DECLARE_FUN (name, args_name, nargout_name) |
3295
|
54 |
703
|
55 #endif |
525
|
56 |
|
57 #endif |
|
58 |
|
59 /* |
|
60 ;;; Local Variables: *** |
|
61 ;;; mode: C++ *** |
|
62 ;;; End: *** |
|
63 */ |