[pygobject/invoke-rewrite] use gssize instead of int for arg indexes
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/invoke-rewrite] use gssize instead of int for arg indexes
- Date: Tue, 5 Jul 2011 19:57:57 +0000 (UTC)
commit 5c04fc5b2ca7e262c052426d5863d69d0c4a24da
Author: John (J5) Palmieri <johnp redhat com>
Date: Tue Jul 5 15:57:23 2011 -0400
use gssize instead of int for arg indexes
gi/pygi-cache.c | 24 ++++++++++++------------
gi/pygi-cache.h | 6 +++---
gi/pygi-invoke-ng.c | 6 +++---
gi/pygi-marshal-cleanup.c | 6 +++---
4 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/gi/pygi-cache.c b/gi/pygi-cache.c
index 075ec86..caa2ebe 100644
--- a/gi/pygi-cache.c
+++ b/gi/pygi-cache.c
@@ -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);
diff --git a/gi/pygi-cache.h b/gi/pygi-cache.h
index f0cfb00..70dfa7f 100644
--- a/gi/pygi-cache.h
+++ b/gi/pygi-cache.h
@@ -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;
diff --git a/gi/pygi-invoke-ng.c b/gi/pygi-invoke-ng.c
index cc61308..ca63dba 100644
--- a/gi/pygi-invoke-ng.c
+++ b/gi/pygi-invoke-ng.c
@@ -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);
diff --git a/gi/pygi-marshal-cleanup.c b/gi/pygi-marshal-cleanup.c
index 21e7db5..cd072f4 100644
--- a/gi/pygi-marshal-cleanup.c
+++ b/gi/pygi-marshal-cleanup.c
@@ -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++) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]