ArrayStack: add Clone method (#1304)

* Provide ArrayStack.Clone method

* Clean definition for old syntax.

Co-authored-by: Kyle Sanderson <[email protected]>
This commit is contained in:
Ҝℴţأķ
2020-07-08 20:59:17 -07:00
committed by GitHub
co-authored by Kyle Sanderson
parent 4a4b9ce7f0
commit 611bad4036
2 changed files with 36 additions and 0 deletions
+8
View File
@@ -54,6 +54,14 @@ methodmap ArrayStack < Handle
// new Array[X][32]
public native ArrayStack(int blocksize=1);
// Clones an stack, returning a new handle with the same size and data.
// This should NOT be confused with CloneHandle. This is a completely new
// handle with the same data but no relation to the original. It should
// closed when no longer needed.
//
// @return New handle to the cloned stack object
public native ArrayStack Clone();
// Pushes a value onto the end of the stack, adding a new index.
//
// This may safely be used even if the stack has a blocksize