Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 601594 Details for
Bug 841596
ValueError: invalid enum value: 4294967296
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Work in progress patch to fix enum issues on 64-bit bigendian archs
fix-enums.patch (text/plain), 2.87 KB, created by
Dave Malcolm
on 2012-07-31 21:30:25 UTC
(
hide
)
Description:
Work in progress patch to fix enum issues on 64-bit bigendian archs
Filename:
MIME Type:
Creator:
Dave Malcolm
Created:
2012-07-31 21:30:25 UTC
Size:
2.87 KB
patch
obsolete
>diff --git a/gi/pygi-marshal-from-py.c b/gi/pygi-marshal-from-py.c >index abdc49e..ac8c586 100644 >--- a/gi/pygi-marshal-from-py.c >+++ b/gi/pygi-marshal-from-py.c >@@ -1275,26 +1275,72 @@ _pygi_marshal_from_py_interface_callback (PyGIInvokeState *state, > } > > gboolean >+gi_argument_from_c_long(GIArgument *arg, >+ long c_long, >+ GITypeTag type_tag) >+{ >+ switch (type_tag) { >+ case GI_TYPE_TAG_INT8: >+ arg->v_int8 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_UINT8: >+ arg->v_uint8 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_INT16: >+ arg->v_int16 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_UINT16: >+ arg->v_uint16 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_INT32: >+ arg->v_int32 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_UINT32: >+ arg->v_uint32 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_INT64: >+ arg->v_int64 = c_long; >+ return TRUE; >+ case GI_TYPE_TAG_UINT64: >+ arg->v_uint64 = c_long; >+ return TRUE; >+ default: >+ return FALSE; >+ } >+} >+ >+gboolean > _pygi_marshal_from_py_interface_enum (PyGIInvokeState *state, > PyGICallableCache *callable_cache, > PyGIArgCache *arg_cache, > PyObject *py_arg, > GIArgument *arg) > { >- PyObject *int_; >+ PyObject *py_long; >+ long c_long; > gint is_instance; > PyGIInterfaceCache *iface_cache = (PyGIInterfaceCache *)arg_cache; >+ GIBaseInfo *interface; > > is_instance = PyObject_IsInstance (py_arg, iface_cache->py_type); > >- int_ = PYGLIB_PyNumber_Long (py_arg); >- if (int_ == NULL) { >+ py_long = PYGLIB_PyNumber_Long (py_arg); >+ if (py_long == NULL) { > PyErr_Clear(); > goto err; > } > >- arg->v_long = PYGLIB_PyLong_AsLong (int_); >- Py_DECREF (int_); >+ c_long = PYGLIB_PyLong_AsLong (py_long); >+ Py_DECREF (py_long); >+ >+ interface = g_type_info_get_interface (arg_cache->type_info); >+ assert(g_base_info_get_type (interface) == GI_INFO_TYPE_ENUM); >+ if (!gi_argument_from_c_long(arg, >+ c_long, >+ g_enum_info_get_storage_type ((GIEnumInfo *)interface))) { >+ g_assert_not_reached(); >+ return FALSE; >+ } > > /* If this is not an instance of the Enum type that we want > * we need to check if the value is equivilant to one of the >@@ -1308,7 +1354,7 @@ _pygi_marshal_from_py_interface_enum (PyGIInvokeState *state, > g_enum_info_get_value (iface_cache->interface_info, i); > glong enum_value = g_value_info_get_value (value_info); > g_base_info_unref ( (GIBaseInfo *)value_info); >- if (arg->v_long == enum_value) { >+ if (c_long == enum_value) { > is_found = TRUE; > break; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 841596
:
601594
|
601820
|
603090
|
603367
|
603634