This repository was archived by the owner on Aug 31, 2021. It is now read-only.
[[ Bug 23148 ]] Cleanup access to keyword tables#7543
Open
runrevmark wants to merge 1 commit intodevelopfrom
Open
[[ Bug 23148 ]] Cleanup access to keyword tables#7543runrevmark wants to merge 1 commit intodevelopfrom
runrevmark wants to merge 1 commit intodevelopfrom
Conversation
This patch cleans up access to the keyword tables, used by the script parser and syntax such as `the commandNames`. The tables are now accessible via global variables `MCkeywordtablepointers` and `MCkeywordtablesizes` which are defined in `scriptpt.h`; and all direct access to the underlying tables in other files have been updated to use them.
livecodeian
reviewed
Apr 5, 2021
Comment on lines
+2456
to
+2459
| LT **MCkeywordtablepointers = (LT **)table_pointers; | ||
| uint4 MCkeywordtablepointerssize = table_pointers_size; | ||
| uint2 *MCkeywordtablesizes = (uint2 *)table_sizes; | ||
| uint4 MCkeywordtablesizessize = table_sizes_size; |
Contributor
There was a problem hiding this comment.
Could the global variables be defined as const instead of the const-ness being cast away? e.g const LT * const * const MCkeywordtablepointers = table_pointers; (a constant pointer to constant pointers to constant LTs)
If not perhaps const_cast should be used here to signify what is being done.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch cleans up access to the keyword tables, used by the script parser
and syntax such as
the commandNames. The tables are now accessible viaglobal variables
MCkeywordtablepointersandMCkeywordtablesizeswhich aredefined in
scriptpt.h; and all direct access to the underlying tables inother files have been updated to use them.
Closes https://quality.livecode.com/show_bug.cgi?id=23148