Allow any returns in native callbacks (#857)
This commit is contained in:
parent
7d8dfb09d8
commit
11abe77eed
@ -162,9 +162,9 @@ public void DefaultCategoryHandler(TopMenu topmenu,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int __GetAdminTopMenu(Handle plugin, int numParams)
|
public any __GetAdminTopMenu(Handle plugin, int numParams)
|
||||||
{
|
{
|
||||||
return view_as<int>(hAdminMenu);
|
return hAdminMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int __AddTargetsToMenu(Handle plugin, int numParams)
|
public int __AddTargetsToMenu(Handle plugin, int numParams)
|
||||||
|
@ -357,16 +357,30 @@ native int Call_Finish(any &result=0);
|
|||||||
*/
|
*/
|
||||||
native void Call_Cancel();
|
native void Call_Cancel();
|
||||||
|
|
||||||
/**
|
typeset NativeCall
|
||||||
* Defines a native function.
|
{
|
||||||
*
|
/**
|
||||||
* It is not necessary to validate the parameter count
|
* Defines a native function.
|
||||||
*
|
*
|
||||||
* @param plugin Handle of the calling plugin.
|
* It is not necessary to validate the parameter count
|
||||||
* @param numParams Number of parameters passed to the native.
|
*
|
||||||
* @return Value for the native call to return.
|
* @param plugin Handle of the calling plugin.
|
||||||
*/
|
* @param numParams Number of parameters passed to the native.
|
||||||
typedef NativeCall = function int (Handle plugin, int numParams);
|
* @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
|
* Creates a dynamic native. This should only be called in AskPluginLoad(), or
|
||||||
|
Loading…
Reference in New Issue
Block a user