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

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.154 by root, Fri Jan 26 21:44:11 2007 UTC vs.
Revision 1.175 by root, Tue Mar 6 19:02:36 2007 UTC

4 4
5/* 5/*
6 * This code is placed under the GNU General Public Licence (GPL) 6 * This code is placed under the GNU General Public Licence (GPL)
7 * 7 *
8 * Copyright (C) 2001-2005 by Chachkoff Yann 8 * Copyright (C) 2001-2005 by Chachkoff Yann
9 * Copyright (C) 2006 by Marc Lehmann <cf@schmorp.de> 9 * Copyright (C) 2006,2007 by Marc Lehmann <cf@schmorp.de>
10 * 10 *
11 * This program is free software; you can redistribute it and/or modify 11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by 12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or 13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version. 14 * (at your option) any later version.
29#include <plugin_common.h> 29#include <plugin_common.h>
30#include <sounds.h> 30#include <sounds.h>
31#include <cstdarg> 31#include <cstdarg>
32#include <sproto.h> 32#include <sproto.h>
33 33
34#include "loader.h"
34#include "cfperl.h" 35#include "cfperl.h"
35#include "shstr.h" 36#include "shstr.h"
36 37
37#include <unistd.h> 38#include <unistd.h>
38#if _POSIX_MEMLOCK 39#if _POSIX_MEMLOCK
101 102
102unordered_vector<attachable *> attachable::mortals; 103unordered_vector<attachable *> attachable::mortals;
103 104
104attachable::~attachable () 105attachable::~attachable ()
105{ 106{
107 flags |=0x3300;//D
106 assert (!self); 108 assert (!self);
107 assert (!cb); 109 assert (!cb);
108} 110}
109 111
110int 112int
111attachable::refcnt_cnt () const 113attachable::refcnt_cnt () const
112{ 114{
113 return refcnt + (self ? SvREFCNT (self) - 1 : 0); 115 return refcnt + (self ? SvREFCNT (self) - 1 : 0);
116}
117
118void
119attachable::sever_self ()
120{
121 if (HV *self = this->self)
122 {
123 // keep a refcount because sv_unmagic might call attachable_free,
124 // which might clear self, causing sv_unmagic to crash on a now
125 // invalid object.
126 SvREFCNT_inc (self);
127 hv_clear (self);
128 sv_unmagic ((SV *)self, PERL_MAGIC_ext);
129 SvREFCNT_dec (self);
130
131 // self *must* be null now because thats sv_unmagic's job.
132 assert (!this->self);
133 flags |= 0x80; // severed //D
134 }
114} 135}
115 136
116void 137void
117attachable::optimise () 138attachable::optimise ()
118{ 139{
119 if (self 140 if (self
120 && SvREFCNT (self) == 1 141 && SvREFCNT (self) == 1
121 && !HvTOTALKEYS (self)) 142 && !HvTOTALKEYS (self))
122 { 143 flags |= 0x40,//D
123 SV *self = (SV *)this->self; 144 sever_self ();
124
125 SvREFCNT_inc (self);
126 sv_unmagic (self, PERL_MAGIC_ext);
127 SvREFCNT_dec (self);
128 assert (!this->self);
129 }
130} 145}
131 146
132// check wether the object really is dead 147// check wether the object really is dead
133void 148void
134attachable::do_check () 149attachable::do_check ()
149 SvREFCNT_dec (cb); 164 SvREFCNT_dec (cb);
150 cb = 0; 165 cb = 0;
151 } 166 }
152 167
153 if (self) 168 if (self)
154 { 169 sever_self ();
155 hv_clear (self);
156 170
157 SV *self = (SV *)this->self; 171 flags |= 0x20; //D
158 SvREFCNT_inc (self);
159 sv_unmagic (self, PERL_MAGIC_ext);
160 SvREFCNT_dec (self);
161 // self is now 0
162 assert (!this->self);//D//TODO remove soon
163 }
164
165 mortals.push_back (this); 172 mortals.push_back (this);
166} 173}
167 174
168void 175void
169attachable::destroy () 176attachable::destroy ()
264 271
265 if (!obj->self) 272 if (!obj->self)
266 { 273 {
267 obj->self = newHV (); 274 obj->self = newHV ();
268 sv_magicext ((SV *)obj->self, 0, PERL_MAGIC_ext, &attachable::vtbl, (char *)obj, 0); 275 sv_magicext ((SV *)obj->self, 0, PERL_MAGIC_ext, &attachable::vtbl, (char *)obj, 0);
276 obj->flags |= (obj->flags & 0xc0) << 8;
277 obj->flags &= ~0xc0;//D
278 obj->flags |= 0x10;//D
269 279
270 // now bless the object _once_ 280 // now bless the object _once_
271 return sv_bless (newRV_inc ((SV *)obj->self), stash); 281 return sv_bless (newRV_inc ((SV *)obj->self), stash);
272 } 282 }
273 else 283 else
345inline SV *to_sv (treasurelist * v) { return to_sv (v->name); } 355inline SV *to_sv (treasurelist * v) { return to_sv (v->name); }
346 356
347inline SV *to_sv (UUID v) 357inline SV *to_sv (UUID v)
348{ 358{
349 char buf[128]; 359 char buf[128];
350 snprintf (buf, 128, "<1,%" PRIx64 ">", v.seq); 360 snprintf (buf, 128, "<1.%" PRIx64 ">", v.seq);
351 return newSVpv (buf, 0); 361 return newSVpv (buf, 0);
352} 362}
353 363
354inline void sv_to (SV *sv, shstr &v) { v = SvOK (sv) ? SvPV_nolen (sv) : 0; } 364inline void sv_to (SV *sv, shstr &v) { v = SvOK (sv) ? SvPV_nolen (sv) : 0; }
355inline void sv_to (SV *sv, char * &v) { free (v); v = SvOK (sv) ? strdup (SvPV_nolen (sv)) : 0; } 365inline void sv_to (SV *sv, char * &v) { free (v); v = SvOK (sv) ? strdup (SvPV_nolen (sv)) : 0; }
602 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) 612 if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl))
603 { 613 {
604 printf ("unable to initialize perl-interpreter, aborting.\n"); 614 printf ("unable to initialize perl-interpreter, aborting.\n");
605 exit (EXIT_FAILURE); 615 exit (EXIT_FAILURE);
606 } 616 }
617
618 {
619 dSP;
620
621 PUSHMARK (SP);
622 PUTBACK;
623 call_pv ("cf::init", G_DISCARD | G_VOID);
624 }
607} 625}
608 626
609void cfperl_main () 627void cfperl_main ()
610{ 628{
611 dSP; 629 dSP;
829void 847void
830cfperl_emergency_save () 848cfperl_emergency_save ()
831{ 849{
832 CALL_BEGIN (0); 850 CALL_BEGIN (0);
833 CALL_CALL ("cf::emergency_save", G_VOID); 851 CALL_CALL ("cf::emergency_save", G_VOID);
852 CALL_END;
853}
854
855void
856cfperl_cleanup (int make_core)
857{
858 CALL_BEGIN (1);
859 CALL_ARG (make_core);
860 CALL_CALL ("cf::post_cleanup", G_VOID);
834 CALL_END; 861 CALL_END;
835} 862}
836 863
837maptile * 864maptile *
838maptile::find_sync (const char *path, maptile *origin) 865maptile::find_sync (const char *path, maptile *origin)
1559{ 1586{
1560 // reattach to all attachable objects in the game. 1587 // reattach to all attachable objects in the game.
1561 for_all_clients (ns) 1588 for_all_clients (ns)
1562 ns->reattach (); 1589 ns->reattach ();
1563 1590
1564 for_all_players (pl)
1565 pl->reattach ();
1566
1567 //TODO
1568 //for (map_container::iterator i = maps.begin (); i != maps.end (); ++i)
1569 // i->second->reattach ();
1570
1571 for_all_objects (op) 1591 for_all_objects (op)
1572 op->reattach (); 1592 op->reattach ();
1573} 1593}
1574 1594
1575NV floor (NV x) 1595NV floor (NV x)
1647 1667
1648void cleanup (const char *cause, bool make_core = false) 1668void cleanup (const char *cause, bool make_core = false)
1649 1669
1650void emergency_save () 1670void emergency_save ()
1651 1671
1672void _exit (int status = EXIT_SUCCESS)
1673
1652UV sv_2watcher (SV *w) 1674UV sv_2watcher (SV *w)
1653 CODE: 1675 CODE:
1654 RETVAL = (UV)GEventAPI->sv_2watcher (w); 1676 RETVAL = (UV)GEventAPI->sv_2watcher (w);
1655 OUTPUT: 1677 OUTPUT:
1656 RETVAL 1678 RETVAL
1657
1658void _exit (int status = 0)
1659 1679
1660#if _POSIX_MEMLOCK 1680#if _POSIX_MEMLOCK
1661 1681
1662int mlockall (int flags = MCL_CURRENT | MCL_FUTURE) 1682int mlockall (int flags = MCL_CURRENT | MCL_FUTURE)
1663 1683
1709 RETVAL = newSVpv (resist_plus[atnr], 0); 1729 RETVAL = newSVpv (resist_plus[atnr], 0);
1710 else 1730 else
1711 XSRETURN_UNDEF; 1731 XSRETURN_UNDEF;
1712 OUTPUT: RETVAL 1732 OUTPUT: RETVAL
1713 1733
1734bool
1735load_resource_file (const char *filename)
1736
1714MODULE = cf PACKAGE = cf::attachable 1737MODULE = cf PACKAGE = cf::attachable
1715 1738
1716int 1739int
1717valid (SV *obj) 1740valid (SV *obj)
1718 CODE: 1741 CODE:
1719 RETVAL = SvROK (obj) && mg_find (SvRV (obj), PERL_MAGIC_ext); 1742 RETVAL = SvROK (obj) && mg_find (SvRV (obj), PERL_MAGIC_ext);
1720 OUTPUT: 1743 OUTPUT:
1721 RETVAL 1744 RETVAL
1745
1746void
1747debug_trace (attachable *obj, bool on = true)
1748 CODE:
1749 obj->flags &= ~attachable::F_DEBUG_TRACE;
1750 if (on)
1751 obj->flags |= attachable::F_DEBUG_TRACE;
1722 1752
1723int mortals_size () 1753int mortals_size ()
1724 CODE: 1754 CODE:
1725 RETVAL = attachable::mortals.size (); 1755 RETVAL = attachable::mortals.size ();
1726 OUTPUT: RETVAL 1756 OUTPUT: RETVAL
1728#object *mortals (U32 index) 1758#object *mortals (U32 index)
1729# CODE: 1759# CODE:
1730# RETVAL = index < attachable::mortals.size () ? attachable::mortals [index] : 0; 1760# RETVAL = index < attachable::mortals.size () ? attachable::mortals [index] : 0;
1731# OUTPUT: RETVAL 1761# OUTPUT: RETVAL
1732 1762
1733INCLUDE: $PERL genacc attachable ../include/cfperl.h | 1763INCLUDE: $PERL $srcdir/genacc attachable ../include/cfperl.h |
1734 1764
1735MODULE = cf PACKAGE = cf::global 1765MODULE = cf PACKAGE = cf::global
1736 1766
1737int invoke (SV *klass, int event, ...) 1767int invoke (SV *klass, int event, ...)
1738 CODE: 1768 CODE:
1742 RETVAL = gbl_ev.invoke ((event_type)event, ARG_AV (av), DT_END); 1772 RETVAL = gbl_ev.invoke ((event_type)event, ARG_AV (av), DT_END);
1743 OUTPUT: RETVAL 1773 OUTPUT: RETVAL
1744 1774
1745MODULE = cf PACKAGE = cf::object PREFIX = cf_object_ 1775MODULE = cf PACKAGE = cf::object PREFIX = cf_object_
1746 1776
1747INCLUDE: $PERL genacc object ../include/object.h | 1777INCLUDE: $PERL $srcdir/genacc object ../include/object.h |
1748 1778
1749int invoke (object *op, int event, ...) 1779int invoke (object *op, int event, ...)
1750 CODE: 1780 CODE:
1751 if (KLASS_OF (event) != KLASS_OBJECT) croak ("event class must be OBJECT"); 1781 if (KLASS_OF (event) != KLASS_OBJECT) croak ("event class must be OBJECT");
1752 AV *av = (AV *)sv_2mortal ((SV *)newAV ()); 1782 AV *av = (AV *)sv_2mortal ((SV *)newAV ());
1803void 1833void
1804set_animation (object *op, int idx) 1834set_animation (object *op, int idx)
1805 CODE: 1835 CODE:
1806 SET_ANIMATION (op, idx); 1836 SET_ANIMATION (op, idx);
1807 1837
1838int
1839num_animations (object *op)
1840 CODE:
1841 RETVAL = NUM_ANIMATIONS (op);
1842 OUTPUT: RETVAL
1843
1808object *find_best_object_match (object *op, const char *match) 1844object *find_best_object_match (object *op, const char *match)
1809 1845
1810object *find_marked_object (object *op) 1846object *find_marked_object (object *op)
1811 1847
1812int need_identify (object *obj); 1848int need_identify (object *obj);
1813 1849
1814int apply_shop_mat (object *shop_mat, object *op); 1850int apply_shop_mat (object *shop_mat, object *op);
1851
1852int move_player (object *op, int dir)
1853 CODE:
1854 RETVAL = move_player (op, dir);
1855 OUTPUT:
1856 RETVAL
1815 1857
1816int move (object *op, int dir, object *originator = op) 1858int move (object *op, int dir, object *originator = op)
1817 CODE: 1859 CODE:
1818 RETVAL = move_ob (op, dir, originator); 1860 RETVAL = move_ob (op, dir, originator);
1819 OUTPUT: 1861 OUTPUT:
1824 manual_apply (applied, applier, flags); 1866 manual_apply (applied, applier, flags);
1825 1867
1826void apply_below (object *op) 1868void apply_below (object *op)
1827 CODE: 1869 CODE:
1828 player_apply_below (op); 1870 player_apply_below (op);
1871
1872int cast_heal (object *op, object *caster, object *spell, int dir = 0)
1829 1873
1830object *cf_object_present_archname_inside (object *op, char *whatstr) 1874object *cf_object_present_archname_inside (object *op, char *whatstr)
1831 1875
1832int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0) 1876int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0)
1833 1877
2018 2062
2019int command_summon (object *op, char *params) 2063int command_summon (object *op, char *params)
2020 2064
2021int command_arrest (object *op, char *params) 2065int command_arrest (object *op, char *params)
2022 2066
2023int command_kick (object *op, char *params)
2024
2025int command_banish (object *op, char *params)
2026
2027 2067
2028MODULE = cf PACKAGE = cf::player PREFIX = cf_player_ 2068MODULE = cf PACKAGE = cf::player PREFIX = cf_player_
2029 2069
2030INCLUDE: $PERL genacc player ../include/player.h | 2070INCLUDE: $PERL $srcdir/genacc player ../include/player.h |
2031 2071
2032int invoke (player *pl, int event, ...) 2072int invoke (player *pl, int event, ...)
2033 CODE: 2073 CODE:
2034 if (KLASS_OF (event) != KLASS_PLAYER) croak ("event class must be PLAYER"); 2074 if (KLASS_OF (event) != KLASS_PLAYER) croak ("event class must be PLAYER");
2035 AV *av = (AV *)sv_2mortal ((SV *)newAV ()); 2075 AV *av = (AV *)sv_2mortal ((SV *)newAV ());
2048 pl->orig_stats = pl->ob->stats; 2088 pl->orig_stats = pl->ob->stats;
2049 2089
2050void cf_player_move (player *pl, int dir) 2090void cf_player_move (player *pl, int dir)
2051 2091
2052void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0); 2092void play_sound_player_only (player *pl, int soundnum, int x = 0, int y = 0);
2053
2054player *first ()
2055 CODE:
2056 RETVAL = first_player;
2057 OUTPUT: RETVAL
2058 2093
2059bool 2094bool
2060cell_visible (player *pl, int dx, int dy) 2095cell_visible (player *pl, int dx, int dy)
2061 CODE: 2096 CODE:
2062 RETVAL = FABS (dx) <= pl->ns->mapx / 2 && FABS (dy) <= pl->ns->mapy / 2 2097 RETVAL = FABS (dx) <= pl->ns->mapx / 2 && FABS (dy) <= pl->ns->mapy / 2
2115 RETVAL = map->invoke ((event_type)event, ARG_AV (av), DT_END); 2150 RETVAL = map->invoke ((event_type)event, ARG_AV (av), DT_END);
2116 OUTPUT: RETVAL 2151 OUTPUT: RETVAL
2117 2152
2118SV *registry (maptile *map) 2153SV *registry (maptile *map)
2119 2154
2120INCLUDE: $PERL genacc maptile ../include/map.h | 2155INCLUDE: $PERL $srcdir/genacc maptile ../include/map.h |
2121 2156
2122void 2157void
2123maptile::instantiate () 2158maptile::instantiate ()
2124 2159
2125maptile *new () 2160maptile *new ()
2139 EXTEND (SP, THIS->players); 2174 EXTEND (SP, THIS->players);
2140 for_all_players (pl) 2175 for_all_players (pl)
2141 if (pl->ob && pl->ob->map == THIS) 2176 if (pl->ob && pl->ob->map == THIS)
2142 PUSHs (sv_2mortal (to_sv (pl->ob))); 2177 PUSHs (sv_2mortal (to_sv (pl->ob)));
2143 } 2178 }
2179
2180void
2181maptile::add_underlay (SV *data, int offset, int stride, SV *palette)
2182 CODE:
2183{
2184 if (!SvROK (palette) || SvTYPE (SvRV (palette)) != SVt_PVAV)
2185 croak ("maptile::add_underlay: palette must be arrayref");
2186
2187 palette = SvRV (palette);
2188
2189 STRLEN idxlen;
2190 const uint8_t *idx = (const uint8_t *)SvPVbyte (data, idxlen);
2191
2192 for (int x = 0; x < THIS->width; ++x)
2193 for (int y = 0; y < THIS->height; ++y)
2194 {
2195 for (object *op = THIS->at (x, y).bot; op; op = op->above)
2196 if (op->flag [FLAG_IS_FLOOR])
2197 goto skip_space;
2198
2199 {
2200 int offs = offset + y * stride + x;
2201 if (IN_RANGE_EXC (offs, 0, idxlen))
2202 {
2203 if (SV **elem = av_fetch ((AV *)palette, idx [offs], 0))
2204 {
2205 object *ob = get_archetype (SvPVutf8_nolen (*elem));
2206 ob->flag [FLAG_NO_MAP_SAVE] = true;
2207 THIS->insert (ob, x, y, 0, INS_ABOVE_FLOOR_ONLY);
2208 }
2209 }
2210 }
2211
2212 skip_space: ;
2213 }
2214}
2215
2216void
2217maptile::set_regiondata (SV *data, int offset, int stride, SV *palette)
2218 CODE:
2219{
2220 if (!SvROK (palette) || SvTYPE (SvRV (palette)) != SVt_PVAV)
2221 croak ("maptile::set_regiondata: palette must be arrayref");
2222
2223 palette = SvRV (palette);
2224
2225 STRLEN idxlen;
2226 const uint8_t *idx = (const uint8_t *)SvPVbyte (data, idxlen);
2227
2228 region **regionmap = (region **)malloc (
2229 (av_len ((AV *)palette) + 1) * sizeof (region *));
2230 uint8_t *regions = salloc<uint8_t> (THIS->size ());
2231
2232 for (int i = av_len ((AV *)palette) + 1; i--; )
2233 regionmap [i] = region::find (
2234 SvPVutf8_nolen (*av_fetch ((AV *)palette, i, 1)));
2235
2236 for (int y = 0; y < THIS->height; ++y)
2237 memcpy (regions + y * THIS->width, idx + offset + y * stride, THIS->width);
2238
2239 sfree (THIS->regions, THIS->size ());
2240 free (THIS->regionmap);
2241
2242 THIS->regions = regions;
2243 THIS->regionmap = regionmap;
2244}
2144 2245
2145void play_sound_map (maptile *map, int x, int y, int sound_num) 2246void play_sound_map (maptile *map, int x, int y, int sound_num)
2146 2247
2147int out_of_map (maptile *map, int x, int y) 2248int out_of_map (maptile *map, int x, int y)
2148 2249
2229 OUTPUT: RETVAL 2330 OUTPUT: RETVAL
2230 2331
2231void fix_walls (maptile *map, int x, int y) 2332void fix_walls (maptile *map, int x, int y)
2232 2333
2233void fix_walls_around (maptile *map, int x, int y) 2334void fix_walls_around (maptile *map, int x, int y)
2234
2235const char *
2236region_name (maptile *m)
2237 CODE:
2238 RETVAL = get_name_of_region_for_map (m);
2239 OUTPUT: RETVAL
2240 2335
2241# worst xs function of my life 2336# worst xs function of my life
2242bool 2337bool
2243_create_random_map (\ 2338_create_random_map (\
2244 maptile *self,\ 2339 maptile *self,\
2338 PROTOTYPE: 2433 PROTOTYPE:
2339 CODE: 2434 CODE:
2340 RETVAL = first_archetype; 2435 RETVAL = first_archetype;
2341 OUTPUT: RETVAL 2436 OUTPUT: RETVAL
2342 2437
2343INCLUDE: $PERL genacc archetype ../include/object.h | 2438INCLUDE: $PERL $srcdir/genacc archetype ../include/object.h |
2344 2439
2345MODULE = cf PACKAGE = cf::party 2440MODULE = cf PACKAGE = cf::party
2346 2441
2347partylist *first () 2442partylist *first ()
2348 PROTOTYPE: 2443 PROTOTYPE:
2349 CODE: 2444 CODE:
2350 RETVAL = get_firstparty (); 2445 RETVAL = get_firstparty ();
2351 OUTPUT: RETVAL 2446 OUTPUT: RETVAL
2352 2447
2353INCLUDE: $PERL genacc partylist ../include/player.h | 2448INCLUDE: $PERL $srcdir/genacc partylist ../include/player.h |
2354 2449
2355MODULE = cf PACKAGE = cf::region 2450MODULE = cf PACKAGE = cf::region
2356 2451
2357region *first () 2452void
2358 PROTOTYPE: 2453list ()
2359 CODE: 2454 PPCODE:
2360 RETVAL = first_region; 2455 for_all_regions (rgn)
2361 OUTPUT: RETVAL 2456 XPUSHs (sv_2mortal (to_sv (rgn)));
2362 2457
2363region *find (char *name) 2458region *find (char *name)
2364 PROTOTYPE: $ 2459 PROTOTYPE: $
2365 CODE: 2460 CODE:
2366 RETVAL = get_region_by_name (name); 2461 RETVAL = region::find (name);
2367 OUTPUT: RETVAL 2462 OUTPUT: RETVAL
2368 2463
2464region *find_fuzzy (char *name)
2465 PROTOTYPE: $
2466 CODE:
2467 RETVAL = region::find_fuzzy (name);
2468 OUTPUT: RETVAL
2469
2369INCLUDE: $PERL genacc region ../include/map.h | 2470INCLUDE: $PERL $srcdir/genacc region ../include/map.h |
2370 2471
2371MODULE = cf PACKAGE = cf::living 2472MODULE = cf PACKAGE = cf::living
2372 2473
2373INCLUDE: $PERL genacc living ../include/living.h | 2474INCLUDE: $PERL $srcdir/genacc living ../include/living.h |
2374 2475
2375MODULE = cf PACKAGE = cf::settings 2476MODULE = cf PACKAGE = cf::settings
2376 2477
2377INCLUDE: $PERL genacc Settings ../include/global.h | 2478INCLUDE: $PERL $srcdir/genacc Settings ../include/global.h |
2378 2479
2379MODULE = cf PACKAGE = cf::client 2480MODULE = cf PACKAGE = cf::client
2380 2481
2381INCLUDE: $PERL genacc client ../include/client.h | 2482INCLUDE: $PERL $srcdir/genacc client ../include/client.h |
2382 2483
2383int invoke (client *ns, int event, ...) 2484int invoke (client *ns, int event, ...)
2384 CODE: 2485 CODE:
2385 if (KLASS_OF (event) != KLASS_CLIENT) croak ("event class must be CLIENT"); 2486 if (KLASS_OF (event) != KLASS_CLIENT) croak ("event class must be CLIENT");
2386 AV *av = (AV *)sv_2mortal ((SV *)newAV ()); 2487 AV *av = (AV *)sv_2mortal ((SV *)newAV ());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines