You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2015/11/02 17:37:12 UTC
[29/33] ignite git commit: wip
wip
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/9f4739b7
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/9f4739b7
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/9f4739b7
Branch: refs/heads/ignite-1753-1282
Commit: 9f4739b7c0937328679fef60585dbe0998e645c2
Parents: 48b775d
Author: Pavel Tupitsyn <pt...@gridgain.com>
Authored: Mon Nov 2 16:11:27 2015 +0300
Committer: Pavel Tupitsyn <pt...@gridgain.com>
Committed: Mon Nov 2 16:11:27 2015 +0300
----------------------------------------------------------------------
.../Impl/Portable/PortableObjectSchemaField.cs | 4 ++--
.../Impl/Portable/PortableObjectSchemaHolder.cs | 9 ++++-----
2 files changed, 6 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/9f4739b7/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaField.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaField.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaField.cs
index b8ed62f..36bbf39 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaField.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaField.cs
@@ -63,9 +63,9 @@ namespace Apache.Ignite.Core.Impl.Portable
if (BitConverter.IsLittleEndian)
{
- fixed (PortableObjectSchemaField* ptr = &fields[0])
+ fixed (PortableObjectSchemaField* ptr = &fields[start])
{
- stream.Write((byte*) ptr + start * Size, count * Size);
+ stream.Write((byte*) ptr, count * Size);
}
}
else
http://git-wip-us.apache.org/repos/asf/ignite/blob/9f4739b7/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaHolder.cs
----------------------------------------------------------------------
diff --git a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaHolder.cs b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaHolder.cs
index f577458..d909efa 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaHolder.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core/Impl/Portable/PortableObjectSchemaHolder.cs
@@ -79,15 +79,14 @@ namespace Apache.Ignite.Core.Impl.Portable
/// <returns>True if current schema was non empty; false otherwise.</returns>
public bool WriteAndPop(IPortableStream stream, out int schemaId)
{
- var count = _offsets.Pop();
+ var offset = _offsets.Pop();
+ var count = _idx - offset;
if (count > 0)
{
- var startIdx = _idx - count;
+ PortableObjectSchemaField.WriteArray(_fields, stream, offset, count);
- PortableObjectSchemaField.WriteArray(_fields, stream, startIdx, count);
-
- schemaId = PortableUtils.GetSchemaId(_fields, startIdx, count);
+ schemaId = PortableUtils.GetSchemaId(_fields, offset, count);
_idx -= count;