# New Ticket Created by Jarkko Hietaniemi
# Please include the string: [perl #31064]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=31064 >
Because this is a family channel I won't publicly comment on the
classes/unmanagedstruct.pmc change at line 527.
--
Jarkko Hietaniemi <[EMAIL PROTECTED]> http://www.iki.fi/jhi/ "There is this special
biologist word we use for 'stable'. It is 'dead'." -- Jack Cohen
--- classes/unmanagedstruct.pmc.dist 2004-08-11 19:07:06.000000000 +0300
+++ classes/unmanagedstruct.pmc 2004-08-11 19:08:09.000000000 +0300
@@ -169,6 +169,7 @@
*/
if (*type == enum_type_struct_ptr) {
/* that is either a pointer */
+ assert((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT - 1)) == 0);
PMC_data(init) = *(void**)p;
}
else {
@@ -182,8 +183,8 @@
* p is the location of the struct pointer in the
* outer struct, the inner is at PMC_data(init)
*/
+ assert((PTR2INTVAL(p) & (PARROT_PTR_ALIGNMENT - 1)) == 0);
*(void**)p = PMC_data(init);
-
}
return char_offset_key(interpreter, init, next, type);
}
@@ -527,8 +528,6 @@
if (align && offs % align) {
int diff;
- if (align > 4 && !strcmp(PARROT_CPU_ARCH, "i386"))
- align = 4;
diff = align - (offs % align);
offs += diff;
}
--- t/pmc/nci.t 2004-08-11 19:11:06.000000000 +0300
+++ t/pmc/nci.t.dist 2004-08-11 19:14:15.000000000 +0300
@@ -544,7 +544,7 @@
output_is(<<'CODE', <<'OUTPUT', "nci_p_i - nested struct *");
loadlib P1, "libnci"
dlfunc P0, P1, "nci_pi", "pi"
- # this test function returns a struct { char; {int, int, double} }
+ # this test function returns a struct { char; x->{int, double} }
set I5, 4
invoke
.include "datatypes.pasm"
@@ -566,7 +566,7 @@
push P2, 0
push P2, 0
push P2, .DATATYPE_STRUCT_PTR
- # attach the unmanaged struct as property
+ # attach the unmanged struct as property
set P1, P2[-1]
setprop P1, "_struct", P4
push P2, 0