diff 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
line wrap: on
line diff
--- a/plugins/perl/common/Gaim.xs	Sat Aug 23 23:09:14 2003 +0000
+++ b/plugins/perl/common/Gaim.xs	Sun Aug 24 01:08:32 2003 +0000
@@ -1,9 +1,13 @@
 #include "module.h"
 #include "../perl-handlers.h"
 
-MODULE = Gaim  PACKAGE = Gaim
+#include "const-c.inc"
+
+MODULE = Gaim  PACKAGE = Gaim  PREFIX = gaim_
 PROTOTYPES: ENABLE
 
+INCLUDE: const-xs.inc
+
 void
 timeout_add(plugin, seconds, callback, data)
 	Gaim::Plugin plugin
@@ -32,23 +36,10 @@
 	gaim_perl_signal_disconnect(plugin, instance, signal);
 
 void
-debug(level, category, string)
-	const char *level
+gaim_debug(level, category, string)
+	Gaim::DebugLevel level
 	const char *category
 	const char *string
-CODE:
-	if (!strcmp(level, "misc"))
-		gaim_debug(GAIM_DEBUG_MISC, category, string);
-	else if (!strcmp(level, "info"))
-		gaim_debug(GAIM_DEBUG_INFO, category, string);
-	else if (!strcmp(level, "warning"))
-		gaim_debug(GAIM_DEBUG_WARNING, category, string);
-	else if (!strcmp(level, "error"))
-		gaim_debug(GAIM_DEBUG_ERROR, category, string);
-	else if (!strcmp(level, "fatal"))
-		gaim_debug(GAIM_DEBUG_FATAL, category, string);
-	else
-		croak("Unknown debug level type '%s'", level);
 
 void
 debug_misc(category, string)