mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-30 06:06:48 +00:00
LibGC: Teach Swift bindings about Cell and Cell::Visitor
Add the proper annotations for the Cell and Cell::Visitor classes to be visible in Swift. This lets us remove some OpaquePointer shinangians in the Swift bindings.
This commit is contained in:
parent
4ab89d8bbb
commit
8554ee386e
Notes:
github-actions[bot]
2025-04-03 22:49:27 +00:00
Author: https://github.com/ADKaster
Commit: 8554ee386e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4053
7 changed files with 43 additions and 48 deletions
|
@ -7,9 +7,9 @@
|
|||
#include "TestInterop.h"
|
||||
#include "TestHeap.h"
|
||||
#include <AK/TypeCasts.h>
|
||||
#include <LibGC-Swift.h>
|
||||
#include <LibGC/ForeignCell.h>
|
||||
#include <LibGC/Heap.h>
|
||||
#include <TestGCSwift-Swift.h>
|
||||
|
||||
#define COLLECT heap.collect_garbage(GC::Heap::CollectionType::CollectGarbage)
|
||||
#define COLLECT_ALL heap.collect_garbage(GC::Heap::CollectionType::CollectEverything)
|
||||
|
@ -20,7 +20,7 @@ void test_interop()
|
|||
|
||||
COLLECT_ALL;
|
||||
|
||||
auto string = GC::ForeignRef<GC::HeapString>::allocate(heap, "Hello, World!");
|
||||
auto string = GC::ForeignRef<TestGCSwift::HeapString>::allocate(heap, "Hello, World!");
|
||||
|
||||
COLLECT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue