Commit 5c375d8e authored by Chris McDonough's avatar Chris McDonough

Added long datatype handlers.

parent 17ea61a4
......@@ -530,6 +530,9 @@ class xmlUnpickler(NoBlanks, xyap):
start_handlers={'pickle': start_pickle}
end_handlers={
'int':
lambda self,tag,data,atoi=string.atoi,name=name:
atoi(name(self, tag, data)),
'long':
lambda self,tag,data,atoi=string.atoi,name=name:
atoi(name(self, tag, data)),
'boolean':
......@@ -695,6 +698,7 @@ class xmlPickler(NoBlanks, xyap):
'pickle': lambda self, tag, data: data[2]+'.',
'none': lambda self, tag, data: 'N',
'int': save_int,
'long': lambda self, tag, data: 'L'+data[2]+'L\012',
'float': save_float,
'string': save_string,
'reference': save_reference,
......@@ -730,9 +734,11 @@ def test():
t=()
l=[]
s=''
L = long('999999999999')
x.append(t)
x.append(l)
x.append(s)
x.append(L)
x.append(55555)
x.append(13)
r=[x]
......@@ -807,9 +813,11 @@ def test2():
t=()
l=[]
s=''
L = long('999999999999')
x.append(t)
x.append(l)
x.append(s)
x.append(L)
x.append(5)
x.append(13)
print x, '\012'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment