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.328 by root, Tue Nov 3 22:57:06 2009 UTC vs.
Revision 1.332 by root, Fri Nov 6 13:21:20 2009 UTC

388 388
389 return sv; 389 return sv;
390 } 390 }
391} 391}
392 392
393#if 0 // unused
393static void 394static void
394clearSVptr (SV *sv) 395clearSVptr (SV *sv)
395{ 396{
396 if (SvROK (sv)) 397 if (SvROK (sv))
397 sv = SvRV (sv); 398 sv = SvRV (sv);
398 399
399 hv_clear ((HV *)sv); 400 hv_clear ((HV *)sv);
400 sv_unmagic (sv, PERL_MAGIC_ext); 401 sv_unmagic (sv, PERL_MAGIC_ext);
401} 402}
403#endif
402 404
403static long 405static long
404SvPTR (SV *sv, const char *klass) 406SvPTR (SV *sv, const char *klass)
405{ 407{
406 if (!sv_derived_from (sv, klass)) 408 if (!sv_derived_from (sv, klass))
1220 bool matched = count && SvTRUE (TOPs); 1222 bool matched = count && SvTRUE (TOPs);
1221 1223
1222 CALL_END; 1224 CALL_END;
1223 1225
1224 return matched; 1226 return matched;
1227}
1228
1229object *
1230match_one (const char *expr, object *ob, object *self, object *source, object *originator)
1231{
1232 if (!strncmp (expr, "match ", sizeof ("match ") - 1))
1233 expr += sizeof ("match ") - 1;
1234
1235 CALL_BEGIN (5);
1236 CALL_ARG (expr);
1237 CALL_ARG (ob);
1238 CALL_ARG (self);
1239 CALL_ARG (source);
1240 CALL_ARG (originator);
1241 CALL_CALL (cv_cf_match_match, G_ARRAY);
1242
1243 object *one = 0;
1244
1245 if (count)
1246 sv_to (TOPs, one);
1247
1248 CALL_END;
1249
1250 return one;
1225} 1251}
1226 1252
1227///////////////////////////////////////////////////////////////////////////// 1253/////////////////////////////////////////////////////////////////////////////
1228 1254
1229struct EVAPI *evapi::GEVAPI; 1255struct EVAPI *evapi::GEVAPI;
2140 CODE: 2166 CODE:
2141 player_apply_below (op); 2167 player_apply_below (op);
2142 2168
2143int cast_heal (object *op, object *caster, object *spell, int dir = 0) 2169int cast_heal (object *op, object *caster, object *spell, int dir = 0)
2144 2170
2171int casting_level (object *caster, object *spell)
2172
2145int pay_item (object *op, object *buyer) 2173int pay_item (object *op, object *buyer)
2146 CODE: 2174 CODE:
2147 RETVAL = pay_for_item (op, buyer); 2175 RETVAL = pay_for_item (op, buyer);
2148 OUTPUT: RETVAL 2176 OUTPUT: RETVAL
2149 2177
2222object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) 2250object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y)
2223 PROTOTYPE: $$$$$$ 2251 PROTOTYPE: $$$$$$
2224 CODE: 2252 CODE:
2225{ 2253{
2226 RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y); 2254 RETVAL = insert_ob_in_map_at (ob, where, orig, flag, x, y);
2255
2256 if (RETVAL->destroyed ())
2257 RETVAL = 0;
2227} 2258}
2228 2259
2229shstr 2260shstr
2230object::kv_get (shstr key) 2261object::kv_get (shstr key)
2231 2262

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines