mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 09:34:57 +09:00
Use modern C++ attributes instead of __attribute__ voodoo.
This is quite nice, although I wish [[gnu::always_inline]] implied inline. Also "gnu::" is kind of a wart, but whatcha gonna do.
This commit is contained in:
parent
fbcc8ab840
commit
022f7790db
Notes:
sideshowbarker
2024-07-19 15:42:33 +09:00
Author: https://github.com/awesomekling
Commit: 022f7790db
34 changed files with 99 additions and 124 deletions
|
@ -1,7 +1,5 @@
|
|||
#pragma once
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#if defined(SERENITY) && defined(KERNEL)
|
||||
#define AK_MAKE_ETERNAL \
|
||||
public: \
|
||||
|
@ -18,11 +16,10 @@ private:
|
|||
|
||||
extern "C" {
|
||||
|
||||
void* kcalloc(size_t nmemb, size_t size);
|
||||
void* kmalloc(size_t size) MALLOC_ATTR;
|
||||
[[gnu::malloc, gnu::returns_nonnull]] void* kmalloc(size_t size);
|
||||
[[gnu::malloc, gnu::returns_nonnull]] void* kmalloc_eternal(size_t);
|
||||
[[gnu::returns_nonnull]] void* krealloc(void* ptr, size_t size);
|
||||
void kfree(void* ptr);
|
||||
void* krealloc(void* ptr, size_t size);
|
||||
void* kmalloc_eternal(size_t) MALLOC_ATTR;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue