aboutsummaryrefslogtreecommitdiffstats
path: root/core/memory.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/memory.go')
-rw-r--r--core/memory.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/memory.go b/core/memory.go
index 6477f74..e3063d6 100644
--- a/core/memory.go
+++ b/core/memory.go
@@ -13,11 +13,6 @@ type MemoryObject struct {
sz int64
}
-// NewMemoryObject creates a new MemoryObject
-func NewMemoryObject(t ObjectType, len int64, cont []byte) *MemoryObject {
- return &MemoryObject{t: t, sz: len, cont: cont}
-}
-
// Hash return the object Hash, the hash is calculated on-the-fly the first
// time is called, the subsequent calls the same Hash is returned even if the
// type or the content has changed. The Hash is only generated if the size of
@@ -39,7 +34,8 @@ func (o *MemoryObject) SetType(t ObjectType) { o.t = t }
// Size return the size of the object
func (o *MemoryObject) Size() int64 { return o.sz }
-// SetSize set the object size, the given size should be written afterwards
+// SetSize set the object size, a content of the given size should be written
+// afterwards
func (o *MemoryObject) SetSize(s int64) { o.sz = s }
// Content returns the contents of the object