Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7903649

Field and global variables of array type should have indexed accessors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • None
    • tools
    • None

      Consider this global variable declaration:

      int ints[2][3][4];

      Currently, jextract only generates an accessor for the segment slice corresponding to `ints`. As such, it is rather hard to access individual elements of the underlying array.

      A better solution would be, for array variables/fields, to generate (in addition to the usual slice accessors), a way to access individual elements, given access coordinates - e.g.

      int ints(long x0, long x1, long x2)

      and

      int ints(long x0, long x1, long x2, int varValue)

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: