HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit

Home Page:https://haxe.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug during haxe --macro Field index for SSL_IS_SERVER not found

yuxiaomao opened this issue · comments

Run the following code with haxe --macro Config.main() result in error Field index for SSL_IS_SERVER not found on prototype mbedtls._SslEndpoint.SslEndpoint_Impl_
Since 944d4fd ( #11481 )

It works fine with haxe --run Config.

class Config {
	public static function main() {
		Sys.println("Config...");
	}

	public static function updateHaxeLinux() {
		new haxe.Http("https://build.haxe.org/builds/haxe/linux64/");
	}
}

Note that it's because of

@:native("mbedtls.SslEndpoint")
extern enum abstract SslEndpoint(Int) {
var SSL_IS_CLIENT;
var SSL_IS_SERVER;
}

Which seems to indicate we do need some "@:native" behavior for macro (but probably only for std things)