Skip to content

Commit feaeb6a

Browse files
authored
Fix return values of some natives. (#2437)
These are listed as returning void, but actually have non-void returns in their implementation and pre-methodmap signatures.
1 parent a3fb4df commit feaeb6a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

plugins/include/admin.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ methodmap AdminId {
175175
// @param name String buffer to store name.
176176
// @param maxlength Maximum size of string buffer.
177177
// @return Number of bytes written.
178-
public native void GetUsername(char[] name, int maxlength);
178+
public native bool GetUsername(char[] name, int maxlength);
179179

180180
// Binds an admin to an identity for fast lookup later on. The bind must be unique.
181181
//

plugins/include/textparse.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ methodmap SMCParser < Handle
191191
// @param buffer A string buffer for the error (contents undefined on failure).
192192
// @param buf_max The maximum size of the buffer.
193193
// @return The number of characters written to buffer.
194-
public native void GetErrorString(SMCError error, char[] buffer, int buf_max);
194+
public native bool GetErrorString(SMCError error, char[] buffer, int buf_max);
195195
};
196196

197197
/**

0 commit comments

Comments
 (0)