Added silc_buffer_data.
authorPekka Riikonen <priikone@silcnet.org>
Sat, 24 Jun 2006 19:33:43 +0000 (19:33 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Sat, 24 Jun 2006 19:33:43 +0000 (19:33 +0000)
lib/silcutil/silcbuffer.h

index c2c60b29e51f514e022a18de4e6daaa652288e5e..407ae219a3ad4d22731aa30f518eb0297bb2b6a2 100644 (file)
@@ -177,6 +177,21 @@ typedef struct {
 #define silc_buffer_taillen(x) (SilcUInt32)((x)->end - (x)->tail)
 /***/
 
+/****f* silcutil/SilcBufferAPI/silc_buffer_data
+ *
+ * NAME
+ *
+ *    unsigned char *silc_buffer_data(SilcBuffer sb)
+ *
+ * DESCRIPTION
+ *
+ *    Returns pointer to the data area of the buffer.
+ *
+ * SOURCE
+ */
+#define silc_buffer_data(x) (x)->data
+/***/
+
 /* Inline functions */
 
 /****f* silcutil/SilcBufferAPI/silc_buffer_alloc
@@ -226,7 +241,7 @@ SilcBuffer silc_buffer_alloc(SilcUInt32 len)
  *
  * DESCRIPTION
  *
- *    Frees SilcBuffer.
+ *    Frees SilcBuffer.  Can be called safely `sb' as NULL.
  *
  ***/