Allow any returns in native callbacks (#857)

This commit is contained in:
Michael Flaherty
2018-07-25 21:46:44 -07:00
committed by GitHub
parent 7d8dfb09d8
commit 11abe77eed
2 changed files with 26 additions and 12 deletions
+24 -10
View File
@@ -357,16 +357,30 @@ native int Call_Finish(any &result=0);
*/
native void Call_Cancel();
/**
* 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.
* @return Value for the native call to return.
*/
typedef NativeCall = function int (Handle plugin, int numParams);
typeset NativeCall
{
/**
* 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.
* @return Value for the native call to return.
*/
function int (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.
* @return Value for the native call to return.
*/
function any (Handle plugin, int numParams);
}
/**
* Creates a dynamic native. This should only be called in AskPluginLoad(), or