From adcccc863fef30f190076f7af7dc9e1e0fca26d2 Mon Sep 17 00:00:00 2001 From: Joseph Cloutier Date: Sat, 24 Feb 2024 19:25:37 -0500 Subject: [PATCH] Remove `embedBytesHL()` function. This was likely added when `#if hl` began to fail, hiding the problem. With the issue fixed, there's no more need for a workaround. --- src/haxe/io/Bytes.hx | 2 +- src/lime/_internal/macros/AssetsMacro.hx | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/haxe/io/Bytes.hx b/src/haxe/io/Bytes.hx index ac2c2bb5e..5134e72fa 100644 --- a/src/haxe/io/Bytes.hx +++ b/src/haxe/io/Bytes.hx @@ -945,7 +945,7 @@ class Bytes } #elseif hl #if !macro -@:autoBuild(lime._internal.macros.AssetsMacro.embedBytesHL()) // Enable @:bytes embed metadata +@:autoBuild(lime._internal.macros.AssetsMacro.embedBytes()) // Enable @:bytes embed metadata #end @:coreApi class Bytes diff --git a/src/lime/_internal/macros/AssetsMacro.hx b/src/lime/_internal/macros/AssetsMacro.hx index 206f4b6a4..5a0dbc727 100644 --- a/src/lime/_internal/macros/AssetsMacro.hx +++ b/src/lime/_internal/macros/AssetsMacro.hx @@ -46,25 +46,6 @@ class AssetsMacro return fields; } - macro public static function embedBytesHL():Array - { - var fields = embedData(":file"); - if (fields == null) return null; - - var definition = macro class Temp - { - public function new(?length:Int, ?bytesData:haxe.io.BytesData) - { - var bytes = haxe.Resource.getBytes(resourceName); - super(bytes.b, bytes.length); - } - }; - - fields.push(definition.fields[0]); - - return fields; - } - macro public static function embedByteArray():Array { var fields = embedData(":file");