mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-10 11:14:05 +02:00
girrepository: Replace usage of gsize with standard size_t
We just do a safe s/gsize/size_t/ replacement here without doing any changes to places in which different size of size_t and gsize may be actually different and create troubles.
This commit is contained in:
@@ -44,8 +44,8 @@
|
|||||||
static gboolean
|
static gboolean
|
||||||
write_all (FILE *out,
|
write_all (FILE *out,
|
||||||
const void *buffer,
|
const void *buffer,
|
||||||
gsize count,
|
size_t count,
|
||||||
gsize *bytes_written,
|
size_t *bytes_written,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
size_t ret;
|
size_t ret;
|
||||||
@@ -104,7 +104,7 @@ escaped_printf (FILE *out, const char *fmt, ...)
|
|||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
va_list args;
|
va_list args;
|
||||||
gsize written;
|
size_t written;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
va_start (args, fmt);
|
va_start (args, fmt);
|
||||||
@@ -123,7 +123,7 @@ escaped_printf (FILE *out, const char *fmt, ...)
|
|||||||
static void
|
static void
|
||||||
goutput_write (FILE *out, const char *str)
|
goutput_write (FILE *out, const char *str)
|
||||||
{
|
{
|
||||||
gsize written;
|
size_t written;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
if (!write_all (out, str, strlen (str), &written, &error))
|
if (!write_all (out, str, strlen (str), &written, &error))
|
||||||
{
|
{
|
||||||
@@ -662,7 +662,7 @@ gi_repository_dump (const char *input_filename,
|
|||||||
|
|
||||||
while (TRUE)
|
while (TRUE)
|
||||||
{
|
{
|
||||||
gsize len;
|
size_t len;
|
||||||
char *line = read_line (input, &len);
|
char *line = read_line (input, &len);
|
||||||
const char *function;
|
const char *function;
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ struct _GIBaseInfoClass
|
|||||||
void gi_base_info_init_types (void);
|
void gi_base_info_init_types (void);
|
||||||
|
|
||||||
GType gi_base_info_type_register_static (const char *type_name,
|
GType gi_base_info_type_register_static (const char *type_name,
|
||||||
gsize instance_size,
|
size_t instance_size,
|
||||||
GClassInitFunc class_init);
|
GClassInitFunc class_init);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@@ -213,7 +213,7 @@ gi_base_info_get_type (void)
|
|||||||
*/
|
*/
|
||||||
GType
|
GType
|
||||||
gi_base_info_type_register_static (const char *type_name,
|
gi_base_info_type_register_static (const char *type_name,
|
||||||
gsize instance_size,
|
size_t instance_size,
|
||||||
GClassInitFunc class_init)
|
GClassInitFunc class_init)
|
||||||
{
|
{
|
||||||
GTypeInfo info;
|
GTypeInfo info;
|
||||||
@@ -264,7 +264,7 @@ GI_DEFINE_BASE_INFO_TYPE (gi_unresolved_info, GI_INFO_TYPE_UNRESOLVED)
|
|||||||
void
|
void
|
||||||
gi_base_info_init_types (void)
|
gi_base_info_init_types (void)
|
||||||
{
|
{
|
||||||
static gsize register_types_once = 0;
|
static size_t register_types_once = 0;
|
||||||
|
|
||||||
if (g_once_init_enter (®ister_types_once))
|
if (g_once_init_enter (®ister_types_once))
|
||||||
{
|
{
|
||||||
@@ -272,7 +272,7 @@ gi_base_info_init_types (void)
|
|||||||
{
|
{
|
||||||
GIInfoType info_type;
|
GIInfoType info_type;
|
||||||
const char *type_name;
|
const char *type_name;
|
||||||
gsize instance_size;
|
size_t instance_size;
|
||||||
GClassInitFunc class_init;
|
GClassInitFunc class_init;
|
||||||
}
|
}
|
||||||
types[] =
|
types[] =
|
||||||
@@ -297,7 +297,7 @@ gi_base_info_init_types (void)
|
|||||||
{ GI_INFO_TYPE_UNRESOLVED, "GIUnresolvedInfo", sizeof (GIUnresolvedInfo), gi_unresolved_info_class_init },
|
{ GI_INFO_TYPE_UNRESOLVED, "GIUnresolvedInfo", sizeof (GIUnresolvedInfo), gi_unresolved_info_class_init },
|
||||||
};
|
};
|
||||||
|
|
||||||
for (gsize i = 0; i < G_N_ELEMENTS (types); i++)
|
for (size_t i = 0; i < G_N_ELEMENTS (types); i++)
|
||||||
{
|
{
|
||||||
GType registered_type = gi_base_info_type_register_static (g_intern_static_string (types[i].type_name),
|
GType registered_type = gi_base_info_type_register_static (g_intern_static_string (types[i].type_name),
|
||||||
types[i].instance_size,
|
types[i].instance_size,
|
||||||
|
@@ -631,9 +631,9 @@ gboolean
|
|||||||
gi_callable_info_invoke (GICallableInfo *info,
|
gi_callable_info_invoke (GICallableInfo *info,
|
||||||
void *function,
|
void *function,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@@ -644,7 +644,7 @@ gi_callable_info_invoke (GICallableInfo *info,
|
|||||||
GITypeInfo *rinfo;
|
GITypeInfo *rinfo;
|
||||||
GITypeTag rtag;
|
GITypeTag rtag;
|
||||||
GIArgInfo *ainfo;
|
GIArgInfo *ainfo;
|
||||||
gsize n_args, n_invoke_args, in_pos, out_pos, i;
|
size_t n_args, n_invoke_args, in_pos, out_pos, i;
|
||||||
void **args;
|
void **args;
|
||||||
gboolean success = FALSE;
|
gboolean success = FALSE;
|
||||||
GError *local_error = NULL;
|
GError *local_error = NULL;
|
||||||
|
@@ -95,9 +95,9 @@ GI_AVAILABLE_IN_ALL
|
|||||||
gboolean gi_callable_info_invoke (GICallableInfo *info,
|
gboolean gi_callable_info_invoke (GICallableInfo *info,
|
||||||
void *function,
|
void *function,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
@@ -116,7 +116,7 @@ gi_constant_info_free_value (GIConstantInfo *info,
|
|||||||
* Returns: size of the constant, in bytes
|
* Returns: size of the constant, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_constant_info_get_value (GIConstantInfo *info,
|
gi_constant_info_get_value (GIConstantInfo *info,
|
||||||
GIArgument *value)
|
GIArgument *value)
|
||||||
{
|
{
|
||||||
@@ -133,7 +133,7 @@ gi_constant_info_get_value (GIConstantInfo *info,
|
|||||||
{
|
{
|
||||||
if (blob->type.flags.pointer)
|
if (blob->type.flags.pointer)
|
||||||
{
|
{
|
||||||
gsize blob_size = blob->size;
|
size_t blob_size = blob->size;
|
||||||
|
|
||||||
value->v_pointer = g_memdup2 (&rinfo->typelib->data[blob->offset], blob_size);
|
value->v_pointer = g_memdup2 (&rinfo->typelib->data[blob->offset], blob_size);
|
||||||
}
|
}
|
||||||
|
@@ -52,6 +52,6 @@ void gi_constant_info_free_value (GIConstantInfo *info,
|
|||||||
GIArgument *value);
|
GIArgument *value);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_constant_info_get_value (GIConstantInfo *info,
|
size_t gi_constant_info_get_value (GIConstantInfo *info,
|
||||||
GIArgument *value);
|
GIArgument *value);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
@@ -95,7 +95,7 @@ gi_field_info_get_flags (GIFieldInfo *info)
|
|||||||
* Returns: the field size, in bits
|
* Returns: the field size, in bits
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_field_info_get_size (GIFieldInfo *info)
|
gi_field_info_get_size (GIFieldInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@@ -119,7 +119,7 @@ gi_field_info_get_size (GIFieldInfo *info)
|
|||||||
* Returns: the field offset, in bytes
|
* Returns: the field offset, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_field_info_get_offset (GIFieldInfo *info)
|
gi_field_info_get_offset (GIFieldInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@@ -433,7 +433,7 @@ gi_field_info_set_field (GIFieldInfo *field_info,
|
|||||||
result = TRUE;
|
result = TRUE;
|
||||||
break;
|
break;
|
||||||
case GI_TYPE_TAG_GTYPE:
|
case GI_TYPE_TAG_GTYPE:
|
||||||
G_STRUCT_MEMBER (gsize, mem, offset) = value->v_size;
|
G_STRUCT_MEMBER (size_t, mem, offset) = value->v_size;
|
||||||
result = TRUE;
|
result = TRUE;
|
||||||
break;
|
break;
|
||||||
case GI_TYPE_TAG_FLOAT:
|
case GI_TYPE_TAG_FLOAT:
|
||||||
|
@@ -48,10 +48,10 @@ GI_AVAILABLE_IN_ALL
|
|||||||
GIFieldInfoFlags gi_field_info_get_flags (GIFieldInfo *info);
|
GIFieldInfoFlags gi_field_info_get_flags (GIFieldInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_field_info_get_size (GIFieldInfo *info);
|
size_t gi_field_info_get_size (GIFieldInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_field_info_get_offset (GIFieldInfo *info);
|
size_t gi_field_info_get_offset (GIFieldInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GITypeInfo * gi_field_info_get_type_info (GIFieldInfo *info);
|
GITypeInfo * gi_field_info_get_type_info (GIFieldInfo *info);
|
||||||
|
@@ -266,9 +266,9 @@ gi_invoke_error_quark (void)
|
|||||||
gboolean
|
gboolean
|
||||||
gi_function_info_invoke (GIFunctionInfo *info,
|
gi_function_info_invoke (GIFunctionInfo *info,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
@@ -92,9 +92,9 @@ typedef enum
|
|||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_function_info_invoke (GIFunctionInfo *info,
|
gboolean gi_function_info_invoke (GIFunctionInfo *info,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
@@ -1071,7 +1071,7 @@ gi_repository_find_by_error_domain (GIRepository *repository,
|
|||||||
void
|
void
|
||||||
gi_repository_get_object_gtype_interfaces (GIRepository *repository,
|
gi_repository_get_object_gtype_interfaces (GIRepository *repository,
|
||||||
GType gtype,
|
GType gtype,
|
||||||
gsize *n_interfaces_out,
|
size_t *n_interfaces_out,
|
||||||
GIInterfaceInfo ***interfaces_out)
|
GIInterfaceInfo ***interfaces_out)
|
||||||
{
|
{
|
||||||
GTypeInterfaceCache *cache;
|
GTypeInterfaceCache *cache;
|
||||||
|
@@ -165,7 +165,7 @@ GIBaseInfo * gi_repository_find_by_gtype (GIRepository *repository,
|
|||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
void gi_repository_get_object_gtype_interfaces (GIRepository *repository,
|
void gi_repository_get_object_gtype_interfaces (GIRepository *repository,
|
||||||
GType gtype,
|
GType gtype,
|
||||||
gsize *n_interfaces_out,
|
size_t *n_interfaces_out,
|
||||||
GIInterfaceInfo ***interfaces_out);
|
GIInterfaceInfo ***interfaces_out);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@@ -319,8 +319,8 @@ gi_ir_module_build_typelib (GIIrModule *module)
|
|||||||
{
|
{
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GITypelib *typelib;
|
GITypelib *typelib;
|
||||||
gsize length;
|
size_t length;
|
||||||
unsigned int i;
|
size_t i;
|
||||||
GList *e;
|
GList *e;
|
||||||
Header *header;
|
Header *header;
|
||||||
DirEntry *entry;
|
DirEntry *entry;
|
||||||
|
@@ -433,7 +433,7 @@ static GIIrNodeType * parse_type_internal (GIIrModule *module,
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const char *str;
|
const char *str;
|
||||||
unsigned int size;
|
size_t size;
|
||||||
unsigned int is_signed : 1;
|
unsigned int is_signed : 1;
|
||||||
} IntegerAliasInfo;
|
} IntegerAliasInfo;
|
||||||
|
|
||||||
|
@@ -1249,7 +1249,7 @@ write_union_info (const char *ns,
|
|||||||
const char *type_init;
|
const char *type_init;
|
||||||
const char *func;
|
const char *func;
|
||||||
gboolean deprecated;
|
gboolean deprecated;
|
||||||
gsize size;
|
size_t size;
|
||||||
|
|
||||||
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
name = gi_base_info_get_name ((GIBaseInfo *)info);
|
||||||
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
|
deprecated = gi_base_info_is_deprecated ((GIBaseInfo *)info);
|
||||||
|
@@ -232,7 +232,7 @@ gi_struct_info_find_method (GIStructInfo *info,
|
|||||||
* Returns: size of the structure, in bytes
|
* Returns: size of the structure, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_struct_info_get_size (GIStructInfo *info)
|
gi_struct_info_get_size (GIStructInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@@ -250,7 +250,7 @@ gi_struct_info_get_size (GIStructInfo *info)
|
|||||||
* Returns: required alignment, in bytes
|
* Returns: required alignment, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_struct_info_get_alignment (GIStructInfo *info)
|
gi_struct_info_get_alignment (GIStructInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@@ -67,10 +67,10 @@ GIFunctionInfo * gi_struct_info_find_method (GIStructInfo *info,
|
|||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_struct_info_get_size (GIStructInfo *info);
|
size_t gi_struct_info_get_size (GIStructInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_struct_info_get_alignment (GIStructInfo *info);
|
size_t gi_struct_info_get_alignment (GIStructInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gboolean gi_struct_info_is_gtype_struct (GIStructInfo *info);
|
gboolean gi_struct_info_is_gtype_struct (GIStructInfo *info);
|
||||||
|
@@ -1314,7 +1314,7 @@ typedef struct {
|
|||||||
struct _GITypelib {
|
struct _GITypelib {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
uint8_t *data;
|
uint8_t *data;
|
||||||
gsize len;
|
size_t len;
|
||||||
gboolean owns_memory;
|
gboolean owns_memory;
|
||||||
GMappedFile *mfile;
|
GMappedFile *mfile;
|
||||||
GList *modules;
|
GList *modules;
|
||||||
|
@@ -271,7 +271,7 @@ gi_typelib_get_dir_entry_by_gtype_name (GITypelib *typelib,
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
const char *s;
|
const char *s;
|
||||||
const char *separator;
|
const char *separator;
|
||||||
gsize sep_len;
|
size_t sep_len;
|
||||||
GString buf;
|
GString buf;
|
||||||
} StrSplitIter;
|
} StrSplitIter;
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ strsplit_iter_next (StrSplitIter *iter,
|
|||||||
{
|
{
|
||||||
const char *s = iter->s;
|
const char *s = iter->s;
|
||||||
const char *next;
|
const char *next;
|
||||||
gsize len;
|
size_t len;
|
||||||
|
|
||||||
if (!s)
|
if (!s)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -347,7 +347,7 @@ gi_typelib_matches_gtype_name_prefix (GITypelib *typelib,
|
|||||||
const char *prefix;
|
const char *prefix;
|
||||||
gboolean ret = FALSE;
|
gboolean ret = FALSE;
|
||||||
StrSplitIter split_iter;
|
StrSplitIter split_iter;
|
||||||
gsize gtype_name_len;
|
size_t gtype_name_len;
|
||||||
|
|
||||||
c_prefix = gi_typelib_get_string (typelib, header->c_prefix);
|
c_prefix = gi_typelib_get_string (typelib, header->c_prefix);
|
||||||
if (c_prefix == NULL || strlen (c_prefix) == 0)
|
if (c_prefix == NULL || strlen (c_prefix) == 0)
|
||||||
@@ -558,7 +558,7 @@ validate_name (GITypelib *typelib,
|
|||||||
/* Fast path sanity check, operates on a memory blob */
|
/* Fast path sanity check, operates on a memory blob */
|
||||||
static gboolean
|
static gboolean
|
||||||
validate_header_basic (const uint8_t *memory,
|
validate_header_basic (const uint8_t *memory,
|
||||||
gsize len,
|
size_t len,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
Header *header = (Header *)memory;
|
Header *header = (Header *)memory;
|
||||||
@@ -568,8 +568,7 @@ validate_header_basic (const uint8_t *memory,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
GI_TYPELIB_ERROR,
|
GI_TYPELIB_ERROR,
|
||||||
GI_TYPELIB_ERROR_INVALID,
|
GI_TYPELIB_ERROR_INVALID,
|
||||||
"The specified typelib length %" G_GSIZE_FORMAT " is too short",
|
"The specified typelib length %zu is too short", len);
|
||||||
len);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,8 +607,8 @@ validate_header_basic (const uint8_t *memory,
|
|||||||
g_set_error (error,
|
g_set_error (error,
|
||||||
GI_TYPELIB_ERROR,
|
GI_TYPELIB_ERROR,
|
||||||
GI_TYPELIB_ERROR_INVALID_HEADER,
|
GI_TYPELIB_ERROR_INVALID_HEADER,
|
||||||
"Typelib size %" G_GSIZE_FORMAT " does not match %" G_GSIZE_FORMAT,
|
"Typelib size %zu does not match %zu",
|
||||||
(gsize) header->size, len);
|
(size_t) header->size, len);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2410,7 +2409,7 @@ gi_typelib_ensure_open (GITypelib *typelib)
|
|||||||
*/
|
*/
|
||||||
GITypelib *
|
GITypelib *
|
||||||
gi_typelib_new_from_memory (uint8_t *memory,
|
gi_typelib_new_from_memory (uint8_t *memory,
|
||||||
gsize len,
|
size_t len,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GITypelib *meta;
|
GITypelib *meta;
|
||||||
@@ -2440,7 +2439,7 @@ gi_typelib_new_from_memory (uint8_t *memory,
|
|||||||
*/
|
*/
|
||||||
GITypelib *
|
GITypelib *
|
||||||
gi_typelib_new_from_const_memory (const uint8_t *memory,
|
gi_typelib_new_from_const_memory (const uint8_t *memory,
|
||||||
gsize len,
|
size_t len,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
GITypelib *meta;
|
GITypelib *meta;
|
||||||
@@ -2474,7 +2473,7 @@ gi_typelib_new_from_mapped_file (GMappedFile *mfile,
|
|||||||
{
|
{
|
||||||
GITypelib *meta;
|
GITypelib *meta;
|
||||||
uint8_t *data = (uint8_t *) g_mapped_file_get_contents (mfile);
|
uint8_t *data = (uint8_t *) g_mapped_file_get_contents (mfile);
|
||||||
gsize len = g_mapped_file_get_length (mfile);
|
size_t len = g_mapped_file_get_length (mfile);
|
||||||
|
|
||||||
if (!validate_header_basic (data, len, error))
|
if (!validate_header_basic (data, len, error))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@@ -38,12 +38,12 @@ typedef struct _GITypelib GITypelib;
|
|||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GITypelib * gi_typelib_new_from_memory (uint8_t *memory,
|
GITypelib * gi_typelib_new_from_memory (uint8_t *memory,
|
||||||
gsize len,
|
size_t len,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
GITypelib * gi_typelib_new_from_const_memory (const uint8_t *memory,
|
GITypelib * gi_typelib_new_from_const_memory (const uint8_t *memory,
|
||||||
gsize len,
|
size_t len,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
|
@@ -133,7 +133,7 @@ union _GIArgument
|
|||||||
long v_long;
|
long v_long;
|
||||||
unsigned long v_ulong;
|
unsigned long v_ulong;
|
||||||
gssize v_ssize;
|
gssize v_ssize;
|
||||||
gsize v_size;
|
size_t v_size;
|
||||||
char *v_string;
|
char *v_string;
|
||||||
void *v_pointer;
|
void *v_pointer;
|
||||||
};
|
};
|
||||||
|
@@ -260,7 +260,7 @@ gi_union_info_find_method (GIUnionInfo *info,
|
|||||||
* Returns: size of the union, in bytes
|
* Returns: size of the union, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_union_info_get_size (GIUnionInfo *info)
|
gi_union_info_get_size (GIUnionInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
@@ -278,7 +278,7 @@ gi_union_info_get_size (GIUnionInfo *info)
|
|||||||
* Returns: required alignment, in bytes
|
* Returns: required alignment, in bytes
|
||||||
* Since: 2.80
|
* Since: 2.80
|
||||||
*/
|
*/
|
||||||
gsize
|
size_t
|
||||||
gi_union_info_get_alignment (GIUnionInfo *info)
|
gi_union_info_get_alignment (GIUnionInfo *info)
|
||||||
{
|
{
|
||||||
GIRealInfo *rinfo = (GIRealInfo *)info;
|
GIRealInfo *rinfo = (GIRealInfo *)info;
|
||||||
|
@@ -75,10 +75,10 @@ GIFunctionInfo * gi_union_info_find_method (GIUnionInfo *info,
|
|||||||
const char *name);
|
const char *name);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_union_info_get_size (GIUnionInfo *info);
|
size_t gi_union_info_get_size (GIUnionInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
gsize gi_union_info_get_alignment (GIUnionInfo *info);
|
size_t gi_union_info_get_alignment (GIUnionInfo *info);
|
||||||
|
|
||||||
GI_AVAILABLE_IN_ALL
|
GI_AVAILABLE_IN_ALL
|
||||||
const char * gi_union_info_get_copy_function_name (GIUnionInfo *info);
|
const char * gi_union_info_get_copy_function_name (GIUnionInfo *info);
|
||||||
|
@@ -341,9 +341,9 @@ gboolean
|
|||||||
gi_vfunc_info_invoke (GIVFuncInfo *info,
|
gi_vfunc_info_invoke (GIVFuncInfo *info,
|
||||||
GType implementor,
|
GType implementor,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
|
@@ -64,9 +64,9 @@ GI_AVAILABLE_IN_ALL
|
|||||||
gboolean gi_vfunc_info_invoke (GIVFuncInfo *info,
|
gboolean gi_vfunc_info_invoke (GIVFuncInfo *info,
|
||||||
GType implementor,
|
GType implementor,
|
||||||
const GIArgument *in_args,
|
const GIArgument *in_args,
|
||||||
gsize n_in_args,
|
size_t n_in_args,
|
||||||
GIArgument *out_args,
|
GIArgument *out_args,
|
||||||
gsize n_out_args,
|
size_t n_out_args,
|
||||||
GIArgument *return_value,
|
GIArgument *return_value,
|
||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user