This repository was archived by the owner on Jun 27, 2022. It is now read-only.
[Lang Enhancement Proposal] Implement PblPointer_T
to differentiate between native pointers and user-defined pointers
#69
Labels
Milestone
Affected area by change:
Short Introduction and Summary
With the proposal of implementing a type-tracking meta-type (#67), there is a new door opening for differentiating User-Pointers (declared/defined in Para-C) and native C-Pointers (declared/defined by the PBL and Compiler). This could enhance the clearness of code, and also allow for better handling in general, as then it can be type-checked and validated.
Is your request related to a problem? Please describe.
Currently, the implementation is thought to convert a user-pointer (
*
) into a C double-pointer (**
) eg. a pointer points to the pointer which points to the memory. This may though be confusing with a PBL or compiler-defined pointer to pointer definition, as those will appear as equal.Describe the solution you'd like
Implement a new type, with the following signature:
Describe alternatives you've considered
Perhaps remove the difference altogether of pointers and values in the generated C code of Para-C, as always they will be pointers. As such it's only important to properly implement the functionality, and have the ability to differentiate them in important cases.
Additional context
PblType_T
,PblTypeList_T
and file scope type tracking (dynamic type checking and conversion) #67The text was updated successfully, but these errors were encountered: