Mercurial > pidgin.yaz
annotate plugins/mono/loader/blist-glue.c @ 14039:5e6d4c36630a
[gaim-migrate @ 16643]
Return g_string_free(str, FALSE) directly instead of assigning
str->str to a temporary directory and returning that.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Aug 2006 09:17:09 +0000 |
parents | 8edb08af68c7 |
children |
rev | line source |
---|---|
11660 | 1 #include <string.h> |
2 #include "blist.h" | |
3 #include "mono-helper.h" | |
12442 | 4 #include "mono-glue.h" |
11660 | 5 |
6 MonoObject* gaim_blist_get_handle_glue(void) | |
7 { | |
8 void *handle = gaim_blist_get_handle(); | |
9 | |
11980
67fbd2ff4c4e
[gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents:
11660
diff
changeset
|
10 return mono_value_box(ml_get_domain(), mono_get_intptr_class(), &handle); |
11660 | 11 } |
12 | |
13 MonoObject* gaim_blist_build_buddy_object(void* data) | |
14 { | |
15 MonoObject *obj = NULL; | |
16 | |
17 GaimBuddy *buddy = (GaimBuddy*)data; | |
18 | |
11996
ecd33ffb0b0a
[gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents:
11980
diff
changeset
|
19 obj = ml_create_api_object("Buddy"); |
ecd33ffb0b0a
[gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents:
11980
diff
changeset
|
20 g_return_val_if_fail(obj != NULL, NULL); |
ecd33ffb0b0a
[gaim-migrate @ 14289]
Gary Kramlich <grim@reaperworld.com>
parents:
11980
diff
changeset
|
21 |
11980
67fbd2ff4c4e
[gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents:
11660
diff
changeset
|
22 ml_set_prop_string(obj, "Name", (char*)gaim_buddy_get_name(buddy)); |
67fbd2ff4c4e
[gaim-migrate @ 14273]
Gary Kramlich <grim@reaperworld.com>
parents:
11660
diff
changeset
|
23 ml_set_prop_string(obj, "Alias", (char*)gaim_buddy_get_alias(buddy)); |
11660 | 24 |
25 return obj; | |
26 } |