Wed, 11 Jan 2006 04:32:12 +0000
[gaim-migrate @ 15164]
Get rid of a compile warning by changing the definition of
(*GaimPrefCallback) to pass a gconstpointer val instead of
gpointer
| 6508 | 1 | #ifndef _GAIM_PERL_COMMON_H_ |
| 2 | #define _GAIM_PERL_COMMON_H_ | |
| 3 | ||
|
6816
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
4 | #include <glib.h> |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
5 | #ifdef _WIN32 |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
6 | #undef pipe |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
7 | #endif |
|
6520
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
8 | #include <XSUB.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
9 | #include <EXTERN.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
10 | #include <perl.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
11 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
12 | #include "value.h" |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
13 | |
| 6508 | 14 | #define is_hvref(o) \ |
| 15 | ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
| 16 | ||
| 17 | #define hvref(o) \ | |
| 18 | (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
| 19 | ||
|
12419
745d9e5460ea
[gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents:
11170
diff
changeset
|
20 | #define GAIM_PERL_BOOT_PROTO(x) \ |
|
12497
a17568773be3
[gaim-migrate @ 14809]
Richard Laager <rlaager@pidgin.im>
parents:
12419
diff
changeset
|
21 | void boot_Gaim__##x(pTHX_ CV *cv); |
|
12419
745d9e5460ea
[gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents:
11170
diff
changeset
|
22 | |
| 6508 | 23 | #define GAIM_PERL_BOOT(x) \ |
|
12419
745d9e5460ea
[gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents:
11170
diff
changeset
|
24 | gaim_perl_callXS(boot_Gaim__##x, cv, mark) |
| 6508 | 25 | |
| 11170 | 26 | void gaim_perl_normalize_script_name(char *name); |
| 27 | ||
| 28 | ||
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
29 | SV *newSVGChar(const char *str); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
30 | |
| 6508 | 31 | void gaim_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); |
| 32 | void gaim_perl_bless_plain(const char *stash, void *object); | |
| 33 | SV *gaim_perl_bless_object(void *object, const char *stash); | |
| 34 | gboolean gaim_perl_is_ref_object(SV *o); | |
| 35 | void *gaim_perl_ref_object(SV *o); | |
| 36 | ||
|
6520
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
37 | int execute_perl(const char *function, int argc, char **args); |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
38 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
39 | #if 0 |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
40 | gboolean gaim_perl_value_from_sv(GaimValue *value, SV *sv); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
41 | SV *gaim_perl_sv_from_value(const GaimValue *value); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
42 | #endif |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
43 | |
|
6920
4f4931b005cb
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
44 | void *gaim_perl_data_from_sv(GaimValue *value, SV *sv); |
|
4f4931b005cb
[gaim-migrate @ 7467]
Christian Hammond <chipx86@chipx86.com>
parents:
6816
diff
changeset
|
45 | SV *gaim_perl_sv_from_vargs(const GaimValue *value, va_list *args, |
|
6921
3d49b89fc920
[gaim-migrate @ 7468]
Christian Hammond <chipx86@chipx86.com>
parents:
6920
diff
changeset
|
46 | void ***copy_arg); |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
47 | |
| 6508 | 48 | #endif /* _GAIM_PERL_COMMON_H_ */ |