Emscripten: Как определить webidl для типа массива C ++ - PullRequest
0 голосов
/ 18 апреля 2020

Привет. Я пытаюсь преобразовать библиотеку QR quir c в WASM. Для этого я написал оболочку C ++, чтобы я мог использовать webIDL, чтобы сделать преобразование более простым. Однако у меня проблемы с определением типов массивов в webIDL. Какой будет правильный webIDL для следующего фрагмента

        struct Point {
            int x;
            int y;
        };

        struct Code {
            /* The four corners of the QR-code, from top left, clockwise */
            Point corners[4];

            /* The number of cells across in the QR-code. The cell bitmap
            * is a bitmask giving the actual values of cells. If the cell
            * at (x, y) is black, then the following bit is set:
            *
            *     cell_bitmap[i >> 3] & (1 << (i & 7))
            *
            * where i = (y * size) + x.
            */
            int         size;
            uint8_t     cell_bitmap[QUIRC_MAX_BITMAP];
        };

...