[svn:parrot] r41524 - trunk/src
bacek at svn.parrot.org
bacek at svn.parrot.org
Sun Sep 27 09:44:33 UTC 2009
Author: bacek
Date: Sun Sep 27 09:44:32 2009
New Revision: 41524
URL: https://trac.parrot.org/parrot/changeset/41524
Log:
[cage][doc] Add docs for hash key and value casting functions
Modified:
trunk/src/hash.c
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Sun Sep 27 09:33:58 2009 (r41523)
+++ trunk/src/hash.c Sun Sep 27 09:44:32 2009 (r41524)
@@ -1508,11 +1508,22 @@
stored values type.
void *hash_key_from_TYPE convert to keys type.
+TYPE hash_key_to_TYPE convert from keys type.
void *hash_value_from_TYPE convert to values type.
TYPE hash_value_to_TYPE convert from values type.
*/
+/*
+
+=item C<void* hash_key_from_int(PARROT_INTERP, const Hash * const hash, INTVAL
+key)>
+
+Cast INTVAL to hash key.
+
+=cut
+
+*/
PARROT_CAN_RETURN_NULL
void*
@@ -1537,6 +1548,17 @@
return ret;
}
+/*
+
+=item C<void* hash_key_from_string(PARROT_INTERP, const Hash * const hash,
+STRING *key)>
+
+Cast STRING to hash key.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_key_from_string(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN(STRING *key))
@@ -1566,6 +1588,17 @@
return ret;
}
+/*
+
+=item C<void* hash_key_from_pmc(PARROT_INTERP, const Hash * const hash, PMC
+*key)>
+
+Cast PMC* to hash key.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_key_from_pmc(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN(PMC *key))
@@ -1622,6 +1655,16 @@
return ret;
}
+/*
+
+=item C<INTVAL hash_key_to_int(PARROT_INTERP, const Hash * const hash, void
+*key)>
+
+Cast hash key to INTVAL.
+
+=cut
+
+*/
INTVAL
hash_key_to_int(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *key))
@@ -1644,6 +1687,17 @@
return ret;
}
+/*
+
+=item C<STRING* hash_key_to_string(PARROT_INTERP, const Hash * const hash, void
+*key)>
+
+Cast hash key to STRING.
+
+=cut
+
+*/
+
PARROT_CANNOT_RETURN_NULL
STRING*
hash_key_to_string(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *key))
@@ -1669,6 +1723,16 @@
return ret;
}
+/*
+
+=item C<PMC* hash_key_to_pmc(PARROT_INTERP, const Hash * const hash, void *key)>
+
+Cast hash key to PMC*.
+
+=cut
+
+*/
+
PARROT_CANNOT_RETURN_NULL
PMC*
hash_key_to_pmc(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN(void *key))
@@ -1695,6 +1759,18 @@
/* Second part - convert from stored void* to real type */
/* TODO: FLOATVALs converted into Float PMC for now */
+
+/*
+
+=item C<void* hash_value_from_int(PARROT_INTERP, const Hash * const hash, INTVAL
+value)>
+
+Cast INTVAL to hash value.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_value_from_int(PARROT_INTERP, ARGIN(const Hash * const hash), INTVAL value)
@@ -1720,6 +1796,17 @@
return ret;
}
+/*
+
+=item C<void* hash_value_from_string(PARROT_INTERP, const Hash * const hash,
+STRING *value)>
+
+Cast STRING to hash value.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_value_from_string(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN(STRING *value))
@@ -1748,6 +1835,17 @@
return ret;
}
+/*
+
+=item C<void* hash_value_from_pmc(PARROT_INTERP, const Hash * const hash, PMC
+*value)>
+
+Cast PMC to hash value.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_value_from_pmc(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN(PMC *value))
@@ -1773,6 +1871,17 @@
return ret;
}
+/*
+
+=item C<void* hash_value_from_number(PARROT_INTERP, const Hash * const hash,
+FLOATVAL value)>
+
+Cast FLOATVAL to hash value.
+
+=cut
+
+*/
+
PARROT_CAN_RETURN_NULL
void*
hash_value_from_number(PARROT_INTERP, ARGIN(const Hash * const hash), FLOATVAL value)
@@ -1801,6 +1910,17 @@
return ret;
}
+/*
+
+=item C<INTVAL hash_value_to_int(PARROT_INTERP, const Hash * const hash, void
+*value)>
+
+Cast hash value to INTVAL.
+
+=cut
+
+*/
+
INTVAL
hash_value_to_int(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *value))
{
@@ -1822,6 +1942,17 @@
return ret;
}
+/*
+
+=item C<STRING* hash_value_to_string(PARROT_INTERP, const Hash * const hash,
+void *value)>
+
+Cast hash value to STRING.
+
+=cut
+
+*/
+
PARROT_CANNOT_RETURN_NULL
STRING*
hash_value_to_string(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *value))
@@ -1844,6 +1975,17 @@
return ret;
}
+/*
+
+=item C<PMC* hash_value_to_pmc(PARROT_INTERP, const Hash * const hash, void
+*value)>
+
+Cast hash value to PMC.
+
+=cut
+
+*/
+
PARROT_CANNOT_RETURN_NULL
PMC*
hash_value_to_pmc(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *value))
@@ -1866,6 +2008,17 @@
return ret;
}
+/*
+
+=item C<FLOATVAL hash_value_to_number(PARROT_INTERP, const Hash * const hash,
+void *value)>
+
+Cast hash value to FLOATVAL.
+
+=cut
+
+*/
+
FLOATVAL
hash_value_to_number(PARROT_INTERP, ARGIN(const Hash * const hash), ARGIN_NULLOK(void *value))
{
More information about the parrot-commits
mailing list