Author: petdance
Date: Sat Jun  2 20:56:14 2007
New Revision: 18774

Modified:
   trunk/include/parrot/string_funcs.h
   trunk/src/string.c
   trunk/src/string_primitives.c

Log:
Added more NN restrictions

Modified: trunk/include/parrot/string_funcs.h
==============================================================================
--- trunk/include/parrot/string_funcs.h (original)
+++ trunk/include/parrot/string_funcs.h Sat Jun  2 20:56:14 2007
@@ -165,7 +165,10 @@
         __attribute__nonnull__(2);
 
 PARROT_API void string_init( Parrot_Interp interp );
-PARROT_API STRING* string_join( Interp *interp, STRING *j, PMC *ar );
+PARROT_API STRING* string_join( Interp *interp,
+    STRING *j /*NULLOK*/,
+    PMC *ar );
+
 PARROT_API UINTVAL string_length( Interp *interp, const STRING *s /*NULLOK*/ );
 PARROT_API STRING * string_make( Interp *interp,
     const char *buffer /*NULLOK*/,
@@ -238,7 +241,12 @@
     STRING *dest /*NULLOK*/,
     STRING *src /*NULLOK*/ );
 
-PARROT_API PMC* string_split( Interp *interp, STRING *delim, STRING *str );
+PARROT_API PMC* string_split( Interp *interp,
+    STRING *delim /*NN*/,
+    STRING *str /*NN*/ )
+        __attribute__nonnull__(2)
+        __attribute__nonnull__(3);
+
 PARROT_API INTVAL string_str_index( Interp *interp,
     const STRING *s /*NN*/,
     const STRING *s2 /*NN*/,
@@ -295,12 +303,13 @@
     const void *buffer,
     UINTVAL len,
     const char *encoding_name,
-    STRING *s );
+    STRING *s /*NULLOK*/ );
 
 PARROT_API void string_set_data_directory( const char *dir );
 PARROT_API Parrot_UInt4 string_unescape_one( Interp *interp,
-    UINTVAL *offset,
-    STRING *string );
+    UINTVAL *offset /*NN*/,
+    STRING *string )
+        __attribute__nonnull__(2);
 /* HEADERIZER END: src/string_primitives.c */
 
 #endif /* PARROT_IN_CORE */

Modified: trunk/src/string.c
==============================================================================
--- trunk/src/string.c  (original)
+++ trunk/src/string.c  Sat Jun  2 20:56:14 2007
@@ -2483,7 +2483,7 @@
 }
 
 STRING*
-string_join(Interp *interp, STRING *j, PMC *ar)
+string_join(Interp *interp, STRING *j /*NULLOK*/, PMC *ar)
 {
     STRING *res;
     STRING *s;
@@ -2503,7 +2503,7 @@
 }
 
 PMC*
-string_split(Interp *interp, STRING *delim, STRING *str)
+string_split(Interp *interp, STRING *delim /*NN*/, STRING *str /*NN*/)
 {
     PMC * const res =  pmc_new(interp, enum_class_ResizableStringArray);
     const int slen = string_length(interp, str);

Modified: trunk/src/string_primitives.c
==============================================================================
--- trunk/src/string_primitives.c       (original)
+++ trunk/src/string_primitives.c       Sat Jun  2 20:56:14 2007
@@ -82,7 +82,7 @@
 
 void
 string_fill_from_buffer(Interp *interp, const void *buffer,
-            UINTVAL len, const char *encoding_name, STRING *s)
+            UINTVAL len, const char *encoding_name, STRING *s /*NULLOK*/)
 {
 #if PARROT_HAS_ICU
     UErrorCode icuError = U_ZERO_ERROR;
@@ -162,7 +162,7 @@
 /* Unescape a single character. We assume that we're at the start of a
    sequence, right after the \ */
 Parrot_UInt4
-string_unescape_one(Interp *interp, UINTVAL *offset,
+string_unescape_one(Interp *interp, UINTVAL *offset /*NN*/,
         STRING *string)
 {
     UINTVAL workchar = 0;

Reply via email to