Skip to content

Support pointer-sized struct arguments in callbacks (NewCallback) #418

Closed as duplicate

Description

@tmc

Operating System

  • Windows
  • macOS
  • Linux
  • FreeBSD
  • Android
  • iOS

What feature would you like to be added?

Allow callback argument types that are structs whose flattened leaf fields total exactly one pointer-sized slot (for example wrapper types with embedded unsafe.Pointer).

Why is this needed?

Generated bindings and Objective-C wrappers often model pointers as tiny structs. Today those callback signatures are rejected even when ABI-equivalent to a pointer-sized argument.

Activity

  1. added this to the v0.11.0 milestone on Feb 23, 2026
  2. TotallyGamerJet commented on Feb 23, 2026

    @TotallyGamerJet
    Collaborator

    Can you provide an example of this in practice? If I understand correctly this is just implementing structs to be transparent if just contesting other structs for callbacks?

  3. MatejMagat305 commented on Feb 26, 2026

    @MatejMagat305

    I know, but from android env->findClass(env, ...), if similar is in other, than...

  4. TotallyGamerJet commented on Apr 10, 2026

    @TotallyGamerJet
    Collaborator

    I think this is covered by completion of #225

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions