keyvalues: adjust KvSavePosition return value to implementation (#757)
The current ``KvSavePosition`` definition does not reflect the behaviour seen in [core/smn_keyvalues.cpp#L973-L981](404e96ad45/core/smn_keyvalues.cpp (L973-L981)
). This can cause problems if some procedure on sp expects ``KvSavePosition`` to always add one node to the stack, no matter if there is no higher node.
Co-authored-by: peace-maker <peace-maker@wcfan.de>
This commit is contained in:
parent
8826663186
commit
6670b93cc6
@ -241,7 +241,8 @@ methodmap KeyValues < Handle
|
||||
// have the previous key saved for backwards traversal.
|
||||
//
|
||||
// @param kv KeyValues Handle.
|
||||
public native void SavePosition();
|
||||
// @return True on success, false if there is no higher node.
|
||||
public native bool SavePosition();
|
||||
|
||||
// Jumps back to the previous position. Returns false if there are no
|
||||
// previous positions (i.e., at the root node). This should be called
|
||||
@ -523,9 +524,10 @@ native bool KvGotoNextKey(Handle kv, bool keyOnly=true);
|
||||
* have the previous key saved for backwards traversal.
|
||||
*
|
||||
* @param kv KeyValues Handle.
|
||||
* @return True on success, false if there is no higher node.
|
||||
* @error Invalid Handle.
|
||||
*/
|
||||
native void KvSavePosition(Handle kv);
|
||||
native bool KvSavePosition(Handle kv);
|
||||
|
||||
/**
|
||||
* Removes the given key from the current position.
|
||||
|
Loading…
Reference in New Issue
Block a user