525
|
1 // defun-dld.h -*- C++ -*- |
|
2 /* |
|
3 |
1884
|
4 Copyright (C) 1996 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 |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
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 |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 |
|
37 // functions, this is exactly like DEFUN. |
|
38 |
1684
|
39 #if defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING) |
|
40 #if ! defined (MAKE_BUILTINS) |
1957
|
41 #define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \ |
|
42 DEFUN_DLD (name, args_name, nargout_name, doc) |
1294
|
43 #endif |
|
44 #else |
1957
|
45 #define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \ |
|
46 DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc) |
703
|
47 #endif |
|
48 |
|
49 // Define a function that may be loaded dynamically at run time. |
|
50 // |
|
51 // If Octave is not configured for dynamic linking of builtin |
|
52 // functions, this won't do anything useful. |
|
53 // |
|
54 // The forward declaration is for the struct, the second is for the |
|
55 // definition of the function. |
|
56 |
|
57 #if ! defined (MAKE_BUILTINS) |
1957
|
58 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ |
|
59 DECLARE_FUN (name, args_name, nargout_name); \ |
|
60 DEFINE_FUN_STRUCT (name, 0, doc); \ |
|
61 DEFINE_FUN_STRUCT_FUN (name) \ |
|
62 DECLARE_FUN (name, args_name, nargout_name) |
703
|
63 #endif |
525
|
64 |
|
65 #endif |
|
66 |
|
67 /* |
|
68 ;;; Local Variables: *** |
|
69 ;;; mode: C++ *** |
|
70 ;;; page-delimiter: "^/\\*" *** |
|
71 ;;; End: *** |
|
72 */ |