comparison src/defun-dld.h @ 2465:7ee42ff6536a

[project @ 1996-11-03 08:54:14 by jwe]
author jwe
date Sun, 03 Nov 1996 08:54:22 +0000
parents 003570e69c7b
children 8b262e771614
comparison
equal deleted inserted replaced
2464:76078d0868e9 2465:7ee42ff6536a
31 31
32 // Define a builtin function that may be loaded dynamically at run 32 // Define a builtin function that may be loaded dynamically at run
33 // time. 33 // time.
34 // 34 //
35 // If Octave is not configured for dynamic linking of builtin 35 // If Octave is not configured for dynamic linking of builtin
36 // functions, this is exactly like DEFUN. 36 // functions, this is similar to DEFUN, except that it will generate
37 // an extra static struct and an extra externally visible function.
38 //
39 // The first DECLARE_FUN is for the struct, the second is for the
40 // definition of the function.
37 41
38 #if defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING) 42 #if defined (MAKE_BUILTINS)
39 #if ! defined (MAKE_BUILTINS) 43 #if ! (defined (OCTAVE_LITE) && defined (WITH_DYNAMIC_LINKING))
40 #define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \ 44 #define DEFUN_DLD(name, args_name, nargout_name, doc) \
41 DEFUN_DLD (name, args_name, nargout_name, doc) 45 DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc)
42 #endif 46 #endif
43 #else 47 #else
44 #define DEFUN_DLD_BUILTIN(name, args_name, nargout_name, doc) \
45 DEFUN_INTERNAL (name, args_name, nargout_name, 0, doc)
46 #endif
47
48 // Define a function that may be loaded dynamically at run time.
49 //
50 // If Octave is not configured for dynamic linking of builtin
51 // functions, this won't do anything useful.
52 //
53 // The forward declaration is for the struct, the second is for the
54 // definition of the function.
55
56 #if ! defined (MAKE_BUILTINS)
57 #define DEFUN_DLD(name, args_name, nargout_name, doc) \ 48 #define DEFUN_DLD(name, args_name, nargout_name, doc) \
58 DECLARE_FUN (name, args_name, nargout_name); \ 49 DECLARE_FUN (name, args_name, nargout_name); \
59 DEFINE_FUN_STRUCT (name, 0, doc); \ 50 DEFINE_FUN_STRUCT (name, 0, doc); \
60 DEFINE_FUN_STRUCT_FUN (name) \ 51 DEFINE_FUN_STRUCT_FUN (name) \
61 DECLARE_FUN (name, args_name, nargout_name) 52 DECLARE_FUN (name, args_name, nargout_name)