view libpurple/plugins/perl/libpurpleperl.c @ 24292:8282911d5e17

Build everything with the *_DISABLE_DEPRECATED flags set. This allows us to detect when we're still using deprecated functions internally (and by extension, when we've deprecated something we shouldn't have). In the course of developing this changeset, I fixed a few such cases. Given that the plan is to switch from PURPLE_HIDE_STRUCTS to PURPLE_DISABLE_DEPRECATED as each struct is fully dealt with, this will also ensure we have no regressions on the struct hiding work. Deprecated functions are still available to the respective .c file, to avoid missing prototype errors. Also, Perl and DBus undef the *_DISABLE_DEPRECATED defines as appropriate so that deprecated functions will still be exported to Perl plugins and via DBus. (Otherwise, we'd be breaking backwards compatibility.)
author Richard Laager <rlaager@wiktel.com>
date Thu, 30 Oct 2008 22:40:49 +0000
parents c6e563dfaa7a
children
line wrap: on
line source

#include <gmodule.h>

#ifdef  __SUNPRO_C
#pragma init (my_init)
void my_init(void);

void my_init() {
#else
void __attribute__ ((constructor)) my_init(void);

void __attribute__ ((constructor)) my_init() {
#endif

	/* Very evil hack...puts perl.so's symbols in the global table
	 * but does not create a circular dependancy because g_module_open
	 * will only open the library once. */
	g_module_open("perl.so", 0);
}