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

Comparing deliantra/server/include/cfperl.h (file contents):
Revision 1.94 by root, Wed Apr 2 11:13:54 2008 UTC vs.
Revision 1.95 by root, Fri Apr 11 13:59:06 2008 UTC

79 79
80// some macros to simplify perl in-calls 80// some macros to simplify perl in-calls
81 81
82#define CHECK_ERROR \ 82#define CHECK_ERROR \
83 if (SvTRUE (ERRSV)) \ 83 if (SvTRUE (ERRSV)) \
84 LOG (llevError, "runtime error in %s: %s\n", __func__, SvPVutf8_nolen (ERRSV)); 84 LOG (llevError, "runtime error in %s: %s", __func__, SvPVutf8_nolen (ERRSV));
85 85
86#define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args) 86#define CALL_BEGIN(args) dSP; ENTER; SAVETMPS; PUSHMARK (SP); EXTEND (SP, args)
87#define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc 87#define CALL_ARG_SV(sv) PUSHs (sv_2mortal (sv)) // separate because no refcount inc
88#define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr))) 88#define CALL_ARG(expr) PUSHs (sv_2mortal (to_sv (expr)))
89#define CALL_CALL(name, flags) PUTBACK; int count = call_pv (name, (flags) | G_EVAL); SPAGAIN; 89#define CALL_CALL(name, flags) PUTBACK; int count = call_pv (name, (flags) | G_EVAL); SPAGAIN;
99void cfperl_make_book (object *book, int level); 99void cfperl_make_book (object *book, int level);
100void cfperl_send_msg (client *ns, int color, const char *type, const char *msg); 100void cfperl_send_msg (client *ns, int color, const char *type, const char *msg);
101int cfperl_can_merge (object *ob1, object *ob2); 101int cfperl_can_merge (object *ob1, object *ob2);
102 102
103////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 103//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
104
105#if IVSIZE >= 8
106 typedef IV val64;
107 typedef IV uval64;
108# define newSVval64 newSViv
109# define SvVAL64 SvIV
110# define newSVuval64 newSVuv
111# define SvUVAL64 SvUV
112#else
113 typedef double val64;
114# define newSVval64 newSVnv
115# define SvVAL64 SvNV
116# define newSVuval64 newSVnv
117# define SvUVAL64 SvNV
118#endif
104 119
105extern tstamp runtime; // virtual server time, excluding time jumps and lag 120extern tstamp runtime; // virtual server time, excluding time jumps and lag
106extern tstamp NOW; // real time of current server tick 121extern tstamp NOW; // real time of current server tick
107 122
108enum event_klass 123enum event_klass

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines