Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 9ffe548

Browse files
authored
[Embedder API] Add 'array of pointers' guidance (#39804)
[Embedder API] Add 'array of pointers' guidance
1 parent 43f28d2 commit 9ffe548

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

shell/platform/embedder/embedder.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
// - Function signatures (names, argument counts, argument order, and argument
2626
// type) cannot change.
2727
// - The core behavior of existing functions cannot change.
28+
// - Instead of array of structures, prefer array of pointers to structures.
29+
// This ensures that array indexing does not break if members are added
30+
// to the structure.
2831
//
2932
// These changes are allowed:
3033
// - Adding new struct members at the end of a structure.

0 commit comments

Comments
 (0)