Author: julianalbo
Date: Wed Dec 3 03:11:12 2008
New Revision: 33452
Modified:
trunk/src/pmc/string.pmc
Log:
fix string is_same for no same pmc class case
Modified: trunk/src/pmc/string.pmc
==============================================================================
--- trunk/src/pmc/string.pmc (original)
+++ trunk/src/pmc/string.pmc Wed Dec 3 03:11:12 2008
@@ -501,9 +501,13 @@
return 0;
}
else {
- const STRING * const s = VTABLE_get_string(INTERP, SELF);
- const STRING * const v = VTABLE_get_string(INTERP, value);
- return (INTVAL)(value->vtable == SELF->vtable && s == v);
+ if (value->vtable == SELF->vtable) {
+ const STRING * const s = VTABLE_get_string(INTERP, SELF);
+ const STRING * const v = VTABLE_get_string(INTERP, value);
+ return (INTVAL)(s == v);
+ }
+ else
+ return 0;
}
}