changeset 28:73e817be3267 0.5.1

- Fixed a crash bug. Each unload/reload cycle caused crash due to unrefed regp. - Revised README.
author Yoshiki Yazawa <yaz@cc.rim.or.jp>
date Mon, 05 May 2008 23:32:20 +0900
parents e7f18dc50170
children ea1aef67c97d
files README pidgin-twitter.c
diffstat 2 files changed, 26 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/README	Mon May 05 21:00:11 2008 +0900
+++ b/README	Mon May 05 23:32:20 2008 +0900
@@ -1,4 +1,4 @@
-pidgin-twitter-0.5.0
+pidgin-twitter-0.5.1
 
 
 1. What is this?
@@ -60,7 +60,20 @@
 recommend you to leave it always enabled.
 
 
-5. Acknowledgment
+5. Histroy
+
+0.4.0 (May 01 2008)
+First public release.
+
+0.5.0 (May 05 2008)
+Added escape pseudo command functionality.
+
+0.5.1 (May 05 2008)
+Fixed a crash bug that each unload and reload pidgin-twitter cycle
+resulted in crash.
+
+
+6. Acknowledgment
 
 I got some valuable feedbacks from nosuke (@konosuke) and mojin
 (@mojin).
--- a/pidgin-twitter.c	Mon May 05 21:00:11 2008 +0900
+++ b/pidgin-twitter.c	Mon May 05 23:32:20 2008 +0900
@@ -247,6 +247,16 @@
     purple_signal_connect(purple_conversations_get_handle(), "sending-im-msg",
                           plugin, PURPLE_CALLBACK(sending_im_cb), NULL);
 
+    /* compile regex */
+    regp[RECIPIENT] = g_regex_new("@([A-Za-z0-9_]+)", 0, 0, NULL);
+    regp[SENDER]    = g_regex_new("<body>([A-Za-z0-9_]+): ", 0, 0, NULL);
+    regp[COMMAND]   = g_regex_new(
+        "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+\\Z)",
+        G_REGEX_RAW, 0, NULL);
+    regp[PSEUDO]    = g_regex_new(
+        "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)",
+        G_REGEX_RAW, 0, NULL);
+
     return TRUE;
 }
 
@@ -372,7 +382,7 @@
     PURPLE_PRIORITY_DEFAULT,    /**< priority	*/
     PIDGINTWITTER_PLUGIN_ID,    /**< id		*/
     "Pidgin-Twitter",           /**< name	*/
-    "0.5.0",                    /**< version	*/
+    "0.5.1",                    /**< version	*/
     "replaces @username to a link and play sound", /**  summary	*/
     "replaces @username in a link and play sound", /**  desc	*/
     "Yoshiki Yazawa (yaz@honeyplanet.jp)",     /**< author	*/
@@ -403,18 +413,6 @@
     purple_prefs_add_string(OPT_USERLIST_RECIPIENT, DEFAULT_LIST);
     purple_prefs_add_int(OPT_SOUNDID_SENDER, PURPLE_SOUND_POUNCE_DEFAULT);
     purple_prefs_add_string(OPT_USERLIST_SENDER, DEFAULT_LIST);
-
-    /* compile regex */
-    regp[RECIPIENT] = g_regex_new("@([A-Za-z0-9_]+)", 0, 0, NULL);
-    regp[SENDER]    = g_regex_new("<body>([A-Za-z0-9_]+): ", 0, 0, NULL);
-
-    regp[COMMAND]   = g_regex_new(
-        "^(?:\\s*)([dDfFgGlLmMnNtTwW]{1}\\s+[A-Za-z0-9_]+\\Z)",
-        G_REGEX_RAW, 0, NULL);
-
-    regp[PSEUDO]    = g_regex_new(
-        "^\\s*(?:[\"#$%&'()*+,\\-./:;<=>?\\[\\\\\\]_`{|}~]|[^\\s\\x21-\\x7E])*([dDfFgGlLmMnNtTwW]{1})(?:\\Z|\\s+|[^\\x21-\\x7E]+\\Z)",
-        G_REGEX_RAW, 0, NULL);
 }
 
 PURPLE_INIT_PLUGIN(pidgin_twitter, init_plugin, info)