comparison src/plugin.c @ 13106:a0a4b44239e8

[gaim-migrate @ 15468] I was reading the gettext man page and it pointed out that it should be typed as const char *, but it's char * to avoid warnings in code predating ANSI C. So, for the heck of it, I changed added a cast in internal.h. As it turns out, there was a lot of code that relied on this. In the interest of type safety, I've fixed all the warnings. I feel this improved a number of function signatures (in terms of typing clarity). Flame me if you object. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 02 Feb 2006 21:34:43 +0000
parents 9d8025ec5e23
children 7fd39c81d5e9
comparison
equal deleted inserted replaced
13105:e347b2217b1b 13106:a0a4b44239e8
1543 return plugins; 1543 return plugins;
1544 } 1544 }
1545 1545
1546 1546
1547 GaimPluginAction * 1547 GaimPluginAction *
1548 gaim_plugin_action_new(char* label, void (*callback)(GaimPluginAction *)) 1548 gaim_plugin_action_new(const char* label, void (*callback)(GaimPluginAction *))
1549 { 1549 {
1550 GaimPluginAction *act = g_new0(GaimPluginAction, 1); 1550 GaimPluginAction *act = g_new0(GaimPluginAction, 1);
1551 1551
1552 act->label = label; 1552 act->label = g_strdup(label);
1553 act->callback = callback; 1553 act->callback = callback;
1554 1554
1555 return act; 1555 return act;
1556 } 1556 }
1557
1558 void
1559 gaim_plugin_action_free(GaimPluginAction *action)
1560 {
1561 g_return_if_fail(action != NULL);
1562
1563 g_free(action->label);
1564 g_free(action);
1565 }