mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add NUM_VALUES for enums and size for structs (see #3836)
API versioning requires that enumerations end with a count value (`*_NUM_VALUES`) and structs begin with a size value (`size_t size`). Wrapper templates are updated to support structs with different size values indicating different versions. To test: Run `ceftests --gtest_filter=ApiVersionTest.StructVersion*`
This commit is contained in:
@ -53,7 +53,7 @@ class CefMainArgs : public cef_main_args_t {
|
||||
struct CefWindowInfoTraits {
|
||||
typedef cef_window_info_t struct_type;
|
||||
|
||||
static inline void init(struct_type* s) {}
|
||||
static inline void init(struct_type* s) { s->size = sizeof(struct_type); }
|
||||
|
||||
static inline void clear(struct_type* s) {
|
||||
cef_string_clear(&s->window_name);
|
||||
|
Reference in New Issue
Block a user