mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-04 00:00:14 -04:00
Make function pointer defined with METHOD() macro non-const
clang complains about it being const, and the object code generated from gcc is the same.
This commit is contained in:
parent
2e1f4a4631
commit
d185b6acee
@ -135,7 +135,7 @@
|
||||
#define METHOD(iface, name, ret, this, ...) \
|
||||
static ret name(union {iface *_public; this;} \
|
||||
__attribute__((transparent_union)), ##__VA_ARGS__); \
|
||||
static const typeof(name) *_##name = (const typeof(name)*)name; \
|
||||
static typeof(name) *_##name = (typeof(name)*)name; \
|
||||
static ret name(this, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
@ -144,7 +144,7 @@
|
||||
#define METHOD2(iface1, iface2, name, ret, this, ...) \
|
||||
static ret name(union {iface1 *_public1; iface2 *_public2; this;} \
|
||||
__attribute__((transparent_union)), ##__VA_ARGS__); \
|
||||
static const typeof(name) *_##name = (const typeof(name)*)name; \
|
||||
static typeof(name) *_##name = (typeof(name)*)name; \
|
||||
static ret name(this, ##__VA_ARGS__)
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user