Fix VM memory allocation optimizations by reducing what we allocate on the heap
This commit is contained in:
@@ -15,7 +15,7 @@ func Len(args ...object.Object) object.Object {
|
||||
}
|
||||
|
||||
if size, ok := args[0].(object.Sizeable); ok {
|
||||
return &object.Integer{Value: int64(size.Len())}
|
||||
return object.Integer{Value: int64(size.Len())}
|
||||
}
|
||||
return newError("TypeError: object of type '%s' has no len()", args[0].Type())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user