From d61238974c5a95d7ab74c84cf9ba0af23b7f0d0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Sharma?= <737941+loic-sharma@users.noreply.github.com> Date: Tue, 28 Feb 2023 15:04:11 -0800 Subject: [PATCH] [Embedder API] Add 'array of pointers' guidance (flutter/engine#39804) [Embedder API] Add 'array of pointers' guidance --- engine/src/flutter/shell/platform/embedder/embedder.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/flutter/shell/platform/embedder/embedder.h b/engine/src/flutter/shell/platform/embedder/embedder.h index b12d41a2a3..60a90f45f9 100644 --- a/engine/src/flutter/shell/platform/embedder/embedder.h +++ b/engine/src/flutter/shell/platform/embedder/embedder.h @@ -25,6 +25,9 @@ // - Function signatures (names, argument counts, argument order, and argument // type) cannot change. // - The core behavior of existing functions cannot change. +// - Instead of array of structures, prefer array of pointers to structures. +// This ensures that array indexing does not break if members are added +// to the structure. // // These changes are allowed: // - Adding new struct members at the end of a structure.