Specify prototypes for used X11 C functions#12
Open
jfilak wants to merge 7 commits intomozeq:masterfrom
Open
Conversation
added 2 commits
July 29, 2015 14:43
Python does not magically resolve types of C functions imported through ctypes. Without specifying their prototypes the return type of all functions is c_int and all Python int arguments are converted to C int arguments. The return type of XOpenDisplay is 'Display *', so the correct return type is 'c_void_p'. The argument type of XCloseDisplay is 'Display *', so the correct argument type is 'c_void_p' too. Without this patch, the pointers returned from XOpenDisplay and passed to XCloseDisplay are truncated to int, which is shorter than 'void *' on some architectures, and that causes unpredicted behavior which leads to a crash. Related: bugzilla.redhat.com/1244261 Signed-off-by: Jakub Filak <jfilak@redhat.com>
Contributor
Author
|
I added a new commit related to https://bugzilla.redhat.com/show_bug.cgi?id=1194976 |
added 5 commits
August 24, 2015 10:23
The environment variable is not documented (or at least I cannot find any official documentation), the environment variable is used by all major Dekstop vendors though (just try to ask google to search for its name). Related rhbz#1194976 Signed-off-by: Jakub Filak <jfilak@redhat.com>
As suggested by PyGIWarning:
/usr/lib/python3.4/site-packages/pyfros/controls.py:22: PyGIWarning:
Gtk was imported without specifying a version first. Use
gi.require_version('Gtk', '3.0') before import to ensure that the
right version gets loaded.
from gi.repository import Gtk
Signed-off-by: Jakub Filak <jfilak@redhat.com>
Related: rhbz#1197607, rhbz#1197997, rhbz#1199242 Signed-off-by: Jakub Filak <jfilak@redhat.com>
Related: rhbz#1228860 Signed-off-by: Jakub Filak <jfilak@redhat.com>
Related: rhbz#1248831 Signed-off-by: Jakub Filak <jfilak@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.