Mercurial > pidgin.yaz
comparison libpurple/plugins/perl/common/Debug.xs @ 16750:39c7bb133a9f
Remove the const-c and const-xs stuff and replace it with real constants
exposed to perl.
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 01 May 2007 02:34:22 +0000 |
parents | 2f8274ce570a |
children |
comparison
equal
deleted
inserted
replaced
16709:79bc35a19de5 | 16750:39c7bb133a9f |
---|---|
1 #include "module.h" | 1 #include "module.h" |
2 | 2 |
3 MODULE = Purple::Debug PACKAGE = Purple::Debug PREFIX = purple_debug_ | 3 MODULE = Purple::Debug PACKAGE = Purple::Debug PREFIX = purple_debug_ |
4 PROTOTYPES: ENABLE | 4 PROTOTYPES: ENABLE |
5 | |
6 BOOT: | |
7 { | |
8 HV *stash = gv_stashpv("Purple::Debug", 1); | |
9 | |
10 static const constiv *civ, const_iv[] = { | |
11 #define const_iv(name) {#name, (IV)PURPLE_DEBUG_##name} | |
12 const_iv(ALL), | |
13 const_iv(MISC), | |
14 const_iv(INFO), | |
15 const_iv(WARNING), | |
16 const_iv(ERROR), | |
17 const_iv(FATAL), | |
18 }; | |
19 | |
20 for (civ = const_iv + sizeof(const_iv) / sizeof(const_iv[0]); civ-- > const_iv; ) | |
21 newCONSTSUB(stash, (char *)civ->name, newSViv(civ->iv)); | |
22 } | |
5 | 23 |
6 void | 24 void |
7 purple_debug(level, category, string) | 25 purple_debug(level, category, string) |
8 Purple::DebugLevel level | 26 Purple::DebugLevel level |
9 const char *category | 27 const char *category |