Sun, 24 Aug 2003 20:28:34 +0000
[gaim-migrate @ 7138]
Not sure why this compiled, but it's fixed now.
| 6508 | 1 | #ifndef _GAIM_PERL_COMMON_H_ |
| 2 | #define _GAIM_PERL_COMMON_H_ | |
| 3 | ||
|
6520
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
4 | #include <XSUB.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
5 | #include <EXTERN.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
6 | #include <perl.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
7 | #include <glib.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
8 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
9 | #include "value.h" |
|
61eb35202526
[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
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
23 | SV *newSVGChar(const char *str); |
|
61eb35202526
[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
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
31 | int execute_perl(const char *function, int argc, char **args); |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
32 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
33 | #if 0 |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
34 | gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
35 | SV *gaim_perl_sv_from_value(const GaimValue *value); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
36 | #endif |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
37 | |
|
61eb35202526
[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); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
39 | |
| 6508 | 40 | #endif /* _GAIM_PERL_COMMON_H_ */ |