Ticket #1261 (closed patch: done)

Opened 12 years ago

Last modified 12 years ago

Document NCI type 'p' behavior for PMCNULL/NULL values

Reported by: NotFound Owned by:
Priority: normal Milestone:
Component: none Version: 1.7.0
Severity: medium Keywords:
Cc: Language:
Patch status: applied Platform:


The 'p' type in NCI signatures according to pdd16 draft when used for a parameter takes a PMC and uses his data pointer (in fact uses vtable get_pointer) on it, and for a return value creates an UnmanagedStruct PMC and sets his pointer.

However what it was doing before pcc refactoring was passing NULL for a PMCNULL argument and returning PMCNULL for a returned NULL. This is more convenient for most usages, and avoid creation of unuseful PMCs.

The change passed unadvertised because there was no test for that cases.

I reverted the behavior and added a test for it yesterday, but I think this is an important detail for most NCI usages and must be clearly stated in the docs.

The attached patch fixes draft pdd13, but surely my English grammar sucks. Please review.


pdd_16_type_p.patch Download (0.9 KB) - added by NotFound 12 years ago.

Change History

Changed 12 years ago by NotFound

Changed 12 years ago by NotFound

  • status changed from new to closed
  • resolution set to done
  • patch set to applied

After reviewing and fixing in #parrot, applied in r42404

Note: See TracTickets for help on using tickets.