Mercurial > pidgin
annotate plugins/perl/perl-common.h @ 6805:4fc650abb2dd
[gaim-migrate @ 7345]
some updates
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Wed, 10 Sep 2003 15:39:00 +0000 |
parents | f6c2a7b5afa7 |
children | 5aeba37b303c |
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 |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
9 #include "value.h" |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
10 |
6508 | 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 | |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
23 SV *newSVGChar(const char *str); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
24 |
6508 | 25 void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); |
26 void gaim_perl_bless_plain(const char *stash, void *object); | |
27 SV *gaim_perl_bless_object(void *object, const char *stash); | |
28 gboolean gaim_perl_is_ref_object(SV *o); | |
29 void *gaim_perl_ref_object(SV *o); | |
30 | |
6520
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
31 int execute_perl(const char *function, int argc, char **args); |
2e2593d95121
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
32 |
6566
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
33 #if 0 |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
34 gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
35 SV *gaim_perl_sv_from_value(const GaimValue *value); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
36 #endif |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
37 |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
38 SV *gaim_perl_sv_from_vargs(const GaimValue *value, va_list args); |
f6c2a7b5afa7
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
39 |
6508 | 40 #endif /* _GAIM_PERL_COMMON_H_ */ |