Commit 5c04fc5b authored by John (J5) Palmieri's avatar John (J5) Palmieri

use gssize instead of int for arg indexes

parent ecc09749
......@@ -32,8 +32,8 @@ PyGIArgCache * _arg_cache_new_from_type_info (GITypeInfo *type_info,
GITypeTag type_tag,
GITransfer transfer,
GIDirection direction,
gint c_arg_index,
gint py_arg_index);
gssize c_arg_index,
gssize py_arg_index);
/* cleanup */
void
......@@ -96,7 +96,7 @@ _callback_cache_free_func (PyGICallbackCache *cache)
void
_pygi_callable_cache_free (PyGICallableCache *cache)
{
int i;
gssize i;
if (cache == NULL)
return;
......@@ -162,7 +162,7 @@ static inline PyGISequenceCache *
_sequence_cache_new_from_type_info (GITypeInfo *type_info,
GIDirection direction,
GITransfer transfer,
gint aux_offset)
gssize aux_offset)
{
PyGISequenceCache *sc;
GITypeInfo *item_type_info;
......@@ -266,7 +266,7 @@ _hash_cache_new_from_type_info (GITypeInfo *type_info,
static inline PyGICallbackCache *
_callback_cache_new_from_arg_info (GIArgInfo *arg_info,
GIInterfaceInfo *iface_info,
gint aux_offset)
gssize aux_offset)
{
PyGICallbackCache *cc;
......@@ -744,8 +744,8 @@ _arg_cache_new_from_interface_info (GIInterfaceInfo *iface_info,
GIInfoType info_type,
GITransfer transfer,
GIDirection direction,
gint c_arg_index,
gint py_arg_index)
gssize c_arg_index,
gssize py_arg_index)
{
PyGIInterfaceCache *iface_cache = NULL;
PyGIArgCache *arg_cache = NULL;
......@@ -869,8 +869,8 @@ _arg_cache_new_from_type_info (GITypeInfo *type_info,
GITypeTag type_tag,
GITransfer transfer,
GIDirection direction,
gint c_arg_index,
gint py_arg_index)
gssize c_arg_index,
gssize py_arg_index)
{
PyGIArgCache *arg_cache = NULL;
......@@ -1224,8 +1224,8 @@ static inline gboolean
_args_cache_generate (GICallableInfo *callable_info,
PyGICallableCache *callable_cache)
{
int arg_index = 0;
int i;
gssize arg_index = 0;
gssize i;
GITypeInfo *return_info;
GITypeTag return_type_tag;
GITransfer return_transfer;
......@@ -1290,7 +1290,7 @@ _args_cache_generate (GICallableInfo *callable_info,
GITransfer transfer;
GITypeTag type_tag;
gboolean is_caller_allocates = FALSE;
gint py_arg_index = -1;
gssize py_arg_index = -1;
arg_info =
g_callable_info_get_arg (callable_info, i);
......
......@@ -85,7 +85,7 @@ typedef struct _PyGISequenceCache
{
PyGIArgCache arg_cache;
gssize fixed_size;
gint len_arg_index;
gssize len_arg_index;
gboolean is_zero_terminated;
gsize item_size;
GIArrayType array_type;
......@@ -112,8 +112,8 @@ typedef struct _PyGIHashCache
typedef struct _PyGICallbackCache
{
PyGIArgCache arg_cache;
gint user_data_index;
gint destroy_notify_index;
gssize user_data_index;
gssize destroy_notify_index;
GIScopeType scope;
GIInterfaceInfo *interface_info;
} PyGICallbackCache;
......
......@@ -181,7 +181,7 @@ _invoke_state_clear (PyGIInvokeState *state, PyGICallableCache *cache)
static inline gboolean
_invoke_marshal_in_args (PyGIInvokeState *state, PyGICallableCache *cache)
{
int i, in_count, out_count;
gssize i, in_count, out_count;
in_count = 0;
out_count = 0;
......@@ -329,7 +329,7 @@ _invoke_marshal_out_args (PyGIInvokeState *state, PyGICallableCache *cache)
{
PyObject *py_out = NULL;
PyObject *py_return = NULL;
int total_out_args = cache->n_out_args;
gssize total_out_args = cache->n_out_args;
gboolean has_return = FALSE;
if (cache->return_cache) {
......@@ -379,7 +379,7 @@ _invoke_marshal_out_args (PyGIInvokeState *state, PyGICallableCache *cache)
}
} else {
int py_arg_index = 0;
gssize py_arg_index = 0;
GSList *cache_item = cache->out_args;
/* return a tuple */
py_out = PyTuple_New (total_out_args);
......
......@@ -81,7 +81,7 @@ void
pygi_marshal_cleanup_args_in_marshal_success (PyGIInvokeState *state,
PyGICallableCache *cache)
{
gsize i;
gssize i;
/* For in success, call cleanup for all GI_DIRECTION_IN values only. */
for (i = 0; i < cache->n_args; i++) {
......@@ -131,7 +131,7 @@ pygi_marshal_cleanup_args_in_parameter_fail (PyGIInvokeState *state,
PyGICallableCache *cache,
gssize failed_arg_index)
{
gsize i;
gssize i;
state->failed = TRUE;
......@@ -352,7 +352,7 @@ _pygi_marshal_cleanup_out_array (PyGIInvokeState *state,
}
if (sequence_cache->item_cache->out_cleanup != NULL) {
int i;
gsize i;
PyGIMarshalCleanupFunc cleanup_func = sequence_cache->item_cache->out_cleanup;
for (i = 0; i < array_->len; i++) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment