Add ADT array blocksize getter (#578)

Add GetArrayBlockSize and GetStackBlockSize and equivalent properties to
the methodmaps to get the blocksize the array or stack was created with.

Useful when getting array handles from other plugins you didn't create
yourself.
This commit is contained in:
peace-maker
2017-02-09 19:26:14 +00:00
committed by Asher Baker
parent 23feb54f6a
commit 86363dd3ec
4 changed files with 62 additions and 0 deletions
+14
View File
@@ -109,6 +109,11 @@ methodmap ArrayStack < Handle
property bool Empty {
public native get();
}
// Retrieve the blocksize the stack was created with.
property int BlockSize {
public native get();
}
};
/**
@@ -224,3 +229,12 @@ stock bool PopStack(Handle stack)
int value;
return PopStackCell(stack, value);
}
/**
* Returns the blocksize the stack was created with.
*
* @param stack Stack Handle.
* @return The blocksize of the stack.
* @error Invalid Handle
*/
native int GetStackBlockSize(Handle stack);