#1261: Document NCI type 'p' behavior for PMCNULL/NULL values
----------------------+-----------------------------------------------------
Reporter: NotFound | Owner:
Type: patch | Status: new
Priority: normal | Milestone:
Component: none | Version: 1.7.0
Severity: medium | Keywords:
Lang: | Patch:
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.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1261>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets