Add void function prototypes to NativeCall and MenuHandler (#2081)

* Add void prototype to NativeCall typeset

`void` prototype can be used for simple natives which don't return any value.
This is done to silence compiler warnings 209 (`function has explicit 'int' tag but does not return a value`) and 242 (`function "NativeCallback" should return an explicit value`).

* Make MenuHandler into typeset and add void prototype

This can be used for basic menu handlers that don't return modified item styles and don't redraw menu items.
This commit is contained in:
Ivan Zaitsev
2023-12-18 23:57:58 +00:00
committed by GitHub
parent 385eae892c
commit ab6b45b81c
2 changed files with 18 additions and 1 deletions
+10
View File
@@ -448,6 +448,16 @@ typeset NativeCall
* @return Value for the native call to return.
*/
function any (Handle plugin, int numParams);
/**
* Defines a native function.
*
* It is not necessary to validate the parameter count
*
* @param plugin Handle of the calling plugin.
* @param numParams Number of parameters passed to the native.
*/
function void (Handle plugin, int numParams);
}
/**