diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:48:01 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:48:04 +0900 |
commit | d80fc1d31f28c6bcf9ea34b253e8765321616c3c (patch) | |
tree | 53afc44a25c72df0a698294b6be95695dfa643ba /gi/pygi-marshal-from-py.c | |
parent | 52620756e3ccf2925e140a254d340d3ba29f3ad5 (diff) | |
download | pygobject2-d80fc1d31f28c6bcf9ea34b253e8765321616c3c.tar.gz pygobject2-d80fc1d31f28c6bcf9ea34b253e8765321616c3c.tar.bz2 pygobject2-d80fc1d31f28c6bcf9ea34b253e8765321616c3c.zip |
Imported Upstream version 3.7.1
Change-Id: I4c5c3aae69e883da127f15b41c102f953e8cc74c
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/pygi-marshal-from-py.c')
-rw-r--r-- | gi/pygi-marshal-from-py.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c index c20e023..b4c9fa0 100644 --- a/gi/pygi-marshal-from-py.c +++ b/gi/pygi-marshal-from-py.c @@ -40,39 +40,11 @@ gi_argument_from_py_ssize_t (GIArgument *arg_out, switch (type_tag) { case GI_TYPE_TAG_VOID: case GI_TYPE_TAG_BOOLEAN: - goto unhandled_type; - case GI_TYPE_TAG_INT8: - if (size_in >= G_MININT8 && size_in <= G_MAXINT8) { - arg_out->v_int8 = size_in; - return TRUE; - } else { - goto overflow; - } - case GI_TYPE_TAG_UINT8: - if (size_in >= 0 && size_in <= G_MAXUINT8) { - arg_out->v_uint8 = size_in; - return TRUE; - } else { - goto overflow; - } - case GI_TYPE_TAG_INT16: - if (size_in >= G_MININT16 && size_in <= G_MAXINT16) { - arg_out->v_int16 = size_in; - return TRUE; - } else { - goto overflow; - } - case GI_TYPE_TAG_UINT16: - if (size_in >= 0 && size_in <= G_MAXUINT16) { - arg_out->v_uint16 = size_in; - return TRUE; - } else { - goto overflow; - } + goto unhandled_type; /* Ranges assume two's complement */ case GI_TYPE_TAG_INT32: @@ -930,7 +902,6 @@ _pygi_marshal_from_py_array (PyGIInvokeState *state, if (sequence_cache->item_cache->type_tag == GI_TYPE_TAG_UINT8 && PYGLIB_PyBytes_Check (py_arg)) { memcpy(array_->data, PYGLIB_PyBytes_AsString (py_arg), length); - array_->len = length; if (sequence_cache->is_zero_terminated) { /* If array_ has been created with zero_termination, space for the * terminator is properly allocated, so we're not off-by-one here. */ |