Skip to content

Commit

Permalink
littlefix
Browse files Browse the repository at this point in the history
  • Loading branch information
maitag committed Jul 3, 2018
1 parent c060fea commit 24accdd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Source/peote/net/Remote.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class RemoteImpl
return pack;
}

public static function hasMeta(f:Field, s:String):Bool {for (m in f.meta) { if (m.name == s || m.name == ':$s') return true; } return false; }

public static function build()
{
try { Context.resolvePath("org/msgpack/MsgPack.hx"); isMsgPack = true; } catch (e:Dynamic) {}
Expand All @@ -43,12 +45,10 @@ class RemoteImpl
var fields = Context.getBuildFields();
for (f in fields)
{
function hasMeta(s:String):Bool {for (m in f.meta) { if (m.name == s) return true;} return false;}

if (f.name == "new") {
hasNoNew = false;
}
else if ( hasMeta(":remote") )
else if ( hasMeta(f, "remote") )
{
var remParams = new Array<TypePath>();
switch (f.kind)
Expand Down
4 changes: 2 additions & 2 deletions samples/rpc/src/remoteParams/User.hx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ package remoteParams;
public var other:String; // NOT serialized
#else
class User {
@:s public var name: String; // serialized
@:s public var age: Int; // serialized
public var name: String; // serialized
public var age: Int; // serialized
public var other:String; // serialized
#end

Expand Down

0 comments on commit 24accdd

Please sign in to comment.