mirror of
https://github.com/matrix-construct/construct
synced 2025-04-01 07:20:48 +02:00
ircd: Remove the legacy AFP() / AFGP() macros.
This commit is contained in:
parent
caf1190c91
commit
6408ac4592
3 changed files with 5 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
|||
namespace ircd {
|
||||
namespace js {
|
||||
|
||||
void replace_message(JSErrorReport &report, const char *fmt, ...) AFP(2, 3);
|
||||
void replace_message(JSErrorReport &report, const char *fmt, ...) __attribute__((format(printf, 2, 3)))
|
||||
|
||||
struct jserror
|
||||
:js::error
|
||||
|
@ -45,7 +45,8 @@ struct jserror
|
|||
struct name \
|
||||
:jserror \
|
||||
{ \
|
||||
name(const char *const fmt = " ", ...) AFP(2, 3) \
|
||||
name(const char *const fmt = " ", ...) \
|
||||
__attribute__((format(printf, 2, 3))) \
|
||||
:jserror(generate_skip) \
|
||||
{ \
|
||||
va_list ap; \
|
||||
|
|
|
@ -32,7 +32,7 @@ struct trap
|
|||
std::map<std::string, function *> memfunc;
|
||||
|
||||
protected:
|
||||
void debug(const void *const &that, const char *fmt, ...) const AFP(3, 4);
|
||||
void debug(const void *const &that, const char *fmt, ...) const __attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Override these to define JS objects in C
|
||||
virtual value on_call(object::handle, value::handle, const args &);
|
||||
|
@ -47,7 +47,7 @@ struct trap
|
|||
virtual void on_gc(JSObject *const &);
|
||||
|
||||
private: protected:
|
||||
void host_exception(const void *const &that, const char *fmt, ...) const AFP(3, 4);
|
||||
void host_exception(const void *const &that, const char *fmt, ...) const __attribute__((format(printf, 3, 4)));
|
||||
|
||||
// Internal callback interface
|
||||
static void handle_trace(JSTracer *, JSObject *) noexcept;
|
||||
|
|
|
@ -110,10 +110,6 @@ extern "C"
|
|||
#define likely(x) __builtin_expect(!!(x), 1)
|
||||
#define unlikely(x) __builtin_expect(!!(x), 0)
|
||||
|
||||
// Legacy attribute format printf macros
|
||||
#define AFP(a, b) __attribute__((format(printf, a, b)))
|
||||
#define AFGP(a, b) __attribute__((format(gnu_printf, a, b)))
|
||||
|
||||
// Experimental std::string_view
|
||||
#if !defined(__cpp_lib_string_view) && defined(__cpp_lib_experimental_string_view)
|
||||
namespace std
|
||||
|
|
Loading…
Add table
Reference in a new issue