plugins/perl/libgaimperl.c

Sun, 22 Jan 2006 10:29:34 +0000

author
Etan Reisner <deryni@pidgin.im>
date
Sun, 22 Jan 2006 10:29:34 +0000
changeset 12988
2a53945982f5
parent 12418
77abb6df8ee6
permissions
-rw-r--r--

[gaim-migrate @ 15341]
Perl plugins can now have more than one plugin action. This isn't exactly the
nicest way to have done this, as it requires a "global" plugin_actions hash to
work, but I couldn't get the cleaner way to work and this is better than
nothing.

11862
5d4bc6d54688 [gaim-migrate @ 14153]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 11120
diff changeset
1 #include <gmodule.h>
12418
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
2 void __attribute__ ((constructor)) my_init(void);
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
3
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
4 void __attribute__ ((constructor)) my_init() {
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
5 /* Very evil hack...puts perl.so's symbols in the global table
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
6 * but does not create a circular dependancy because g_module_open
77abb6df8ee6 [gaim-migrate @ 14725]
Richard Laager <rlaager@pidgin.im>
parents: 11862
diff changeset
7 * will only open the library once. */
11120
beeb901ca8a9 [gaim-migrate @ 13176]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
8 g_module_open("perl.so", 0);
beeb901ca8a9 [gaim-migrate @ 13176]
John H. Kelm <johnkelm@gmail.com>
parents:
diff changeset
9 }

mercurial