[svn:parrot] r41575 - trunk/src/pmc
bacek at svn.parrot.org
bacek at svn.parrot.org
Wed Sep 30 13:32:19 UTC 2009
Author: bacek
Date: Wed Sep 30 13:32:19 2009
New Revision: 41575
URL: https://trac.parrot.org/parrot/changeset/41575
Log:
[core] Wallpapering problems reported in TT#1080 and ##T1081.
Sometimes HashIteratorKey got NULL pointers instead of real one. All 2
places in parrot set proper pointer right after creating new
HashIteratorKey. So, real problem is still hiding somewhere.
Modified:
trunk/src/pmc/hashiteratorkey.pmc
Modified: trunk/src/pmc/hashiteratorkey.pmc
==============================================================================
--- trunk/src/pmc/hashiteratorkey.pmc Wed Sep 30 13:31:59 2009 (r41574)
+++ trunk/src/pmc/hashiteratorkey.pmc Wed Sep 30 13:32:19 2009 (r41575)
@@ -35,6 +35,10 @@
VTABLE PMC* get_pmc() {
Parrot_HashIteratorKey_attributes *attrs =
PARROT_HASHITERATORKEY(SELF);
+
+ /* XXX Wallpapering problem with NULL attributes */
+ if (!attrs->parrot_hash || !attrs->bucket)
+ return PMCNULL;
return hash_key_to_pmc(INTERP, attrs->parrot_hash, attrs->bucket->key);
}
@@ -60,6 +64,10 @@
Parrot_HashIteratorKey_attributes *attrs =
PARROT_HASHITERATORKEY(SELF);
+ /* XXX Wallpapering problem with NULL attributes */
+ if (!attrs->parrot_hash || !attrs->bucket)
+ return CONST_STRING(INTERP, "");
+
return hash_key_to_string(INTERP, attrs->parrot_hash, attrs->bucket->key);
}
More information about the parrot-commits
mailing list