comparison plugins/perl/common/Gaim.xs @ 6588:7f5f57dd5cac

[gaim-migrate @ 7110] I'm breaking debug. I cannot for the life of me figure out the enum stuff in perl XSUB. Everything is ending up 0 (in other words, it's probably not finding them). So, people can use debug_info and such. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 24 Aug 2003 01:08:32 +0000
parents 6deef41364bd
children d25ae4b5a204
comparison
equal deleted inserted replaced
6587:ed11e3f8ba21 6588:7f5f57dd5cac
1 #include "module.h" 1 #include "module.h"
2 #include "../perl-handlers.h" 2 #include "../perl-handlers.h"
3 3
4 MODULE = Gaim PACKAGE = Gaim 4 #include "const-c.inc"
5
6 MODULE = Gaim PACKAGE = Gaim PREFIX = gaim_
5 PROTOTYPES: ENABLE 7 PROTOTYPES: ENABLE
8
9 INCLUDE: const-xs.inc
6 10
7 void 11 void
8 timeout_add(plugin, seconds, callback, data) 12 timeout_add(plugin, seconds, callback, data)
9 Gaim::Plugin plugin 13 Gaim::Plugin plugin
10 int seconds 14 int seconds
30 Gaim::Plugin plugin 34 Gaim::Plugin plugin
31 CODE: 35 CODE:
32 gaim_perl_signal_disconnect(plugin, instance, signal); 36 gaim_perl_signal_disconnect(plugin, instance, signal);
33 37
34 void 38 void
35 debug(level, category, string) 39 gaim_debug(level, category, string)
36 const char *level 40 Gaim::DebugLevel level
37 const char *category 41 const char *category
38 const char *string 42 const char *string
39 CODE:
40 if (!strcmp(level, "misc"))
41 gaim_debug(GAIM_DEBUG_MISC, category, string);
42 else if (!strcmp(level, "info"))
43 gaim_debug(GAIM_DEBUG_INFO, category, string);
44 else if (!strcmp(level, "warning"))
45 gaim_debug(GAIM_DEBUG_WARNING, category, string);
46 else if (!strcmp(level, "error"))
47 gaim_debug(GAIM_DEBUG_ERROR, category, string);
48 else if (!strcmp(level, "fatal"))
49 gaim_debug(GAIM_DEBUG_FATAL, category, string);
50 else
51 croak("Unknown debug level type '%s'", level);
52 43
53 void 44 void
54 debug_misc(category, string) 45 debug_misc(category, string)
55 const char *category 46 const char *category
56 const char *string 47 const char *string