[pygobject/invoke-rewrite] [gi] fix casting when marshaling a char to uint8



commit 88531c58d0491a31dd319387237a03df5c9edc07
Author: John (J5) Palmieri <johnp redhat com>
Date:   Mon Jan 10 15:33:56 2011 -0500

    [gi] fix casting when marshaling a char to uint8

 gi/pygi-argument.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index 80f1819..126a68f 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -2071,7 +2071,7 @@ _pygi_marshal_in_uint8 (PyGIInvokeState   *state,
             return FALSE;
         }
 
-        long_ = (long)(PYGLIB_PyBytes_AsString(py_arg)[0]);
+        long_ = (unsigned char)(PYGLIB_PyBytes_AsString(py_arg)[0]);
 
     } else if (PyNumber_Check(py_arg)) {
         PyObject *py_long;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]