Author: bernhard
Date: Fri Apr 29 10:59:01 2005
New Revision: 7945

Modified:
   trunk/docs/strings.pod
   trunk/src/string.c
Log:
Mention that string_make_direct is the most basic way
of generating strings.


Modified: trunk/docs/strings.pod
==============================================================================
--- trunk/docs/strings.pod      (original)
+++ trunk/docs/strings.pod      Fri Apr 29 10:59:01 2005
@@ -1,4 +1,4 @@
-# Copyright: 2001-2004 The Perl Foundation.  All Rights Reserved.
+# Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
 # $Id$
 
 =head1 NAME
@@ -44,24 +44,26 @@
 =head2 String Constructors
 
 The most basic way of creating a string is through the function
-C<string_make>:
+C<string_make_direct>:
 
-    STRING* string_make(Interp *, const void *buffer, INTVAL buflen, INTVAL 
encoding, INTVAL flags, INTVAL type)
+    STRING* string_make_direct(Interp *interpreter, const void *buffer, 
UINTVAL buflen, ENCODING *encoding, CHARSET *charset, UINTVAL flags)
 
 In here you pass a pointer to a buffer of a given encoding, and the
-number of bytes in that buffer to examine, the encoding, (see below for
-the C<enum> which defines the different encodings) and the initial
-values of the C<flags> and C<type> field. These should usually be zero.
+number of bytes in that buffer to examine, the encoding, the charset, and the 
initial
+values of the C<flags>. These should usually be zero.
 In return, you'll get a brand new Parrot string. This string will
 have its own private copy of the buffer, so you don't need to keep it.
 
+Additionally there several convenience functions, that are wrapping 
string_make_direct. 
+See F<src/string.c> for details.
+ 
 =over 3
 
 =item *
 
 I<Hint>: Nothing stops you doing
 
-    string_make(interpreter, NULL, 0, ...
+    string_make_direct(interpreter, NULL, 0, ...
 
 =back
 

Modified: trunk/src/string.c
==============================================================================
--- trunk/src/string.c  (original)
+++ trunk/src/string.c  Fri Apr 29 10:59:01 2005
@@ -1,5 +1,5 @@
 /*
-Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
+Copyright: 2001-2005 The Perl Foundation.  All Rights Reserved.
 $Id$
 
 =head1 NAME
@@ -10,7 +10,7 @@
 
 This file implements the non-ICU parts of the Parrot string subsystem.
 
-Note that C<bufstart> and C<buflen> are used by the memory subsystem The
+Note that C<bufstart> and C<buflen> are used by the memory subsystem. The
 string functions may only use C<buflen> to determine, if there is some
 space left beyond C<bufused>. This is the I<only> valid usage of these
 two data members, beside setting C<bufstart>/C<buflen> for external
@@ -602,12 +602,12 @@
 
 =item C<STRING *
 string_make(Interp *interpreter, const void *buffer,
-    UINTVAL len, const char *charset, UINTVAL flags)>
+    UINTVAL len, const char *charset_name, UINTVAL flags)>
 
 Creates and returns a new Parrot string using C<len> bytes of string
 data read from C<buffer>.
 
-The value of C<charset> specifies the string's representation.
+The value of C<charset_name> specifies the string's representation.
 The currently recognised values are:
 
     'iso-8859-1'

Reply via email to