gpu: Fixed ErrorCallback.init() alignment #233

Merged
PiergiorgioZagaria merged 4 commits from main into main 2022-04-18 18:38:09 +00:00
PiergiorgioZagaria commented 2022-04-18 17:34:32 +00:00 (Migrated from github.com)
  • By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
- [X] By selecting this checkbox, I agree to license my contributions to this project under the license(s) described in the LICENSE file, and I have the right to do so or have received permission to do so by an employer or client I am producing work for whom has this right.
emidoots commented 2022-04-18 17:50:57 +00:00 (Migrated from github.com)

@PiergiorgioZagaria do you mind updating all locations with a bulk find-and-replace in your editor? Fine to do it in this PR. Shouldn't be too hard, no need to test each one or anything. Seems like there are a lot of locations we need to update:

https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/hexops/mach%24+callback%28if+%28Context+%3D%3D+void%29&patternType=literal

@PiergiorgioZagaria do you mind updating all locations with a bulk find-and-replace in your editor? Fine to do it in this PR. Shouldn't be too hard, no need to test each one or anything. Seems like there are a lot of locations we need to update: https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/hexops/mach%24+callback%28if+%28Context+%3D%3D+void%29&patternType=literal
PiergiorgioZagaria commented 2022-04-18 17:53:15 +00:00 (Migrated from github.com)

Oh I didn't think about that, will do it right now

Oh I didn't think about that, will do it right now
PiergiorgioZagaria commented 2022-04-18 18:04:43 +00:00 (Migrated from github.com)
I checked and there are more parts where it appears, https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/hexops/mach%24+%40ptrCast%28Context%2C+%40alignCast%28%40alignOf%28Context%29&patternType=literal
PiergiorgioZagaria commented 2022-04-18 18:05:46 +00:00 (Migrated from github.com)

Plus some more that don't use context but also ptrCast(pointer, alignCast(alignOf(Pointer

Plus some more that don't use context but also ptrCast(pointer, alignCast(alignOf(Pointer
emidoots commented 2022-04-18 18:10:03 +00:00 (Migrated from github.com)

Good catch, I think we only need to do it in Callback struct types' init methods.

A find and replace for @ptrCast(Context, @alignCast(@alignOf(Context) should be good enough I think.

(unrelated, looks like some of these locations need to be updated with if (Context == void) {} else @ptrCast too for consistency / void context support.)

Good catch, I think we only need to do it in `Callback` struct types' init methods. A find and replace for `@ptrCast(Context, @alignCast(@alignOf(Context)` should be good enough I think. (unrelated, looks like some of these locations need to be updated with `if (Context == void) {} else @ptrCast` too for consistency / `void` context support.)
emidoots (Migrated from github.com) approved these changes 2022-04-18 18:37:19 +00:00
emidoots (Migrated from github.com) left a comment

Looks great, thanks so much again!

Looks great, thanks so much again!
PiergiorgioZagaria commented 2022-04-18 18:39:12 +00:00 (Migrated from github.com)

No prob

No prob
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach!233
No description provided.