[svn:parrot] r39986 - in trunk: include/parrot src
petdance at svn.parrot.org
petdance at svn.parrot.org
Sat Jul 11 02:16:59 UTC 2009
Author: petdance
Date: Sat Jul 11 02:16:56 2009
New Revision: 39986
URL: https://trac.parrot.org/parrot/changeset/39986
Log:
fixed splint annotations for a bunch of functions
Modified:
trunk/include/parrot/multidispatch.h
trunk/src/multidispatch.c
Modified: trunk/include/parrot/multidispatch.h
==============================================================================
--- trunk/include/parrot/multidispatch.h Sat Jul 11 01:17:51 2009 (r39985)
+++ trunk/include/parrot/multidispatch.h Sat Jul 11 02:16:56 2009 (r39986)
@@ -109,7 +109,8 @@
FUNC_MODIFIES(*cache);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
PMC * Parrot_mmd_cache_lookup_by_types(PARROT_INTERP,
ARGMOD(MMD_Cache *cache),
ARGIN(const char *name),
@@ -121,7 +122,8 @@
FUNC_MODIFIES(*cache);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
PMC * Parrot_mmd_cache_lookup_by_values(PARROT_INTERP,
ARGMOD(MMD_Cache *cache),
ARGIN(const char *name),
@@ -165,7 +167,7 @@
FUNC_MODIFIES(*cache);
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC * Parrot_mmd_find_multi_from_long_sig(PARROT_INTERP,
ARGIN(STRING *name),
Modified: trunk/src/multidispatch.c
==============================================================================
--- trunk/src/multidispatch.c Sat Jul 11 01:17:51 2009 (r39985)
+++ trunk/src/multidispatch.c Sat Jul 11 02:16:56 2009 (r39986)
@@ -84,7 +84,8 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static STRING * mmd_cache_key_from_types(PARROT_INTERP,
ARGIN(const char *name),
ARGIN(PMC *types))
@@ -92,7 +93,8 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static STRING * mmd_cache_key_from_values(PARROT_INTERP,
ARGIN(const char *name),
ARGIN(PMC *values))
@@ -100,8 +102,8 @@
__attribute__nonnull__(2)
__attribute__nonnull__(3);
-PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static PMC* mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -141,7 +143,8 @@
static PMC* Parrot_mmd_arg_tuple_func(PARROT_INTERP)
__attribute__nonnull__(1);
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static PMC * Parrot_mmd_get_cached_multi_sig(PARROT_INTERP,
ARGIN(PMC *sub_pmc))
__attribute__nonnull__(1)
@@ -343,7 +346,7 @@
*/
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_CAN_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
PMC *
Parrot_mmd_find_multi_from_long_sig(PARROT_INTERP, ARGIN(STRING *name),
@@ -355,8 +358,9 @@
interp->root_namespace, multi_str);
PMC * const multi_sub = Parrot_get_global(interp, ns, name);
- if (PMC_IS_NULL(multi_sub))
+ if (PMC_IS_NULL(multi_sub)) {
return PMCNULL;
+ }
else {
PMC * const type_tuple = mmd_build_type_tuple_from_long_sig(interp, long_sig);
return Parrot_mmd_sort_candidates(interp, type_tuple, multi_sub);
@@ -748,8 +752,8 @@
*/
-PARROT_CANNOT_RETURN_NULL
PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static PMC*
mmd_cvt_to_types(PARROT_INTERP, ARGIN(PMC *multi_sig))
{
@@ -805,7 +809,8 @@
*/
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static PMC *
Parrot_mmd_get_cached_multi_sig(PARROT_INTERP, ARGIN(PMC *sub_pmc))
{
@@ -1401,7 +1406,8 @@
*/
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static STRING *
mmd_cache_key_from_values(PARROT_INTERP, ARGIN(const char *name),
ARGIN(PMC *values))
@@ -1448,7 +1454,8 @@
*/
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
PMC *
Parrot_mmd_cache_lookup_by_values(PARROT_INTERP, ARGMOD(MMD_Cache *cache),
ARGIN(const char *name), ARGIN(PMC *values))
@@ -1499,7 +1506,8 @@
*/
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
static STRING *
mmd_cache_key_from_types(PARROT_INTERP, ARGIN(const char *name),
ARGIN(PMC *types))
@@ -1548,13 +1556,14 @@
*/
PARROT_EXPORT
-PARROT_CANNOT_RETURN_NULL
+PARROT_WARN_UNUSED_RESULT
+PARROT_CAN_RETURN_NULL
PMC *
Parrot_mmd_cache_lookup_by_types(PARROT_INTERP, ARGMOD(MMD_Cache *cache),
ARGIN(const char *name), ARGIN(PMC *types))
{
ASSERT_ARGS(Parrot_mmd_cache_lookup_by_types)
- STRING * const key = mmd_cache_key_from_types(interp, name, types);
+ const STRING * const key = mmd_cache_key_from_types(interp, name, types);
if (key)
return (PMC *)parrot_hash_get(interp, cache, key);
More information about the parrot-commits
mailing list