summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: Add a Parameter.name propertyPhilip Withnall2015-09-291-0/+4
| | | | | | | This is an alias of Parameter.argname, which makes it easier to duck-type debugging of AST nodes by printing out their name property. https://bugzilla.gnome.org/show_bug.cgi?id=747979
* giscanner: Store direction in TypeContainer instancePhilip Withnall2015-09-291-5/+5
| | | | | | | | Instead of storing a direction property on both Parameter and Return separately, hoist it up to TypeContainer so it’s inherited. This neatens things up a bit, but doesn’t really change anything in practice. https://bugzilla.gnome.org/show_bug.cgi?id=747979
* giscanner: Store parent link in AST for TypeContainer instancesPhilip Withnall2015-09-292-0/+35
| | | | | | | | | | It is useful for navigating the AST to have a link from each TypeContainer instance (e.g. each Parameter and Return) to the parent AST node, such as a Function. This will be used in the g-ir-diff tool. https://bugzilla.gnome.org/show_bug.cgi?id=747979
* scanner: Fix allow-none on return valuesGarrett Regier2015-09-2911-2/+236
| | | | | | | | The optional annotation was being applied which is invalid for return values. https://bugzilla.gnome.org/show_bug.cgi?id=752029 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* g-ir-compiler: Allow multiple --shared-libraryGarrett Regier2015-09-291-4/+4
| | | | | https://bugzilla.gnome.org/show_bug.cgi?id=744535 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* docs: fix manpage flag formatsBen Boeckel2015-09-292-8/+8
| | | | Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
* tests: Fix python2/3 difference with respect to rawunicodeescapeColin Walters2015-09-291-1/+1
| | | | | Apparently Python 2 still tries to interpret r"\u" in some circumstances?
* scanner: Pacify PEP8Colin Walters2015-09-294-5/+7
|
* tests/warn: Fix test for previous GVariant floating commitColin Walters2015-09-291-1/+1
|
* Change update-glib-annotations to use Python 3Simon Feltman2015-09-291-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=679438
* configure.ac: Add --with-python configure flagSimon Feltman2015-09-291-0/+13
| | | | | | | Add --with-python flag which overrides the $PYTHON environment variable when used. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Sort unknown parameters in error messageSimon Feltman2015-09-291-1/+2
| | | | | | | | | | Sort the parameters displayed for the "unknown parameters" error message. The parameter names are stored in a set which returns a different ordering between Python 2 and 3 (set/dict ordering should not be relied upon anyhow). This fixes test failures in warning tests. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use rich comparison methods for Python 3 compatibilitySimon Feltman2015-09-294-35/+173
| | | | | | | | | | Add lt, le, gt, ge, eq, ne, and hash dunder methods to all classes that implement custom comparisons with __cmp__. This is needed to support Python 3 compatible sorting of instances of these classes. Avoid using @functools.total_ordering which does not work for some of these classes and also is not available in Python 2.6. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* docwriter: Update for Python 3 compatibilitySimon Feltman2015-09-291-12/+11
| | | | | | | | | Convert the results of various filter() calls to lists. This is needed because filter() returns a generator in Python 3 and len() checks are used on the results (which doesn't work on a generator). Explicitly open resulting files for output in binary mode. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Update namespace sort for Python 3 compatibilitySimon Feltman2015-09-291-7/+10
| | | | | | | | Use key function instead of cmp for list.sort which is compatible with both Python 2 and 3. Make sure a list is returned from split function. Don't use identity comparison "is" on strings. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Encode sha1 input for Python 3 compatibilitySimon Feltman2015-09-291-2/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Encode data passed to subprocess.stdin.writeSimon Feltman2015-09-291-3/+2
| | | | | | | ASCII encode bytes sent to subprocess.stdin.write to ensure Python 2 and 3 compatibility. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Decode command output for Python 3 compatibilitySimon Feltman2015-09-293-1/+4
| | | | | | | Decode the output of various subprocess calls assuming ascii encoding. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use StringIO instead of cStringIO in Python 2Simon Feltman2015-09-293-12/+34
| | | | | | | | | | | | Replace usage of the Python 2 cStringIO module with StringIO and conditionally use io.StringIO for Python 3. This is needed to build up a unicode version of the XML since cStringIO does not support unicode. Add XMLWriter.get_encoded_xml() which returns a utf-8 encoded bytes object of the XML data. Open files for reading/writing in binary mode since we explicitly encode and decode as utf-8. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use builtins module in Python 3Simon Feltman2015-09-293-6/+18
| | | | | | Add conditional import for Python 3's renamed builtins module. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use pickle when cPickle is not availableSimon Feltman2015-09-291-6/+10
| | | | | | | | This adds compatibility with Python 3 which removed the cPickle module. Explicitly use binary files for reading and writing the cache. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Port scanner extension module to work with Python 3Simon Feltman2015-09-292-30/+77
| | | | | | | | | Define portable macros for use between Python 2 and 3. Replace usage of PyString related functions with PyBytes. Update pygi_source_scanner_parse_macros to support both PyBytes and PyUnicode. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use unicode literals in all Python filesSimon Feltman2015-09-2934-41/+139
| | | | | | | | | | | | Add unicode_literals future import which turns any string literal into a unicode string. Return unicode strings from the Python C extension module. Force writing of annotations (g-ir-annotation-tool) to output utf8 encoded data to stdout. This is an initial pass at following the "unicode sandwich" model of programming (http://nedbatchelder.com/text/unipain.html) needed for supporting Python 3. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Replace repr format usage with string formatterSimon Feltman2015-09-2910-51/+52
| | | | | | | | | | | Replace occurances of "%r" (repr) in format strings where the intended behaviour is to output a quoted string "'foo'" with explicit usage of "'%s'". This is needed to move the codebase to unicode literals in order to upgrade to Python 3. Python 2 unicode strings are expanded with repr formatting prefixed with a "u" as in "u'foo'" which causes failures for various text formatting scenarios. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use print as a function for Python 3 compatibilitySimon Feltman2015-09-2933-30/+65
| | | | | | | Use future import "print_function" and update relevant uses of print as a function call. See: PEP 3105 https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Enable "true division" for all Python filesSimon Feltman2015-09-2932-0/+32
| | | | | | | | | | Import Python 3 compatible "true division" from the future (PEP 238). This changes the Python 2 classic division which uses floor division on integers to true division. Verfied we don't actually use the division operator anywhere in the code base so this a safety for supporting both Python 2 and 3. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use absolute_import for all Python filesSimon Feltman2015-09-2932-3/+53
| | | | | | Use absolute_import to ensure Python 3 compatibility of the code base. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use items() instead of iteritems()Simon Feltman2015-09-299-23/+23
| | | | | | | Replace usage of iteritems() and itervalues() with items() and values() respectively. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Convert map() results to listSimon Feltman2015-09-293-6/+6
| | | | | | | | Convert the results map() calls to a list for Python 3 compatibility. In Python 3, map() returns an iterable "map object" which does not allow indexing or iteration more than once. https://bugzilla.gnome.org/show_bug.cgi?id=679438
* giscanner: Use binary files for comparison utilitySimon Feltman2015-09-291-1/+1
| | | | | | | Explicitly open files for comparison in utils.files_are_identical() in binary mode for reading (rb). https://bugzilla.gnome.org/show_bug.cgi?id=679438
* scanner: Explicitly error with constructors but no GObject includeColin Walters2015-09-292-1/+7
| | | | | One of the Anaconda developers hit this; the fix was to include GObject, but without this commit we just traceback'd.
* tests: Add expected files for previous commitColin Walters2015-09-283-0/+94
|
* scanner: GVariants are also valid to be floatingColin Walters2015-09-285-2/+24
| | | | More followup to https://bugzilla.gnome.org/show_bug.cgi?id=752047
* scanner: Tweak "invalid transfer" warning to show type tooColin Walters2015-09-272-12/+12
| | | | Should help debugging.
* scanner: Warn and ignore on incorrect transfer annotationsColin Walters2015-09-277-34/+117
| | | | This reverts commit 232f3c831260f596e36159112292897962a505b4.
* giscanner: fix alias resolutionGiovanni Campagna2015-09-271-1/+1
| | | | | | | | | | | | | | | Atk has a "typedef GSList AtkAttributeSet", which causes an ast.Alias() targeting a ast.List(). The latter has a target_fundamental of '<list>', which cannot be looked up in ast.type_names (because it's not a real fundamental type), and that breaks the build. It turns out that we don't need to find the fundamental type and then the fundamental type node - the target field of the ast.Alias already points to the desired type node. https://bugzilla.gnome.org/show_bug.cgi?id=755681
* Revert "scanner: Warn and ignore on incorrect transfer annotations"Michael Catanzaro2015-09-277-117/+34
| | | | | | It broke at least atk and mutter. This reverts commit 5ae7bd58b6266997b61d897ad6562118eeb59210.
* scanner: Warn and ignore on incorrect transfer annotationsGarrett Regier2015-09-267-34/+117
| | | | | | | | This is an issue in various code bases and tends to confuse newcomers. https://bugzilla.gnome.org/show_bug.cgi?id=752047 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* girepository: Add missing includeColin Walters2015-09-261-0/+1
| | | | For previous commit.
* gitypeinfo: Expand documentation for g_type_info_is_pointer()Philip Withnall2015-09-261-0/+5
| | | | | | | | Note that (direction [in]out) parameters are only pointers if the underlying type being transferred is a pointer, i.e. if the formal parameter is a pointer to a pointer or deeper. https://bugzilla.gnome.org/show_bug.cgi?id=720201
* MSVC Builds: "Add" Visual Studio 2015 ProjectsChun-wei Fan2015-09-256-16/+54
| | | | | | | | Update the common autotools module that was used to create the Visual Studio 2012/2013 projects so that we can create the 2015 projects as well. The 2015 projects, like the 2012 and 2013 ones are largely similar to the 2010 ones in format, so we just need to copy the 2010 projects and replace the items in there as needed.
* Clean Up Visual Studio Project GenerationChun-wei Fan2015-09-255-179/+79
| | | | | | | | This makes use of the common autotools modules that was just added so that there would need to be less items in g-i's main Makefile-msvcproj.am, so that we can generate the complete Visual Studio 2008/2010 project files (which will then be used to obtain the Visual Studio 2012 and 2013 projects) and the property sheets to "install" the built binaries and headers.
* build: Add Common Autotools Module for MSVC ProjectsChun-wei Fan2015-09-251-0/+107
| | | | | | | | | | This adds a common autotools module that can be used by various projects to generate the Visual Studio projects as needed, and if necessary, generate the headers listings to "install" for that project, based on items passed in to this. This is modelled on the Makefile.introspection autotools file that is used by many GNOME projects to generate the introspection files. https://bugzilla.gnome.org/show_bug.cgi?id=753555
* gen-win32-cairo-gir.py: Fix From Last CommitChun-wei Fan2015-09-251-4/+4
| | | | The cairo-1.0.gir should be generated in build/, not gir/, for our purposes
* MSVC Introspection NMake Makefile: Make Message ClearerChun-wei Fan2015-09-251-1/+1
|
* MSVC Builds: Use the Shared replace.py ScriptChun-wei Fan2015-09-255-44/+139
| | | | | | ...which can be copied from GLib's $(srcroot)/build/win32, so the maintenance of these scripts that generate the needed tool scripts and cairo-1.0.gir can be easier maintained.
* libgirepository: Refuse to run in setuid applicationsColin Walters2015-09-242-1/+13
| | | | | | | | We know of at least one privilege escalation path via `GI_TYPELIB_PATH`. I don't want to audit for others. If someone shows up with a use case we can talk. https://bugzilla.gnome.org/show_bug.cgi?id=755472
* Update glib annotations from git masterRico Tzschichholz2015-09-233-23/+37
|
* Release GObject-Introspection 1.46.01.46.0gnome-3-18Emmanuele Bassi2015-09-221-2/+2
|
* Update glib annotations from git masterRico Tzschichholz2015-09-142-7/+20
|