Skip to content

Commit 6fbcb94

Browse files
authored
When generating c# code for multiple worlds, where might be a clash between multiple generated WasmImportLinkageAttributes. (bytecodealliance#884)
1 parent d397c42 commit 6fbcb94

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/csharp/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ impl WorldGenerator for CSharp {
478478
/* of WASI libc prevent us doing so. */
479479
/* See https://github.com/bytecodealliance/wit-bindgen/issues/777 */
480480
/* and https://github.com/WebAssembly/wasi-libc/issues/452 */
481-
/* The component model `start` function might be an alternative to this depending on whether it
481+
/* The component model `start` function might be an alternative to this depending on whether it */
482482
/* has the same constraints as `cabi_realloc` */
483483
__attribute__((__weak__, __export_name__("cabi_realloc")))
484484
void *cabi_realloc(void *ptr, size_t old_size, size_t align, size_t new_size) {
@@ -586,7 +586,7 @@ impl WorldGenerator for CSharp {
586586
// temporarily add this attribute until it is available in dotnet 9
587587
namespace System.Runtime.InteropServices
588588
{
589-
public class WasmImportLinkageAttribute : Attribute {}
589+
internal partial class WasmImportLinkageAttribute : Attribute {}
590590
}
591591
"#,
592592
);

0 commit comments

Comments
 (0)