Added g_memdup implementation

-Yosh
This commit is contained in:
Manish Singh
1998-09-18 18:32:59 +00:00
parent 4193614b1c
commit 0dbf1d8cc4
12 changed files with 64 additions and 0 deletions

View File

@@ -43,6 +43,15 @@ g_strdup (const gchar *str)
return new_str;
}
guint8*
g_memdup (const guint8 *mem,
guint len)
{
guint8* mem2 = g_malloc (len);
memcpy (mem2, mem, len);
return mem2;
}
gchar*
g_strndup (const gchar *str,
guint n)