[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Thu Mar 22 06:30:26 CDT 2007


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2007/03/22 06:30
User        : ryo
Edit Summary: link

@@ -229,17 +229,18 @@
  
  Syntax for wrapper is eg ''cf_object_get_property(int* type, object* ob, int propcode, (property type)* value)''.
  
  FIXME expand
+ 
  
  ===== Function wrapping =====
  This wraps specific Crossfire functions. The calling convention (not enforced everywhere, but being worked on FIXME remove when finished) is to send parameters in the same order as the wrapped function, and add as the last parameter a pointer to a variable of the same type as the return value which will receive the actual function return value. The hook return value will be a constant indicating whether the function was called or another error occurred (FIXME expand/check/make that true in the code ;p)
  
  Let's take for example the wrapper for ''get_ob_key_value''.
  
  The function prototype is:
  <code>const char *get_ob_key_value(const object *op, const char *const key)</code>
- (the return value is a shared string FIXME link when the relevant part exists)
+ (the return value is a [[dev:shared_strings|shared string]])
  
  The ''[[http://crossfire.svn.sourceforge.net/viewvc/crossfire/server/trunk/server/plugins.c?view=markup|server-side]]'' hook is (note the NULL return value, since this is being worked on FIXME remove when fixed):
  <code>
  void* cfapi_object_get_key(int* type, ...)


IP-Address  : 172.186.46.252
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1174562060
New Revision: http://wiki.metalforge.net/doku.php/server_plugin

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list