Mercurial > pidgin.yaz
annotate plugins/perl/perl-common.h @ 6531:7c42b8ca3222
[gaim-migrate @ 7048]
Added a buddy list API to perl. Untested. Should work, which is why it
won't.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 21 Aug 2003 00:06:15 +0000 |
parents | 2e2593d95121 |
children | f6c2a7b5afa7 |
rev | line source |
---|---|
6508 | 1 #ifndef _GAIM_PERL_COMMON_H_ |
2 #define _GAIM_PERL_COMMON_H_ | |
3 | |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
4 #include <XSUB.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
5 #include <EXTERN.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
6 #include <perl.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
7 #include <glib.h> |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
8 |
6508 | 9 #define is_hvref(o) \ |
10 ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
11 | |
12 #define hvref(o) \ | |
13 (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
14 | |
15 #define GAIM_PERL_BOOT(x) \ | |
16 { \ | |
17 extern void boot_Gaim__##x(pTHX_ CV *cv); \ | |
18 gaim_perl_callXS(boot_Gaim__##x, cv, mark); \ | |
19 } | |
20 | |
21 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); | |
22 void gaim_perl_bless_plain(const char *stash, void *object); | |
23 SV *gaim_perl_bless_object(void *object, const char *stash); | |
24 gboolean gaim_perl_is_ref_object(SV *o); | |
25 void *gaim_perl_ref_object(SV *o); | |
26 | |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
27 int execute_perl(const char *function, int argc, char **args); |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
28 |
6508 | 29 #endif /* _GAIM_PERL_COMMON_H_ */ |