Title: const typedef pointers · Issue #384 · stepcode/stepcode · GitHub
Open Graph Title: const typedef pointers · Issue #384 · stepcode/stepcode
X Title: const typedef pointers · Issue #384 · stepcode/stepcode
Description: looking in exp2cxx I see function prototypes including statements like this: void TYPEenum_inc_print( const Type type, FILE * inc ) presumably the intention is along the lines of const char *p i.e. p / type param target won't be changed....
Open Graph Description: looking in exp2cxx I see function prototypes including statements like this: void TYPEenum_inc_print( const Type type, FILE * inc ) presumably the intention is along the lines of const char *p i.e....
X Description: looking in exp2cxx I see function prototypes including statements like this: void TYPEenum_inc_print( const Type type, FILE * inc ) presumably the intention is along the lines of const char *p i.e....
Opengraph URL: https://github.com/stepcode/stepcode/issues/384
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"const typedef pointers","articleBody":"looking in exp2cxx I see function prototypes including statements like this:\r\n\r\n`void TYPEenum_inc_print( const Type type, FILE * inc )`\r\n\r\npresumably the intention is along the lines of `const char *p` i.e. p / type param target won't be changed. However, libexpress defines:\r\n\r\n`typedef struct Scope_ * Type;`\r\n\r\nPerhaps due to the age of the code, typedef of pointers hasn't before been recognised as bad practice. Also, the use of the types is not treating the pointers as opaque - so why do this?\r\n\r\nI tested fixing this in several ways:\r\n1. remove typedefs to force compile errors and iterate until fixed.\r\n2. adjust typedefs to remove the pointer, rename e.g. `typedef struct Scope_ Scope;`\r\n3. adjust typedefs to remove the pointer e.g. `typedef struct Scope_ Type;`\r\n\r\noption 1 is my currently favoured approach.\r\noption 2 - not convinced less typing is a good argument.\r\noption 3 - feels like C++ masquerading as C (with this I can assign Type t to Procedure p... yuk!)\r\n\r\n","author":{"url":"https://github.com/cshorler","@type":"Person","name":"cshorler"},"datePublished":"2018-11-11T11:08:16Z","url":"https://github.com/stepcode/stepcode/issues/384"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b9126368-8783-ffa0-9bac-6c2adc9042b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCC8:10338A:4F4204:6E3257:6B0467C8 |
| html-safe-nonce | 705610e7c6976b11b9626664b7f3137a34acab941ea727dd88a288f9672f3ad0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0M4OjEwMzM4QTo0RjQyMDQ6NkUzMjU3OjZCMDQ2N0M4IiwidmlzaXRvcl9pZCI6IjIxMDY1MDEwOTc2MjY4MjI2MDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 160e844e972c0f0a21cf404c29bbe9a31c2153cf37d0521a8d381b35240ba47a |
| hovercard-subject-tag | issue:379512242 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/stepcode/stepcode/384/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c91e11a9f04693ee52e14ba5a071633abac54ed91071ce039a535cc430b32a84/stepcode/stepcode/issues/384 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c91e11a9f04693ee52e14ba5a071633abac54ed91071ce039a535cc430b32a84/stepcode/stepcode/issues/384 |
| og:image:alt | looking in exp2cxx I see function prototypes including statements like this: void TYPEenum_inc_print( const Type type, FILE * inc ) presumably the intention is along the lines of const char *p i.e.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | cshorler |
| hostname | github.com |
| expected-hostname | github.com |
| None | 83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f |
| turbo-cache-control | no-preview |
| go-import | github.com/stepcode/stepcode git https://github.com/stepcode/stepcode.git |
| octolytics-dimension-user_id | 1761770 |
| octolytics-dimension-user_login | stepcode |
| octolytics-dimension-repository_id | 1975387 |
| octolytics-dimension-repository_nwo | stepcode/stepcode |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1975387 |
| octolytics-dimension-repository_network_root_nwo | stepcode/stepcode |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ca4d07a7cef4e4b75f821dc25e7300d80c1450a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width