Import combinator and allocator APIs into SWIG. Next is glue. Need to fix unions in HParsedToken and HCaseResult.
This commit is contained in:
parent
4330a426e9
commit
34062d50a2
3 changed files with 19 additions and 9 deletions
20
src/hammer.h
20
src/hammer.h
|
|
@ -34,7 +34,9 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef __cplusplus
|
||||
#ifndef HAMMER_INTERNAL__NO_STDARG_H
|
||||
typedef int bool;
|
||||
#endif // HAMMER_INTERNAL__NO_STDARG_H
|
||||
#endif
|
||||
|
||||
typedef struct HParseState_ HParseState;
|
||||
|
|
@ -183,7 +185,7 @@ typedef struct HBenchmarkResults_ {
|
|||
rtype_t name(__VA_ARGS__) attr; \
|
||||
rtype_t name##__m(HAllocator* mm__, __VA_ARGS__) attr
|
||||
|
||||
#ifndef HAMMER_INTERNAL__NO_STDARG_H
|
||||
#ifndef SWIG
|
||||
#define HAMMER_FN_DECL_VARARGS(rtype_t, name, ...) \
|
||||
rtype_t name(__VA_ARGS__, ...); \
|
||||
rtype_t name##__m(HAllocator* mm__, __VA_ARGS__, ...); \
|
||||
|
|
@ -201,17 +203,17 @@ typedef struct HBenchmarkResults_ {
|
|||
rtype_t name##__a(void *args[]); \
|
||||
rtype_t name##__ma(HAllocator *mm__, void *args[])
|
||||
#else
|
||||
#define HAMMER_FN_DECL_VARARGS(rtype_t, name, ...) \
|
||||
rtype_t name(__VA_ARGS__, ...); \
|
||||
rtype_t name##__m(HAllocator* mm__, __VA_ARGS__, ...); \
|
||||
rtype_t name##__a(void *args[]); \
|
||||
#define HAMMER_FN_DECL_VARARGS(rtype_t, name, params...) \
|
||||
rtype_t name(params, ...); \
|
||||
rtype_t name##__m(HAllocator* mm__, params, ...); \
|
||||
rtype_t name##__a(void *args[]); \
|
||||
rtype_t name##__ma(HAllocator *mm__, void *args[])
|
||||
|
||||
// Note: this drops the attributes on the floor for the __v versions
|
||||
#define HAMMER_FN_DECL_VARARGS_ATTR(attr, rtype_t, name, ...) \
|
||||
rtype_t name(__VA_ARGS__, ...) attr; \
|
||||
rtype_t name##__m(HAllocator* mm__, __VA_ARGS__, ...) attr; \
|
||||
rtype_t name##__a(void *args[]); \
|
||||
#define HAMMER_FN_DECL_VARARGS_ATTR(attr, rtype_t, name, params...) \
|
||||
rtype_t name(params, ...); \
|
||||
rtype_t name##__m(HAllocator* mm__, params, ...); \
|
||||
rtype_t name##__a(void *args[]); \
|
||||
rtype_t name##__ma(HAllocator *mm__, void *args[])
|
||||
#endif // HAMMER_INTERNAL__NO_STDARG_H
|
||||
// }}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue