-
Notifications
You must be signed in to change notification settings - Fork 56
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
Expose array data as pointer #411
Comments
Oh, and if dart:ffi had something like |
Blocked by dart-lang/sdk#35763. |
@dcharkes is this still blocked given that dart-lang/sdk#35763 has been closed? |
Shouldn't that generate the following now? class aiString extends Struct {
@Uint32()
int length;
Array<Int8> data;
}
https://api.dart.dev/stable/2.14.1/dart-ffi/Array-class.html Side note: exposing as |
Bumps [subosito/flutter-action](https://github.com/subosito/flutter-action) from 2.10.0 to 2.12.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/subosito/flutter-action/releases">subosito/flutter-action's releases</a>.</em></p> <blockquote> <h2>v2.12.0</h2> <p>No release notes provided.</p> <h2>v2.11.0</h2> <p>Allow git ref as version for master channel:</p> <pre lang="yaml"><code>steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: flutter-version: '5b12b74' # tag, commit or branch channel: 'master' - run: flutter --version </code></pre> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/subosito/flutter-action/commit/2783a3f08e1baf891508463f8c6653c258246225"><code>2783a3f</code></a> ensure setup.sh executable; fixes <a href="https://github.com/subosito/flutter-action/issues/245">#245</a></li> <li><a href="https://github.com/subosito/flutter-action/commit/c33c37022b3aac486cc5e7aea5c7f6b8b0f421e1"><code>c33c370</code></a> Extract to a temporary location to enable moving of flutter folder. (<a href="https://github.com/subosito/flutter-action/issues/227">#227</a>)</li> <li><a href="https://github.com/subosito/flutter-action/commit/cc97e1648fff6ca5cc647fa67f47e70f7895510b"><code>cc97e16</code></a> feat: Allow git ref as version in <code>master</code> channel (<a href="https://github.com/subosito/flutter-action/issues/237">#237</a>)</li> <li><a href="https://github.com/subosito/flutter-action/commit/ed388baf1d5404fd6ef3c54c2f82e6159150b60f"><code>ed388ba</code></a> fixes <a href="https://github.com/subosito/flutter-action/issues/224">#224</a>; update readme</li> <li>See full diff in <a href="https://github.com/subosito/flutter-action/compare/48cafc24713cca54bbe03cdc3a423187d413aafa...2783a3f08e1baf891508463f8c6653c258246225">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=subosito/flutter-action&package-manager=github_actions&previous-version=2.10.0&new-version=2.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Bumps [subosito/flutter-action](https://github.com/subosito/flutter-action) from 2.10.0 to 2.12.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/subosito/flutter-action/releases">subosito/flutter-action's releases</a>.</em></p> <blockquote> <h2>v2.12.0</h2> <p>No release notes provided.</p> <h2>v2.11.0</h2> <p>Allow git ref as version for master channel:</p> <pre lang="yaml"><code>steps: - uses: actions/checkout@v3 - uses: subosito/flutter-action@v2 with: flutter-version: '5b12b74' # tag, commit or branch channel: 'master' - run: flutter --version </code></pre> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/subosito/flutter-action/commit/2783a3f08e1baf891508463f8c6653c258246225"><code>2783a3f</code></a> ensure setup.sh executable; fixes <a href="https://github.com/subosito/flutter-action/issues/245">#245</a></li> <li><a href="https://github.com/subosito/flutter-action/commit/c33c37022b3aac486cc5e7aea5c7f6b8b0f421e1"><code>c33c370</code></a> Extract to a temporary location to enable moving of flutter folder. (<a href="https://github.com/subosito/flutter-action/issues/227">#227</a>)</li> <li><a href="https://github.com/subosito/flutter-action/commit/cc97e1648fff6ca5cc647fa67f47e70f7895510b"><code>cc97e16</code></a> feat: Allow git ref as version in <code>master</code> channel (<a href="https://github.com/subosito/flutter-action/issues/237">#237</a>)</li> <li><a href="https://github.com/subosito/flutter-action/commit/ed388baf1d5404fd6ef3c54c2f82e6159150b60f"><code>ed388ba</code></a> fixes <a href="https://github.com/subosito/flutter-action/issues/224">#224</a>; update readme</li> <li>See full diff in <a href="https://github.com/subosito/flutter-action/compare/48cafc24713cca54bbe03cdc3a423187d413aafa...2783a3f08e1baf891508463f8c6653c258246225">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=subosito/flutter-action&package-manager=github_actions&previous-version=2.10.0&new-version=2.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
Consider the aiString structure in Assimp:
While the ArrayHelper, that is generated for the data, does offer [] and []= operators for accessing and manipulating the data at each index one by one, it seems like it would be more useful to expose the array data as a pointer:
Int8Pointer would not only offer the same operators, but would also let you have the data as a typed list view too. This struct here is extremely simple, though. Things might get hairy if there are holes/padding involved.
The text was updated successfully, but these errors were encountered: