You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/09/23 16:12:40 UTC
[2/3] tinkerpop git commit: Graphson int32 is signed
Graphson int32 is signed
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/b214954e
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/b214954e
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/b214954e
Branch: refs/heads/master
Commit: b214954ecdd30357ddadc8fc3c07f0dcd4de5036
Parents: 5573def
Author: Carlos Cheung <ca...@tumvi.com>
Authored: Sun Sep 18 23:33:27 2016 -0400
Committer: GitHub <no...@github.com>
Committed: Sun Sep 18 23:33:27 2016 -0400
----------------------------------------------------------------------
.../src/main/jython/gremlin_python/structure/io/graphson.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b214954e/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
index aae3ab2..638c86e 100644
--- a/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
+++ b/gremlin-python/src/main/jython/gremlin_python/structure/io/graphson.py
@@ -181,7 +181,7 @@ class NumberSerializer(GraphSONSerializer):
def _dictify(self, number):
if isinstance(number, bool): # python thinks that 0/1 integers are booleans
return number
- elif isinstance(number, long) or (number > 2147483647): # in python all numbers are int unless specified otherwise
+ elif isinstance(number, long) or (abs(number) > 2147483647): # in python all numbers are int unless specified otherwise
return _SymbolHelper.objectify("Int64", number)
elif isinstance(number, int):
return _SymbolHelper.objectify("Int32", number)