Feature #490
pmt: create pmt_const type for readonly accessors
| Status: | Closed | Start date: | 02/24/2012 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | Josh Blum | % Done: | 0% |
|
| Category: | gruel | |||
| Target version: | - | |||
| Resolution: | wontfix |
Description
1) Create pmt_const_t which is copy-constructible from pmt_t
Possible implementation:
struct pmt_const_t : pmt_t{
pmt_const_t(void){}
pmt_const_t(pmt_t p) : pmt_t(p){}
};
2) Replace all pmt_t type usages with pmt_const_t in pmt_* functions that are read-only.
3) (optional) To make tags read-only: Replace pmt_t with pmt_const_t in gr_tag_t struct. This will be an API change for code assigning from gr_tag_t elements, since pmt_const_t cannot be assigned to pmt_t
History
Updated by Josh Blum 11 months ago
- File pmt_const.diff added
- Description updated (diff)
- Category set to gruel
- Status changed from New to Feedback
- Assignee set to Josh Blum
- Resolution set to wontfix
The PMT const type prevents mutable PMTs from being passed downstream and being altered by a consumer.
Currently we expect that the author of a downstream block will not violate this rule.
Also, this fix introduces and API change, so its not likely that this work will be merged.
The implementation is attached to this issue, so it may rest here in perpetuity.
Updated by Josh Blum 11 months ago
- File pmt_const.diff added
Josh Blum wrote:
The PMT const type prevents mutable PMTs from being passed downstream and being altered by a consumer.
Currently we expect that the author of a downstream block will not violate this rule.
Also, this fix introduces and API change, so its not likely that this work will be merged.
The implementation is attached to this issue, so it may rest here in perpetuity.
Updated attached diff, was missing a commit
Updated by Tom Rondeau 6 months ago
- Status changed from Feedback to Closed