libpurple/plugins/perl/libgaimperl.c

changeset 15611
5cb407a7d44a
parent 15435
4b933b06d75e
equal deleted inserted replaced
15608:16f8c5f4c7e5 15611:5cb407a7d44a
1 #include <gmodule.h> 1 #include <gmodule.h>
2
3 #ifdef __SUNPRO_C
4 #pragma init (my_init)
5 void my_init(void);
6
7 void my_init() {
8 #else
2 void __attribute__ ((constructor)) my_init(void); 9 void __attribute__ ((constructor)) my_init(void);
3 10
4 void __attribute__ ((constructor)) my_init() { 11 void __attribute__ ((constructor)) my_init() {
12 #endif
13
5 /* Very evil hack...puts perl.so's symbols in the global table 14 /* Very evil hack...puts perl.so's symbols in the global table
6 * but does not create a circular dependancy because g_module_open 15 * but does not create a circular dependancy because g_module_open
7 * will only open the library once. */ 16 * will only open the library once. */
8 g_module_open("perl.so", 0); 17 g_module_open("perl.so", 0);
9 } 18 }

mercurial