mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
girepository/ginvoke.c girepository/girepository.h
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk> * girepository/ginvoke.c * girepository/girepository.h * girepository/gmetadata.c * girepository/gmetadata.h * tools/generate.c * tools/gidlparser.c Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL to avoid confusion with the interface blob. * tools/generate.c * tools/gidlparser.c Remove magic numbers and replace with type-tag enumeration symbols. * girepository/gmetadata.c Add validate declaration. WARNING: This commit does not compile. It is a partial change. svn path=/trunk/; revision=129
This commit is contained in:
parent
2fb6877346
commit
d349902ce6
@ -100,8 +100,8 @@ get_ffi_type (GITypeInfo *info)
|
||||
break;
|
||||
case GI_TYPE_TAG_UTF8:
|
||||
case GI_TYPE_TAG_FILENAME:
|
||||
case GI_TYPE_TAG_SYMBOL:
|
||||
case GI_TYPE_TAG_ARRAY:
|
||||
case GI_TYPE_TAG_INTERFACE:
|
||||
case GI_TYPE_TAG_GLIST:
|
||||
case GI_TYPE_TAG_GSLIST:
|
||||
case GI_TYPE_TAG_GHASH:
|
||||
|
@ -277,8 +277,8 @@ typedef enum {
|
||||
GI_TYPE_TAG_DOUBLE = 17,
|
||||
GI_TYPE_TAG_UTF8 = 18,
|
||||
GI_TYPE_TAG_FILENAME = 19,
|
||||
GI_TYPE_TAG_ARRAY = 20,
|
||||
GI_TYPE_TAG_INTERFACE = 21,
|
||||
GI_TYPE_TAG_SYMBOL = 20,
|
||||
GI_TYPE_TAG_ARRAY = 21,
|
||||
GI_TYPE_TAG_GLIST = 22,
|
||||
GI_TYPE_TAG_GSLIST = 23,
|
||||
GI_TYPE_TAG_GHASH = 24,
|
||||
|
11
gmetadata.c
11
gmetadata.c
@ -30,6 +30,11 @@
|
||||
#define ALIGN_VALUE(this, boundary) \
|
||||
(( ((unsigned long)(this)) + (((unsigned long)(boundary)) -1)) & (~(((unsigned long)(boundary))-1)))
|
||||
|
||||
static gboolean
|
||||
validate_blob (GMetadata *metadata,
|
||||
guint32 offset,
|
||||
GError **error);
|
||||
|
||||
|
||||
DirEntry *
|
||||
g_metadata_get_dir_entry (GMetadata *metadata,
|
||||
@ -419,9 +424,9 @@ validate_type_blob (GMetadata *metadata,
|
||||
signature_offset, return_type, error))
|
||||
return FALSE;
|
||||
break;
|
||||
case TYPE_TAG_INTERFACE:
|
||||
if (!validate_iface_type_blob (metadata, simple->offset,
|
||||
signature_offset, return_type, error))
|
||||
case TYPE_TAG_SYMBOL:
|
||||
if (!validate_blob (metadata, simple->offset,
|
||||
error))
|
||||
return FALSE;
|
||||
break;
|
||||
case TYPE_TAG_LIST:
|
||||
|
@ -95,10 +95,6 @@ typedef struct
|
||||
guint32 offset;
|
||||
} DirEntry;
|
||||
|
||||
|
||||
#define TYPE_POINTER_MASK 1 << 7
|
||||
#define TYPE_TAG_MASK 63
|
||||
|
||||
typedef enum
|
||||
{
|
||||
TYPE_TAG_VOID = 0,
|
||||
@ -121,8 +117,8 @@ typedef enum
|
||||
TYPE_TAG_DOUBLE = 17,
|
||||
TYPE_TAG_UTF8 = 18,
|
||||
TYPE_TAG_FILENAME = 19,
|
||||
TYPE_TAG_ARRAY = 20,
|
||||
TYPE_TAG_INTERFACE = 21,
|
||||
TYPE_TAG_SYMBOL = 20,
|
||||
TYPE_TAG_ARRAY = 21,
|
||||
TYPE_TAG_LIST = 22,
|
||||
TYPE_TAG_SLIST = 23,
|
||||
TYPE_TAG_HASH = 24,
|
||||
|
Loading…
Reference in New Issue
Block a user