girepository: Use uint8_t pointers instead of guchar

This commit is contained in:
Marco Trevisan (Treviño) 2024-01-16 00:10:43 +01:00
parent e3aac4281d
commit c8aecbb834
6 changed files with 10 additions and 10 deletions

View File

@ -37,7 +37,7 @@ struct _GIIrTypelibBuild {
GHashTable *types; GHashTable *types;
GList *nodes_with_attributes; GList *nodes_with_attributes;
uint32_t n_attributes; uint32_t n_attributes;
guchar *data; uint8_t *data;
GList *stack; GList *stack;
}; };

View File

@ -191,7 +191,7 @@ gi_ir_module_add_include_module (GIIrModule *module,
struct AttributeWriteData struct AttributeWriteData
{ {
unsigned int count; unsigned int count;
guchar *databuf; uint8_t *databuf;
GIIrNode *node; GIIrNode *node;
GHashTable *strings; GHashTable *strings;
uint32_t *offset; uint32_t *offset;
@ -218,7 +218,7 @@ static unsigned
write_attributes (GIIrModule *module, write_attributes (GIIrModule *module,
GIIrNode *node, GIIrNode *node,
GHashTable *strings, GHashTable *strings,
guchar *data, uint8_t *data,
uint32_t *offset, uint32_t *offset,
uint32_t *offset2) uint32_t *offset2)
{ {

View File

@ -381,7 +381,7 @@ void gi_ir_node_add_member (GIIrNode *node,
GIIrNodeFunction *member); GIIrNodeFunction *member);
uint32_t gi_ir_write_string (const char *str, uint32_t gi_ir_write_string (const char *str,
GHashTable *strings, GHashTable *strings,
guchar *data, uint8_t *data,
uint32_t *offset); uint32_t *offset);
const char * gi_ir_node_param_direction_string (GIIrNodeParam * node); const char * gi_ir_node_param_direction_string (GIIrNodeParam * node);

View File

@ -1405,7 +1405,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
gboolean appended_stack; gboolean appended_stack;
GHashTable *strings = build->strings; GHashTable *strings = build->strings;
GHashTable *types = build->types; GHashTable *types = build->types;
guchar *data = build->data; uint8_t *data = build->data;
GList *l; GList *l;
uint32_t old_offset = *offset; uint32_t old_offset = *offset;
uint32_t old_offset2 = *offset2; uint32_t old_offset2 = *offset2;
@ -2414,7 +2414,7 @@ gi_ir_node_build_typelib (GIIrNode *node,
uint32_t uint32_t
gi_ir_write_string (const char *str, gi_ir_write_string (const char *str,
GHashTable *strings, GHashTable *strings,
guchar *data, uint8_t *data,
uint32_t *offset) uint32_t *offset)
{ {
uint32_t start; uint32_t start;

View File

@ -1313,7 +1313,7 @@ typedef struct {
struct _GITypelib { struct _GITypelib {
/*< private >*/ /*< private >*/
guchar *data; uint8_t *data;
gsize len; gsize len;
gboolean owns_memory; gboolean owns_memory;
GMappedFile *mfile; GMappedFile *mfile;

View File

@ -522,7 +522,7 @@ get_string_nofail (GITypelib *typelib, uint32_t offset)
static gboolean static gboolean
validate_name (GITypelib *typelib, validate_name (GITypelib *typelib,
const char *msg, const char *msg,
const guchar *data, const uint8_t *data,
uint32_t offset, uint32_t offset,
GError **error) GError **error)
{ {
@ -2439,7 +2439,7 @@ gi_typelib_new_from_memory (uint8_t *memory,
* Since: 2.80 * Since: 2.80
*/ */
GITypelib * GITypelib *
gi_typelib_new_from_const_memory (const guchar *memory, gi_typelib_new_from_const_memory (const uint8_t *memory,
gsize len, gsize len,
GError **error) GError **error)
{ {
@ -2449,7 +2449,7 @@ gi_typelib_new_from_const_memory (const guchar *memory,
return NULL; return NULL;
meta = g_slice_new0 (GITypelib); meta = g_slice_new0 (GITypelib);
meta->data = (guchar *) memory; meta->data = (uint8_t *) memory;
meta->len = len; meta->len = len;
meta->owns_memory = FALSE; meta->owns_memory = FALSE;
meta->modules = NULL; meta->modules = NULL;