Introduce a typedef keyword.

This commit is contained in:
David Anderson
2014-08-03 21:51:34 -07:00
parent 09edda93ad
commit ad376ff0b8
20 changed files with 172 additions and 47 deletions
+4 -4
View File
@@ -328,7 +328,7 @@ native FormatActivitySource(client, target, const String:namebuf[], maxlength);
* @return An Action value. Not handling the command
* means that Source will report it as "not found."
*/
functag public Action:SrvCmd(args);
typedef SrvCmd = function Action (int args);
/**
* Creates a server-only console command, or hooks an already existing one.
@@ -352,7 +352,7 @@ native RegServerCmd(const String:cmd[], SrvCmd:callback, const String:descriptio
* @return An Action value. Not handling the command
* means that Source will report it as "not found."
*/
functag public Action:ConCmd(client, args);
typedef ConCmd = function Action (int client, int args);
/**
* Creates a console command, or hooks an already existing one.
@@ -456,7 +456,7 @@ native Handle:FindConVar(const String:name[]);
* @param newValue String containing the new value of the convar.
* @noreturn
*/
functag public void ConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]);
typedef ConVarChanged = function void (Handle convar, const char[] oldValue, const char[] newValue);
/**
* Creates a hook for when a console variable's value is changed.
@@ -905,7 +905,7 @@ native RemoveServerTag(const String:tag[]);
* @param argc Argument count.
* @return Action to take (see extended notes above).
*/
functag public Action:CommandListener(client, const String:command[], argc);
typedef CommandListener = function Action (int client, const char[] command, int argc);
#define FEATURECAP_COMMANDLISTENER "command listener"