Mercurial > pidgin
comparison src/stringref.c @ 8072:ceb88c0a1abb
[gaim-migrate @ 8770]
the 0-byte-string trick doesn't work on non-gcc compilers.
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sun, 11 Jan 2004 06:10:22 +0000 |
parents | fa6395637e2c |
children |
comparison
equal
deleted
inserted
replaced
8071:4dede940939c | 8072:ceb88c0a1abb |
---|---|
44 GaimStringref *newref; | 44 GaimStringref *newref; |
45 | 45 |
46 if (value == NULL) | 46 if (value == NULL) |
47 return NULL; | 47 return NULL; |
48 | 48 |
49 newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1); | 49 newref = g_malloc(sizeof(GaimStringref) + strlen(value)); |
50 strcpy(newref->value, value); | 50 strcpy(newref->value, value); |
51 newref->ref = 1; | 51 newref->ref = 1; |
52 | 52 |
53 return newref; | 53 return newref; |
54 } | 54 } |
58 GaimStringref *newref; | 58 GaimStringref *newref; |
59 | 59 |
60 if (value == NULL) | 60 if (value == NULL) |
61 return NULL; | 61 return NULL; |
62 | 62 |
63 newref = g_malloc(sizeof(GaimStringref) + strlen(value) + 1); | 63 newref = g_malloc(sizeof(GaimStringref) + strlen(value)); |
64 strcpy(newref->value, value); | 64 strcpy(newref->value, value); |
65 newref->ref = 0x80000000; | 65 newref->ref = 0x80000000; |
66 | 66 |
67 if (gclist == NULL) | 67 if (gclist == NULL) |
68 g_idle_add(gs_idle_cb, NULL); | 68 g_idle_add(gs_idle_cb, NULL); |