nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge: contrib/header_static: a cog in the toolchains to generate Objcwrapper
[nit.git]
/
lib
/
serialization
/
serialization.nit
diff --git
a/lib/serialization/serialization.nit
b/lib/serialization/serialization.nit
index
3ba9968
..
8977baa
100644
(file)
--- a/
lib/serialization/serialization.nit
+++ b/
lib/serialization/serialization.nit
@@
-146,6
+146,12
@@
redef interface Object
#
# Used to determine if an object has already been serialized.
fun is_same_serialized(other: nullable Object): Bool do return is_same_instance(other)
#
# Used to determine if an object has already been serialized.
fun is_same_serialized(other: nullable Object): Bool do return is_same_instance(other)
+
+ # Hash value use for serialization
+ #
+ # Used in combination with `is_same_serialized`. If two objects are the same
+ # in a serialization context, they must have the same `serialization_hash`.
+ fun serialization_hash: Int do return object_id
end
# Instances of this class are not delayed and instead serialized immediately
end
# Instances of this class are not delayed and instead serialized immediately