Skip to content

Commit

Permalink
Export finalizer-related symbols in Dart FFI (#1150)
Browse files Browse the repository at this point in the history
Resolves: #1149
Signed-off-by: Daniel Kamkha <[email protected]>
  • Loading branch information
DanielKamkha authored Nov 1, 2021
1 parent fc9fb5d commit 41eefea
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Gluecodium project Release Notes

## Unreleased
### Bug fixes:
* Fixed linking issues in Dart when building it with Xcode.

## 10.2.0
Release date: 2021-10-29
### Features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct FinalizerData {
void (*finalizer)(FfiOpaqueHandle, int32_t);
};

void {{libraryName}}_execute_finalizer(void*, void* data);
_GLUECODIUM_FFI_EXPORT void {{libraryName}}_execute_finalizer(void*, void* data);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ extern "C" {
_GLUECODIUM_FFI_EXPORT Dart_Handle {{libraryName}}_get_cached_dart_handle(FfiOpaqueHandle handle, Dart_Handle null_handle);
_GLUECODIUM_FFI_EXPORT void {{libraryName}}_cache_dart_handle(FfiOpaqueHandle handle, int32_t isolate_id, Dart_Handle dart_handle);
void {{libraryName}}_cache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id, Dart_Handle dart_handle);
void {{libraryName}}_uncache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id);
_GLUECODIUM_FFI_EXPORT void {{libraryName}}_cache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id, Dart_Handle dart_handle);
_GLUECODIUM_FFI_EXPORT void {{libraryName}}_uncache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id);

#ifdef __cplusplus
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#pragma once
#include "OpaqueHandle.h"
#include "dart_api_dl.h"
#ifdef __cplusplus
extern "C" {
#endif
struct FinalizerData {
FfiOpaqueHandle ffi_handle;
int32_t isolate_id;
void (*finalizer)(FfiOpaqueHandle, int32_t);
};
_GLUECODIUM_FFI_EXPORT void library_execute_finalizer(void*, void* data);
#ifdef __cplusplus
}
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ extern "C" {
#endif
_GLUECODIUM_FFI_EXPORT Dart_Handle library_get_cached_dart_handle(FfiOpaqueHandle handle, Dart_Handle null_handle);
_GLUECODIUM_FFI_EXPORT void library_cache_dart_handle(FfiOpaqueHandle handle, int32_t isolate_id, Dart_Handle dart_handle);
void library_cache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id, Dart_Handle dart_handle);
void library_uncache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id);
_GLUECODIUM_FFI_EXPORT void library_cache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id, Dart_Handle dart_handle);
_GLUECODIUM_FFI_EXPORT void library_uncache_dart_handle_by_raw_pointer(void* raw_pointer, int32_t isolate_id);
#ifdef __cplusplus
}
#endif

0 comments on commit 41eefea

Please sign in to comment.