Support "C-unwind" ABI

Closes #864
This commit is contained in:
Jannis Ruh
2023-08-02 12:11:55 +10:00
committed by Emilio Cobos Álvarez
parent db6ccdd863
commit d8355da466
6 changed files with 55 additions and 2 deletions
+8
View File
@@ -0,0 +1,8 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
void c(void);
void c_unwind(void);
+16
View File
@@ -0,0 +1,16 @@
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
void c(void);
void c_unwind(void);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
+13
View File
@@ -0,0 +1,13 @@
#include <cstdarg>
#include <cstdint>
#include <cstdlib>
#include <ostream>
#include <new>
extern "C" {
void c();
void c_unwind();
} // extern "C"
+11
View File
@@ -0,0 +1,11 @@
from libc.stdint cimport int8_t, int16_t, int32_t, int64_t, intptr_t
from libc.stdint cimport uint8_t, uint16_t, uint32_t, uint64_t, uintptr_t
cdef extern from *:
ctypedef bint bool
ctypedef struct va_list
cdef extern from *:
void c();
void c_unwind();
+5
View File
@@ -0,0 +1,5 @@
#[no_mangle]
pub extern "C" fn c() {}
#[no_mangle]
pub extern "C-unwind" fn c_unwind() {}