Mercurial > pidgin.yaz
comparison plugins/perl/perl-common.h @ 6508:cbd24b37350d
[gaim-migrate @ 7025]
Okay, ready for some breakage again? I rewrote the perl loader plugin. All
old scripts are broken, but the new API will be much better. Currently, you
can access accounts and do debug output, and that's it, but adding support
for new things is much easier. Please don't come after me with pitchforks.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 19 Aug 2003 21:47:36 +0000 |
parents | |
children | 2e2593d95121 |
comparison
equal
deleted
inserted
replaced
6507:c8e31153eea7 | 6508:cbd24b37350d |
---|---|
1 #ifndef _GAIM_PERL_COMMON_H_ | |
2 #define _GAIM_PERL_COMMON_H_ | |
3 | |
4 //#define plain_bless(object, stash) \ | |
5 // sv_bless(sv_setref_pv(newRV((object)))) | |
6 | |
7 //#define plain_bless(object, stash) \ | |
8 // ((object) == NULL ? &PL_sv_undef : \ | |
9 // gaim_perl_bless_plain((stash), (object))) | |
10 | |
11 #define is_hvref(o) \ | |
12 ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
13 | |
14 #define hvref(o) \ | |
15 (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
16 | |
17 #define GAIM_PERL_BOOT(x) \ | |
18 { \ | |
19 extern void boot_Gaim__##x(pTHX_ CV *cv); \ | |
20 gaim_perl_callXS(boot_Gaim__##x, cv, mark); \ | |
21 } | |
22 | |
23 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); | |
24 void gaim_perl_bless_plain(const char *stash, void *object); | |
25 SV *gaim_perl_bless_object(void *object, const char *stash); | |
26 gboolean gaim_perl_is_ref_object(SV *o); | |
27 void *gaim_perl_ref_object(SV *o); | |
28 | |
29 #endif /* _GAIM_PERL_COMMON_H_ */ |