Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Column.ToArray<T> typecast error (fixes #4) #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pkese
Copy link

@pkese pkese commented Mar 22, 2019

This is my own workaround for the typecast issue.

It appears that CanBeBlitted<T> is not a sufficient condition for direct byte-copy to target array - types should match as well.

I have added some additional code to detect the mismatch condition and copy the data through an intermediate array (builtin Array.Copy seems to do the correct thing).

This is probably not as performant as generated IL, but at least it works without errors.

@pkese pkese changed the title Fix Column.ToArray<T> typecast error #4 Fix Column.ToArray<T> typecast error (fixes #4) Mar 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant