Added g_memdup implementation
authorManish Singh <yosh@src.gnome.org>
Fri, 18 Sep 1998 18:32:59 +0000 (18:32 +0000)
committerManish Singh <yosh@src.gnome.org>
Fri, 18 Sep 1998 18:32:59 +0000 (18:32 +0000)
-Yosh

12 files changed:
ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib.h
glib/glib.h
glib/gstrfuncs.c
gstrfuncs.c

index 84690ab..1b52cf1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
index 84690ab..1b52cf1 100644 (file)
@@ -1,3 +1,8 @@
+Fri Sep 18 11:31:50 PDT 1998 Manish Singh <yosh@gimp.org>
+
+       * glib.h
+       * gstrfuncs.c: added g_memdup implementation
+
 Fri Sep 18 18:46:14 1998  Tim Janik  <timj@gtk.org>
 
        * glib.h:
diff --git a/glib.h b/glib.h
index f9725b6..0817691 100644 (file)
--- a/glib.h
+++ b/glib.h
@@ -1205,6 +1205,9 @@ void      g_strreverse            (gchar       *string);
 guint  g_printf_string_upper_bound (const gchar* format,
                                     va_list      args);
 
+guint8*        g_memdup                (const guint8 *mem,
+                                guint         len);
+
 
 /* Retrive static string info
  */
index f9725b6..0817691 100644 (file)
@@ -1205,6 +1205,9 @@ void      g_strreverse            (gchar       *string);
 guint  g_printf_string_upper_bound (const gchar* format,
                                     va_list      args);
 
+guint8*        g_memdup                (const guint8 *mem,
+                                guint         len);
+
 
 /* Retrive static string info
  */
index 1769854..d477736 100644 (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)
index 1769854..d477736 100644 (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)