ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/plugins/cfperl/cfperl.xs
(Generate patch)

Comparing deliantra/server/plugins/cfperl/cfperl.xs (file contents):
Revision 1.7 by root, Fri Feb 3 22:52:51 2006 UTC vs.
Revision 1.9 by root, Sat Feb 4 16:17:47 2006 UTC

543 543
544BOOT: 544BOOT:
545{ 545{
546 HV *stash = gv_stashpv ("cf", 1); 546 HV *stash = gv_stashpv ("cf", 1);
547 547
548 const struct { 548 static const struct {
549 const char *name; 549 const char *name;
550 IV iv; 550 IV iv;
551 } *civ, const_iv[] = { 551 } *civ, const_iv[] = {
552# define const_iv(name) { # name, (IV)name }, 552# define const_iv(name) { # name, (IV)name },
553 const_iv (llevError) 553 const_iv (llevError)
837 }; 837 };
838 838
839 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) 839 for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; )
840 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); 840 newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv));
841 841
842 const struct { 842 static const struct {
843 const char *name; 843 const char *name;
844 IV iv; 844 IV iv;
845 } *event, event_list[] = { 845 } *event, event_list[] = {
846# define const_event(name) { # name, (IV)EVENT_ ## name }, 846# define const_event(name) { # name, (IV)EVENT_ ## name },
847 const_event (NONE) 847 const_event (NONE)
878 AV *av = get_av ("cf::EVENT", 1); 878 AV *av = get_av ("cf::EVENT", 1);
879 879
880 for (event = event_list + sizeof (event_list) / sizeof (event_list [0]); event-- > event_list; ) 880 for (event = event_list + sizeof (event_list) / sizeof (event_list [0]); event-- > event_list; )
881 av_store (av, event->iv, newSVpv ((char *)event->name, 0)); 881 av_store (av, event->iv, newSVpv ((char *)event->name, 0));
882 882
883 const struct { 883 static const struct {
884 int dtype; 884 int dtype;
885 const char *name; 885 const char *name;
886 IV idx; 886 IV idx;
887 } *cprop, prop_table[] = { 887 } *cprop, prop_table[] = {
888# define prop(type, name) { type, # name, (IV) CFAPI_ ## name }, 888# define prop(type, name) { type, # name, (IV) CFAPI_ ## name },
1160 RETVAL = cf_query_base_name (ob, plural); 1160 RETVAL = cf_query_base_name (ob, plural);
1161 OUTPUT: RETVAL 1161 OUTPUT: RETVAL
1162 1162
1163MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ 1163MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1164 1164
1165object *cf_create_object ()
1166 PROTOTYPE:
1167 ALIAS: new = 0
1168
1169object *cf_create_object_by_name (const char *name) 1165object *cf_create_object_by_name (const char *name = 0)
1170 PROTOTYPE: $ 1166 PROTOTYPE: ;$
1171 ALIAS: new_from_name = 0 1167 ALIAS:
1172 1168 create_object = 0
1173void cf_free_object (object *ob) 1169 new = 0
1170 CODE:
1171 RETVAL = name ? cf_create_object_by_name (name) : cf_create_object ();
1172 OUTPUT:
1173 RETVAL
1174 1174
1175void cf_fix_object (object *pl) 1175void cf_fix_object (object *pl)
1176 ALIAS: fix = 0
1176 1177
1177object *cf_insert_ob_in_ob (object *ob, object *where) 1178object *cf_insert_ob_in_ob (object *ob, object *where)
1178 1179
1179 1180
1180MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_ 1181MODULE = cf PACKAGE = cf::object::player PREFIX = cf_player_

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines