1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-24 23:33:50 +02:00

Changes to make xlisp.h usable in C++ code...

1) #include guard
2) "C" linkage for all function declarations
3) some uses of const
This commit is contained in:
Paul Licameli
2018-02-27 13:51:10 -05:00
parent 5aa70545d5
commit 6b2a219e26
2 changed files with 15 additions and 3 deletions

View File

@@ -13,6 +13,13 @@ HISTORY
/* system specific definitions */
#ifndef __XLISP__
#define __XLISP__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdlib.h> /* needed for getenv(); note that this was a problem
for PMAX implementation, but I assume PMAX is obsolete now.
- RBD 16apr04 */
@@ -366,7 +373,7 @@ void dbg_gc_xlsave(LVAL *n);
/* function definition structure */
typedef struct {
char *fd_name; /* function name */
const char *fd_name; /* function name */
int fd_type; /* function type */
LVAL (*fd_subr)(void); /* function entry point */
} FUNDEF;
@@ -676,7 +683,7 @@ void xlsymbols(void);
false if table limits would be exceeded and the table remains unchanged
Call this, any number of times, before calling xlisp_main_init
*/
int xlbindfunctions(FUNDEF *functions, size_t nfunctions);
int xlbindfunctions(const FUNDEF *functions, size_t nfunctions);
/* xlio.c */
@@ -1032,3 +1039,8 @@ void localinit(void);
void localsymbols(void);
void print_local_gc_info(void);
#ifdef __cplusplus
}
#endif
#endif