mirror of
https://github.com/irssi/irssi.git
synced 2026-08-19 16:42:30 +02:00
Added API version check between perl module and perl libs.
perl_scripts_deinit() now destroys all dynamically loaded libraries (Irssi, Irssi::Irc, Irssi::UI too) so /UNLOAD perl should now release more memory, this also makes /unload perl, /load perl work again. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1859 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
476b5ec863
commit
a5b32b70a7
12 changed files with 81 additions and 6 deletions
|
|
@ -32,6 +32,26 @@ PERL_SCRIPT_REC *perl_script_find_package(const char *package);
|
|||
/* Returns full path for the script */
|
||||
char *perl_script_get_path(const char *name);
|
||||
|
||||
/* If core should handle printing script errors */
|
||||
void perl_core_print_script_error(int print);
|
||||
|
||||
/* Returns the perl module's API version. */
|
||||
int perl_get_api_version(void);
|
||||
|
||||
/* Checks that the API version is correct. */
|
||||
#define perl_api_version_check(library) \
|
||||
if (perl_get_api_version() != IRSSI_PERL_API_VERSION) { \
|
||||
char *str; \
|
||||
str = g_strdup_printf("Version of perl module (%d) " \
|
||||
"doesn't match the version of " \
|
||||
library" library (%d)", \
|
||||
perl_get_api_version(), \
|
||||
IRSSI_PERL_API_VERSION); \
|
||||
signal_emit("gui dialog", 2, "error", str); \
|
||||
g_free(str); \
|
||||
return; \
|
||||
}
|
||||
|
||||
void perl_core_init(void);
|
||||
void perl_core_deinit(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue