[svn:parrot] r46944 - in trunk: include/parrot src/interp src/packfile src/string

petdance at svn.parrot.org petdance at svn.parrot.org
Mon May 24 06:04:42 UTC 2010


Author: petdance
Date: Mon May 24 06:04:42 2010
New Revision: 46944
URL: https://trac.parrot.org/parrot/changeset/46944

Log:
adding some more PURE and CONST annotations

Modified:
   trunk/include/parrot/interpreter.h
   trunk/include/parrot/packfile.h
   trunk/include/parrot/string_funcs.h
   trunk/src/interp/inter_misc.c
   trunk/src/packfile/pf_items.c
   trunk/src/string/api.c

Modified: trunk/include/parrot/interpreter.h
==============================================================================
--- trunk/include/parrot/interpreter.h	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/include/parrot/interpreter.h	Mon May 24 06:04:42 2010	(r46944)
@@ -523,6 +523,7 @@
         __attribute__nonnull__(4);
 
 PARROT_WARN_UNUSED_RESULT
+PARROT_CONST_FUNCTION
 INTVAL sysinfo_i(SHIM_INTERP, INTVAL info_wanted);
 
 PARROT_CANNOT_RETURN_NULL

Modified: trunk/include/parrot/packfile.h
==============================================================================
--- trunk/include/parrot/packfile.h	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/include/parrot/packfile.h	Mon May 24 06:04:42 2010	(r46944)
@@ -1096,7 +1096,8 @@
 size_t PF_size_string(ARGIN(const STRING *s))
         __attribute__nonnull__(1);
 
-PARROT_PURE_FUNCTION
+PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 size_t PF_size_strlen(const UINTVAL len);
 
 PARROT_WARN_UNUSED_RESULT

Modified: trunk/include/parrot/string_funcs.h
==============================================================================
--- trunk/include/parrot/string_funcs.h	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/include/parrot/string_funcs.h	Mon May 24 06:04:42 2010	(r46944)
@@ -235,6 +235,7 @@
         __attribute__nonnull__(3);
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 PARROT_WARN_UNUSED_RESULT
 INTVAL Parrot_str_length(SHIM_INTERP, ARGIN_NULLOK(const STRING *s));
 

Modified: trunk/src/interp/inter_misc.c
==============================================================================
--- trunk/src/interp/inter_misc.c	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/src/interp/inter_misc.c	Mon May 24 06:04:42 2010	(r46944)
@@ -385,6 +385,7 @@
 */
 
 PARROT_WARN_UNUSED_RESULT
+PARROT_CONST_FUNCTION
 INTVAL
 sysinfo_i(SHIM_INTERP, INTVAL info_wanted)
 {

Modified: trunk/src/packfile/pf_items.c
==============================================================================
--- trunk/src/packfile/pf_items.c	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/src/packfile/pf_items.c	Mon May 24 06:04:42 2010	(r46944)
@@ -1370,7 +1370,8 @@
 
 */
 
-PARROT_PURE_FUNCTION
+PARROT_CONST_FUNCTION
+PARROT_WARN_UNUSED_RESULT
 size_t
 PF_size_strlen(const UINTVAL len)
 {

Modified: trunk/src/string/api.c
==============================================================================
--- trunk/src/string/api.c	Mon May 24 05:23:46 2010	(r46943)
+++ trunk/src/string/api.c	Mon May 24 06:04:42 2010	(r46944)
@@ -977,6 +977,7 @@
 */
 
 PARROT_EXPORT
+PARROT_PURE_FUNCTION
 PARROT_WARN_UNUSED_RESULT
 INTVAL
 Parrot_str_length(SHIM_INTERP, ARGIN_NULLOK(const STRING *s))


More information about the parrot-commits mailing list