From 3e759e979abe39c2bbccb9deb25dc109ccee108d Mon Sep 17 00:00:00 2001 From: shoebox Date: Fri, 28 Feb 2014 17:21:49 +0100 Subject: [PATCH 1/2] iOS metadatas --- haxelib.json | 4 ++-- src/org/shoebox/macros/MacroMirrors.hx | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/haxelib.json b/haxelib.json index 3f6db7a..44f1fe6 100644 --- a/haxelib.json +++ b/haxelib.json @@ -4,7 +4,7 @@ "license": "BSD", "tags": ["hyperfiction", "macro","shoebox","openfl"], "description": "Essential macros for native extensions", - "version": "1.0.1", - "releasenote": "Initial release", + "version": "1.0.2", + "releasenote": "@iOS meta", "contributors": ["shoebox"] } \ No newline at end of file diff --git a/src/org/shoebox/macros/MacroMirrors.hx b/src/org/shoebox/macros/MacroMirrors.hx index 77b0deb..c7f2192 100644 --- a/src/org/shoebox/macros/MacroMirrors.hx +++ b/src/org/shoebox/macros/MacroMirrors.hx @@ -96,6 +96,14 @@ class MacroMirrors{ ( m.params.length > 1 ) ? _getString( m.params[ 1 ] ) : field.name ) ); } + else if( m.name == "IOS" && Context.defined("ios")) + { + aFields.push( _cpp( + field , + ( m.params.length > 0 ) ? _getString( m.params[ 0 ] ) : oClass.get( ).module, + ( m.params.length > 1 ) ? _getString( m.params[ 1 ] ) : field.name + ) ); + } } From dd886ff185bd19b00637331237aa725b0bb52df0 Mon Sep 17 00:00:00 2001 From: shoebox Date: Tue, 4 Mar 2014 16:42:22 +0100 Subject: [PATCH 2/2] @iOS metadata --- src/org/shoebox/macros/MacroMirrors.hx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/org/shoebox/macros/MacroMirrors.hx b/src/org/shoebox/macros/MacroMirrors.hx index c7f2192..955683f 100644 --- a/src/org/shoebox/macros/MacroMirrors.hx +++ b/src/org/shoebox/macros/MacroMirrors.hx @@ -51,7 +51,7 @@ class MacroMirrors{ * @return void */ static public function build( ) : Array{ - + //Fields var aFields : Array = Context.getBuildFields( ); var oClass : Null> = Context.getLocalClass( ); @@ -70,7 +70,7 @@ class MacroMirrors{ for( field in aFields.copy( ) ){ // - aMetas = [ for( m in field.meta ) if( m.name == "CPP" || m.name == "JNI" ) m ]; + aMetas = [ for( m in field.meta ) if( m.name == "CPP" || m.name == "JNI" || m.name == "IOS" ) m ]; // if( aMetas.length == 0 ) @@ -79,7 +79,6 @@ class MacroMirrors{ // for(m in aMetas) { - if(m.name == "CPP" && Context.defined("cpp")) { aFields.push( _cpp(