diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-16 17:28:14 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-16 17:28:14 +0800 |
| commit | 24d8be5ecf2a89ef0523c7002ef2e82c133778f2 (patch) | |
| tree | 02a29c4bdd7b1f2e0c0e96f03c6a2c34f2d321ef /lib | |
| parent | e528c0fd57d7afd37c6e5d27c535689bd56fd8b2 (diff) | |
| download | ibus-24d8be5ecf2a89ef0523c7002ef2e82c133778f2.tar.gz ibus-24d8be5ecf2a89ef0523c7002ef2e82c133778f2.tar.xz ibus-24d8be5ecf2a89ef0523c7002ef2e82c133778f2.zip | |
Use g_slice_new to replace g_new for better performance.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gtk2/ibusimclient.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gtk2/ibusimclient.c b/lib/gtk2/ibusimclient.c index 8621620..2d79770 100644 --- a/lib/gtk2/ibusimclient.c +++ b/lib/gtk2/ibusimclient.c @@ -1540,7 +1540,7 @@ struct _KeyPressCallData { static KeyPressCallData * _key_press_call_data_new (IBusIMClient *client, const gchar *ic, GdkEvent *event) { - KeyPressCallData *p = g_new (KeyPressCallData, 1); + KeyPressCallData *p = g_slice_new (KeyPressCallData); p->client = g_object_ref (client); p->ic = g_strdup (ic); p->event = gdk_event_copy (event); @@ -1556,7 +1556,7 @@ _key_press_call_data_free (KeyPressCallData *p) g_free (p->ic); gdk_event_free (p->event); } - g_free (p); + g_slice_free (KeyPressCallData, p); } static void |
