add 'extern "C"' to all header files
This commit is contained in:
parent
8fd89090c6
commit
1aa47ad45a
|
@ -24,6 +24,10 @@
|
|||
#ifndef PICRIN_H__
|
||||
#define PICRIN_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -182,4 +186,8 @@ void pic_warn(pic_state *, const char *);
|
|||
|
||||
void pic_debug(pic_state *, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef BLOB_H__
|
||||
#define BLOB_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_blob {
|
||||
PIC_OBJECT_HEADER
|
||||
char *data;
|
||||
|
@ -16,4 +20,8 @@ struct pic_blob {
|
|||
|
||||
struct pic_blob *pic_blob_new(pic_state *, char *, int len);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef CONT_H__
|
||||
#define CONT_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_cont {
|
||||
PIC_OBJECT_HEADER
|
||||
jmp_buf jmp;
|
||||
|
@ -46,4 +50,8 @@ struct pic_cont {
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef ERROR_H__
|
||||
#define ERROR_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_error {
|
||||
PIC_OBJECT_HEADER
|
||||
enum pic_error_kind {
|
||||
|
@ -19,4 +23,8 @@ struct pic_error {
|
|||
#define pic_error_p(v) (pic_type(v) == PIC_TT_ERROR)
|
||||
#define pic_error_ptr(v) ((struct pic_error *)pic_ptr(v))
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef GC_H__
|
||||
#define GC_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum pic_gc_mark {
|
||||
PIC_GC_UNMARK = 0,
|
||||
PIC_GC_MARK
|
||||
|
@ -32,4 +36,8 @@ struct pic_heap {
|
|||
void init_heap(struct pic_heap *);
|
||||
void finalize_heap(struct pic_heap *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef IREP_H__
|
||||
#define IREP_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum pic_opcode {
|
||||
OP_POP,
|
||||
OP_PUSHNIL,
|
||||
|
@ -64,4 +68,8 @@ struct pic_irep {
|
|||
|
||||
void print_irep(pic_state *, struct pic_irep *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef LIB_H__
|
||||
#define LIB_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_lib {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_value name;
|
||||
|
@ -14,4 +18,8 @@ struct pic_lib {
|
|||
|
||||
#define pic_lib_ptr(o) ((struct pic_lib *)pic_ptr(o))
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef MACRO_H__
|
||||
#define MACRO_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_senv {
|
||||
PIC_OBJECT_HEADER
|
||||
struct pic_senv *up;
|
||||
|
@ -58,4 +62,8 @@ struct pic_senv *pic_core_syntactic_env(pic_state *pic);
|
|||
struct pic_syntax *pic_syntax_new(pic_state *, int kind, pic_sym sym);
|
||||
struct pic_syntax *pic_syntax_new_macro(pic_state *, pic_sym, struct pic_proc *, struct pic_senv *senv);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef PAIR_H__
|
||||
#define PAIR_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
pic_value pic_cons(pic_state *, pic_value, pic_value);
|
||||
pic_value pic_car(pic_state *, pic_value);
|
||||
pic_value pic_cdr(pic_state *, pic_value);
|
||||
|
@ -25,4 +29,8 @@ pic_value pic_cadr(pic_state *, pic_value);
|
|||
pic_value pic_cdar(pic_state *, pic_value);
|
||||
pic_value pic_cddr(pic_state *, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef PARSE_H__
|
||||
#define PARSE_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct parser_control {
|
||||
pic_state *pic;
|
||||
void *yyscanner;
|
||||
|
@ -15,4 +19,8 @@ struct parser_control {
|
|||
int yy_arena_idx;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef PORT_H__
|
||||
#define PORT_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define PIC_UBUFSIZ 3
|
||||
|
@ -90,4 +94,8 @@ int pic_ungetc(int, pic_file *);
|
|||
int pic_fputc(int, pic_file *);
|
||||
int pic_fputs(const char *, pic_file *);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef PROC_H__
|
||||
#define PROC_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct pic_env {
|
||||
PIC_OBJECT_HEADER
|
||||
pic_value *values;
|
||||
|
@ -39,4 +43,8 @@ int pic_proc_cv_size(pic_state *, struct pic_proc *);
|
|||
pic_value pic_proc_cv_ref(pic_state *, struct pic_proc *, size_t);
|
||||
void pic_proc_cv_set(pic_state *, struct pic_proc *, size_t, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef VALUE_H__
|
||||
#define VALUE_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef int pic_sym;
|
||||
|
||||
/**
|
||||
|
@ -173,4 +177,8 @@ pic_value pic_none_value();
|
|||
bool pic_eq_p(pic_value, pic_value);
|
||||
bool pic_eqv_p(pic_value, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
#ifndef VAR_H__
|
||||
#define VAR_H__
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "picrin.h"
|
||||
#include "picrin/proc.h"
|
||||
|
||||
|
@ -26,4 +30,8 @@ pic_value pic_var_ref(pic_state *, struct pic_var *);
|
|||
void pic_var_set(pic_state *, struct pic_var *, pic_value);
|
||||
void pic_var_set_force(pic_state *, struct pic_var *, pic_value);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue