mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
gitypes: Fix integer values of GIInfoType
This effectively reverts commit 0910e2f6ad
. I thought that `GIInfoType`
was decoupled from `GITypelibBlobType`, but it turns out that
`girepository.c` calls `gi_info_new_full()` with blob types, implicitly
converting them to info types.
This was causing anything with a type higher than the `INVALID_0` value
to be loaded as the wrong type.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
This commit is contained in:
parent
e286497c1f
commit
c8946b8a92
@ -179,6 +179,7 @@ Changes since 0.1:
|
||||
* Since: 2.80
|
||||
*/
|
||||
typedef enum {
|
||||
/* The values here must be kept in sync with GIInfoType */
|
||||
BLOB_TYPE_INVALID,
|
||||
BLOB_TYPE_FUNCTION,
|
||||
BLOB_TYPE_CALLBACK,
|
||||
|
@ -241,6 +241,7 @@ typedef union _GIArgument GIArgument;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
/* The values here must be kept in sync with GITypelibBlobType */
|
||||
GI_INFO_TYPE_INVALID,
|
||||
GI_INFO_TYPE_FUNCTION,
|
||||
GI_INFO_TYPE_CALLBACK,
|
||||
@ -251,17 +252,19 @@ typedef enum
|
||||
GI_INFO_TYPE_OBJECT,
|
||||
GI_INFO_TYPE_INTERFACE,
|
||||
GI_INFO_TYPE_CONSTANT,
|
||||
GI_INFO_TYPE_UNION, /* 10 */
|
||||
GI_INFO_TYPE_VALUE,
|
||||
GI_INFO_TYPE_SIGNAL,
|
||||
GI_INFO_TYPE_VFUNC,
|
||||
GI_INFO_TYPE_PROPERTY,
|
||||
GI_INFO_TYPE_FIELD, /* 15 */
|
||||
GI_INFO_TYPE_ARG,
|
||||
GI_INFO_TYPE_TYPE,
|
||||
GI_INFO_TYPE_UNRESOLVED,
|
||||
GI_INFO_TYPE_CALLABLE,
|
||||
GI_INFO_TYPE_REGISTERED_TYPE, /* 20 */
|
||||
/* 10 is skipped, it used to be used, but was removed before girepository-2.0
|
||||
* It is, however, part of the binary format in GITypelibBlobType */
|
||||
GI_INFO_TYPE_UNION = 11,
|
||||
GI_INFO_TYPE_VALUE = 12,
|
||||
GI_INFO_TYPE_SIGNAL = 13,
|
||||
GI_INFO_TYPE_VFUNC = 14,
|
||||
GI_INFO_TYPE_PROPERTY = 15,
|
||||
GI_INFO_TYPE_FIELD = 16,
|
||||
GI_INFO_TYPE_ARG = 17,
|
||||
GI_INFO_TYPE_TYPE = 18,
|
||||
GI_INFO_TYPE_UNRESOLVED = 19,
|
||||
GI_INFO_TYPE_CALLABLE = 20,
|
||||
GI_INFO_TYPE_REGISTERED_TYPE = 21,
|
||||
/* keep GI_INFO_TYPE_N_TYPES in sync with this */
|
||||
} GIInfoType;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user