Skip to content

Structure.newInstance should be generified so cast isn't necessary #889

@ghost

Description

  array[i] = (Complex) Structure.newInstance(Complex.class, new Pointer(Pointer.nativeValue(p) + i * SIZE));

the cast shouldn't be necessary, the method definition should be
public static <T extends Structure> T newInstance(Class<T> type, Pointer init) throws IllegalArgumentException { ... }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions