Tue, 06 May 2014 13:52:59 +0200
Backport warning fixes for perl from default
| 15884 | 1 | #ifndef _PURPLE_PERL_COMMON_H_ |
| 2 | #define _PURPLE_PERL_COMMON_H_ | |
| 6508 | 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 |
|
29792
ad7890a74433
Some undefs to make building with mingw-64 more pleasant
Daniel Atallah <datallah@pidgin.im>
parents:
29340
diff
changeset
|
6 | #undef STRINGIFY |
|
6816
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
7 | #undef pipe |
|
b14a3043ed09
[gaim-migrate @ 7356]
Herman Bloggs <herman@bluedigits.com>
parents:
6566
diff
changeset
|
8 | #endif |
|
35981
e8c02ea0800b
Backport warning fixes for perl from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
29809
diff
changeset
|
9 | |
|
e8c02ea0800b
Backport warning fixes for perl from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
29809
diff
changeset
|
10 | #define SILENT_NO_TAINT_SUPPORT 0 |
|
e8c02ea0800b
Backport warning fixes for perl from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
29809
diff
changeset
|
11 | #define NO_TAINT_SUPPORT 0 |
|
e8c02ea0800b
Backport warning fixes for perl from default
Tomasz Wasilczyk <twasilczyk@pidgin.im>
parents:
29809
diff
changeset
|
12 | |
|
23916
76b2c63d074c
EXTERN.h should be included before perl.h
Daniel Atallah <datallah@pidgin.im>
parents:
23915
diff
changeset
|
13 | #include <EXTERN.h> |
|
23915
b62601fd6e7d
Update the Perl plugin loader to work with Perl 5.10.
Daniel Atallah <datallah@pidgin.im>
parents:
22839
diff
changeset
|
14 | #include <perl.h> |
|
6520
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
15 | #include <XSUB.h> |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
16 | |
|
18273
e61c53184c52
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
17 | /* XXX: perl defines it's own _ but I think it's safe to undef it */ |
|
e61c53184c52
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
18 | #undef _ |
|
18633
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
19 | /* Dirty hack to prevent the win32 libc compat stuff from interfering with the Perl internal stuff */ |
|
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
20 | #ifdef _WIN32 |
|
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
21 | #define _WIN32DEP_H_ |
|
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
22 | #endif |
|
18273
e61c53184c52
#include reorganizations to allow compiling with glib < 2.8 using the
Stu Tomlinson <nosnilmot@pidgin.im>
parents:
15884
diff
changeset
|
23 | #include "internal.h" |
|
18633
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
24 | #ifdef _WIN32 |
|
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
25 | #undef _WIN32DEP_H_ |
|
34ba43198355
Fix the win32 build. Thanks to Etan and Lee Roach. Fixes #1929.
Daniel Atallah <datallah@pidgin.im>
parents:
18273
diff
changeset
|
26 | #endif |
| 12872 | 27 | #include "plugin.h" |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
28 | #include "value.h" |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
29 | |
| 6508 | 30 | #define is_hvref(o) \ |
| 31 | ((o) && SvROK(o) && SvRV(o) && (SvTYPE(SvRV(o)) == SVt_PVHV)) | |
| 32 | ||
| 33 | #define hvref(o) \ | |
| 34 | (is_hvref(o) ? (HV *)SvRV(o) : NULL); | |
| 35 | ||
| 15884 | 36 | #define PURPLE_PERL_BOOT_PROTO(x) \ |
| 37 | void boot_Purple__##x(pTHX_ CV *cv); | |
|
12419
745d9e5460ea
[gaim-migrate @ 14726]
Richard Laager <rlaager@pidgin.im>
parents:
11170
diff
changeset
|
38 | |
| 15884 | 39 | #define PURPLE_PERL_BOOT(x) \ |
| 40 | purple_perl_callXS(boot_Purple__##x, cv, mark) | |
| 6508 | 41 | |
| 12872 | 42 | typedef struct |
| 43 | { | |
| 15884 | 44 | PurplePlugin *plugin; |
| 12872 | 45 | char *package; |
| 46 | char *load_sub; | |
| 47 | char *unload_sub; | |
| 48 | char *prefs_sub; | |
| 15884 | 49 | #ifdef PURPLE_GTKPERL |
| 12872 | 50 | char *gtk_prefs_sub; |
|
14426
8d4f164c4979
[gaim-migrate @ 17070]
Daniel Atallah <datallah@pidgin.im>
parents:
14254
diff
changeset
|
51 | #endif |
| 12988 | 52 | char *plugin_action_sub; |
| 15884 | 53 | } PurplePerlScript; |
| 12872 | 54 | |
| 15884 | 55 | void purple_perl_normalize_script_name(char *name); |
| 11170 | 56 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
57 | SV *newSVGChar(const char *str); |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
58 | |
| 15884 | 59 | void purple_perl_callXS(void (*subaddr)(pTHX_ CV *cv), CV *cv, SV **mark); |
| 60 | void purple_perl_bless_plain(const char *stash, void *object); | |
| 61 | SV *purple_perl_bless_object(void *object, const char *stash); | |
| 62 | gboolean purple_perl_is_ref_object(SV *o); | |
| 63 | void *purple_perl_ref_object(SV *o); | |
| 6508 | 64 | |
|
6520
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
65 | int execute_perl(const char *function, int argc, char **args); |
|
5386692555c9
[gaim-migrate @ 7037]
Christian Hammond <chipx86@chipx86.com>
parents:
6508
diff
changeset
|
66 | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
67 | #if 0 |
| 15884 | 68 | gboolean purple_perl_value_from_sv(PurpleValue *value, SV *sv); |
| 69 | SV *purple_perl_sv_from_value(const PurpleValue *value); | |
|
6566
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
70 | #endif |
|
61eb35202526
[gaim-migrate @ 7088]
Christian Hammond <chipx86@chipx86.com>
parents:
6531
diff
changeset
|
71 | |
| 15884 | 72 | void *purple_perl_data_from_sv(PurpleValue *value, SV *sv); |
|
29341
8df545432476
disapproval of revision '1073f46cfe21069efa8e3be8f158fc2f841240cd'
Mark Doliner <markdoliner@pidgin.im>
parents:
29340
diff
changeset
|
73 | SV *purple_perl_sv_from_vargs(const PurpleValue *value, va_list *args, |
| 12871 | 74 | void ***copy_arg); |
|
22839
3ee4247ebbbd
Use the same fix for Purple::Util::fetch_url (from 4b6378d5e) for
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18633
diff
changeset
|
75 | SV *purple_perl_sv_from_fun(PurplePlugin *plugin, SV *callback); |
| 15884 | 76 | #endif /* _PURPLE_PERL_COMMON_H_ */ |