Auto-unwrap invocation response arguments as well.
Make Long not wrapped for now. Don't svn update until after mdb regenerates everything.. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4569 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -199,6 +199,8 @@ public class InvocationDirector
|
||||
return;
|
||||
}
|
||||
|
||||
unwrapArgs(args);
|
||||
|
||||
// log.info("Dispatching invocation response " +
|
||||
// "[listener=" + listener + ", methId=" + methodId +
|
||||
// ", args=" + StringUtil.toString(args) + "].");
|
||||
@@ -238,13 +240,7 @@ public class InvocationDirector
|
||||
return;
|
||||
}
|
||||
|
||||
if (args != null) {
|
||||
for (var ii :int = 0; ii < args.length; ii++) {
|
||||
if (args[ii] is Wrapped) {
|
||||
args[ii] = (args[ii] as Wrapped).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
unwrapArgs(args);
|
||||
|
||||
// log.info("Dispatching invocation notification " +
|
||||
// "[receiver=" + decoder.receiver + ", methodId=" + methodId +
|
||||
@@ -297,6 +293,21 @@ public class InvocationDirector
|
||||
// TODO: or fuck it?
|
||||
}
|
||||
|
||||
/**
|
||||
* Unwrap any arguments that have arrived from the server in wrapped
|
||||
* types.
|
||||
*/
|
||||
protected function unwrapArgs (args :Array) :void
|
||||
{
|
||||
if (args != null) {
|
||||
for (var ii :int = 0; ii < args.length; ii++) {
|
||||
if (args[ii] is Wrapped) {
|
||||
args[ii] = (args[ii] as Wrapped).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to generate monotonically increasing invocation request ids.
|
||||
*/
|
||||
|
||||
@@ -4,7 +4,7 @@ package com.threerings.util {
|
||||
* Equivalent to java.lang.Long.
|
||||
*/
|
||||
public class Long
|
||||
implements Equalable, Wrapped
|
||||
implements Equalable
|
||||
{
|
||||
public var high :int;
|
||||
public var low :int;
|
||||
@@ -30,7 +30,7 @@ public class Long
|
||||
return (this.high == that.high) && (this.low == that.low);
|
||||
}
|
||||
|
||||
// from Wrapped
|
||||
// from Wrapped, except that we don't implement Wrapped anymore
|
||||
public function unwrap () :Object
|
||||
{
|
||||
return low; // TODO
|
||||
|
||||
Reference in New Issue
Block a user