Mercurial > hg > octave-nkf
changeset 3528:19d6fea99ba1
[project @ 2000-02-02 11:05:12 by jwe]
author | jwe |
---|---|
date | Wed, 02 Feb 2000 11:06:49 +0000 |
parents | c7084a0fbddd |
children | 2dbaadac8f86 |
files | src/ChangeLog src/Map.cc src/defun-int.h |
diffstat | 3 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2000-02-02 John W. Eaton <jwe@bevo.che.wisc.edu> + * defun-int.h (UNDERSCORIFY): New macro. + (DEFCONST_INTERNAL, DEFCONSTX_INTERNAL): Use it. + * data.cc (Fis_list): Fix continuation char. * Map.cc (CHptr_to_index, goodCHptr): Delete static decl.
--- a/src/Map.cc +++ b/src/Map.cc @@ -119,7 +119,8 @@ return (((X_CAST (unsigned, t)) & 1) == 0); } -static void * +template <class C> +void * index_to_CHptr (int i) { return X_CAST (void *, (i << 1) + 1);
--- a/src/defun-int.h +++ b/src/defun-int.h @@ -159,13 +159,16 @@ #define INSTALL_CONST(name, sname, defn, protect, doc) \ install_builtin_constant (name, octave_value (defn), protect, doc) +#define UNDERSCORIFY(name) \ + "__" ## name ## "__" + #define DEFCONST_INTERNAL(name, defn, doc) \ INSTALL_CONST (#name, SBV_ ## name, defn, false, doc); \ - INSTALL_CONST ("__" ## #name ## "__", XSBV_ ## name, defn, true, doc) + INSTALL_CONST (UNDERSCORIFY (#name), XSBV_ ## name, defn, true, doc) #define DEFCONSTX_INTERNAL(name, sname, defn, doc) \ INSTALL_CONST (name, sname, defn, false, doc); \ - INSTALL_CONST ("__" ## name ## "__", X ## sname, defn, true, doc) + INSTALL_CONST (UNDERSCORIFY (name), X ## sname, defn, true, doc) // How mapper functions are actually installed.