| author | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-04-14 18:00:41 UTC |
| committer | Stephen Paul Weber
<singpolyma@singpolyma.net> 2025-04-14 18:00:41 UTC |
| parent | 58945249c7cada63b4d9e4075df07f9832cb6091 |
| snikket/AttachmentSource.cpp.hx | +11 | -1 |
diff --git a/snikket/AttachmentSource.cpp.hx b/snikket/AttachmentSource.cpp.hx index d0da87a..168a484 100644 --- a/snikket/AttachmentSource.cpp.hx +++ b/snikket/AttachmentSource.cpp.hx @@ -1,5 +1,14 @@ package snikket; +#if cpp +import HaxeCBridge; +#end + +@:expose +#if cpp +@:build(HaxeCBridge.expose()) +@:build(HaxeSwiftBridge.expose()) +#end class AttachmentSource { public final path: String; public final type: String; @@ -13,7 +22,8 @@ class AttachmentSource { this.type = mime; } - public inline function tinkSource() { + @:allow(snikket) + private inline function tinkSource() { return tink.io.Source.ofInput(this.name, sys.io.File.read(path)); } }