mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
Reapply 6b2a219e2687de3eb77a888ca739151c461c2aa7
Author: Paul Licameli <paul.licameli@audacityteam.org> Date: Tue Feb 27 13:51:10 2018 -0500 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:
parent
9b77109eff
commit
981f41ccf4
@ -424,7 +424,7 @@ FUNDEF init_funtab[] = {
|
||||
FUNDEF *funtab = init_funtab;
|
||||
static size_t szfuntab = sizeof(init_funtab) / sizeof(*init_funtab);
|
||||
|
||||
int xlbindfunctions(FUNDEF *functions, size_t nfunctions)
|
||||
int xlbindfunctions(const FUNDEF *functions, size_t nfunctions)
|
||||
{
|
||||
/* This is written very generally, imposing no fixed upper limit on the
|
||||
growth of the table. But perhaps a lightweight alternative with such a
|
||||
|
@ -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 */
|
||||
@ -378,7 +385,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;
|
||||
@ -688,7 +695,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 */
|
||||
|
||||
@ -1055,3 +1062,10 @@ void localinit(void);
|
||||
void localsymbols(void);
|
||||
void print_local_gc_info(void);
|
||||
void local_toplevel(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user