summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Release 1.47.11.47.1Colin Walters2015-11-011-2/+2
|
* Update GLib annotations for 2.47.1Colin Walters2015-11-011-291/+193
|
* giscanner/transformer.py: Fix --identifier-filter on Python 3.xChun-wei Fan2015-10-281-1/+2
| | | | | | | We need to encode the identifier-filter command to bytes, and decode its outputs to ascii in order for it to work on Python 3.x. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* giscanner/dumper.py: Fix for Python 3.x for MSVC 2010+Chun-wei Fan2015-10-281-1/+2
| | | | | | | | sys.exc_clear(), which was called when we need to ignore the error when we can't embed manifests to the dumper program on MSVC 2010 and later, is only available/needed for Python 2.7.x, so only use it there. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* giscanner/ccompiler.py: Make Windows builds work with Python 3.xChun-wei Fan2015-10-281-2/+2
| | | | | | | | | | Windows builds check the library that was passed into the introspection scanner to deduce the correct DLL that is to be used by the .gir/.typelib file, but this was not updated for Python 2.x/3.x compatibility, as the outputs of a subprocess must be decoded. Fix this for both MSVC and MinGW-based builds. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* giscanner/msvccompiler.py: Make it compatible with Python 3.xChun-wei Fan2015-10-281-2/+2
| | | | | | This is checked for Python 2.7.x compatibility as well. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* tools: Windows-re-enable 'relocatability' for tool templateChun-wei Fan2015-10-281-2/+2
| | | | | | | | The transition to Python 3.x compatibility accidentily removed the 'relocatability' support that was added, so re-enable this support on Windows again. https://bugzilla.gnome.org/show_bug.cgi?id=757126
* MSVC release builds: Ensure that /LTCG is usedChun-wei Fan2015-10-285-4/+14
| | | | | | | | | MSVC 2015 changed its default link-time code generation setting to /LTCG:incremental, which causes problems if /opt:noref is to be used, meaning that some code will be optimized out by the linker. Avoid this situtation here by enforcing the use of /LTCG for MSVC 2010+ builds.
* gir: Update annotations from GLib git masterRico Tzschichholz2015-10-252-1/+316
|
* scanner: Fix non-libtool linker flags on DarwinPhilip Chimento2015-10-201-3/+4
| | | | | | | | | Darwin's linker doesn't like "-rpath=path"; instead pass "-rpath path", which works on more linkers than the version with the = sign does. Additionally, Darwin's linker has no equivalent for "--no-as-needed" (it seems to do the right thing by default?) https://bugzilla.gnome.org/show_bug.cgi?id=625195
* tests: Usage a single allocation for test_ghash_gvalue_returnSimon Feltman2015-10-191-22/+26
| | | | | | | | Use a single static allocation for the hash created in regress_test_ghash_gvalue_return(). This function is explicitly marked as returning the hash with transfer-none and doesn't need to re-create the hash each call. https://bugzilla.gnome.org/show_bug.cgi?id=736517
* tests: Free input array in test_array_int_inout()Simon Feltman2015-10-191-0/+2
| | | | | | Transfer is annotated as full so the function should free its input. https://bugzilla.gnome.org/show_bug.cgi?id=736517
* tests: Free input string in regress_test_utf8_inout()Simon Feltman2015-10-191-0/+1
| | | | | | | Transfer is annotated as full so the function should free its input after testing and before output assignment. https://bugzilla.gnome.org/show_bug.cgi?id=736517
* tests: Unref async result after adding to idle callbackSimon Feltman2015-10-191-0/+1
| | | | | | | | g_simple_async_result_complete_in_idle() will add its own reference for managing the async result. We need to unref the result after calling this so we don't leak. https://bugzilla.gnome.org/show_bug.cgi?id=736517
* Add support for function typedefs without pointerBen Iofel2015-10-1911-2/+224
| | | | | | | | | | g-ir-scanner now supports something like this: typedef void my_callback(int); Notice how my_callback is not a pointer. https://bugzilla.gnome.org/show_bug.cgi?id=755645
* giscanner: Fix python2/3 compatibilityDamien Grassart2015-10-193-8/+8
| | | | | | | This allows building in both Python 2 and 3 by fixing a few text/binary ambiguities and using "as" in an except clause. https://bugzilla.gnome.org/show_bug.cgi?id=756763
* Generate relative paths for gio-unix C header includesMikhail Zabaluev2015-10-191-2/+4
| | | | | | | | | In the generated GIR for Gio-2.0, the <c:include/> elements for gio-unix headers got emitted with absolute pathnames. Obviously, this does not work well when GIR needs to be checked into repositories, is used to build in other locations, etc. https://bugzilla.gnome.org/show_bug.cgi?id=756679
* Salvage the build directory parameter of update-glib-annotations.pyMikhail Zabaluev2015-10-151-9/+8
| | | | | | | It was not possible to use the tool with a custom build directory, even when it was given as the second command line parameter. https://bugzilla.gnome.org/show_bug.cgi?id=756665
* gir: Update annotations from GLib git masterColin Walters2015-10-123-52/+162
|
* repository: Fix format string error in previous commitColin Walters2015-10-121-1/+1
| | | | Regression from df21d1f362a810f48a23b7c121bf09ce398539c7
* transformer: Strip out GLib _autoptr typedefsColin Walters2015-10-101-0/+3
| | | | | | | They're just internal bits for users of C, shouldn't be part of the API. https://bugzilla.gnome.org/show_bug.cgi?id=755882
* girepository: Use constant time calculation for sections after Object fieldsSimon Feltman2015-10-106-53/+101
| | | | | | | | | | | | Add "n_field_callbacks" to ObjectBlob which represents the number of object fields which are also callbacks. This a allows a constant time computation for accessing sections after fields. Track writing of this field by passing an extra argument through the girnode writers recursive call structure. This essentally reverts a portion of commit 7027bb256d0d1ab which added a linear time computation for accessing sections after fields. Update typelib validator to also ensure n_field_callbacks is properly set. https://bugzilla.gnome.org/show_bug.cgi?id=700338
* maintransformer: Fix regression in callback closure assignmentColin Walters2015-10-103-32/+20
| | | | | | | The nullable code needs to search via index lookup of closure_name, which drops the need to (incorrectly) assign closure_name again. https://bugzilla.gnome.org/show_bug.cgi?id=756352
* giscanner.message: Don't print node as the default contextMikhail Zabaluev2015-10-051-3/+1
| | | | | | | Node is always present in the output of .log_node(), so printing it another time as context just adds noise. https://bugzilla.gnome.org/show_bug.cgi?id=756088
* build: Add test XML file to buildPhilip Withnall2015-10-051-0/+1
| | | | | | | Fixup to commit 10cb665fee2cc378dd2f13bad16e6384836a8b16. I failed to work git properly when submitting the patch. https://bugzilla.gnome.org/show_bug.cgi?id=729660
* build: Add an autotools module for introspection builds on MSVCChun-wei Fan2015-10-052-2/+128
| | | | | | | | | | | | This adds an autotools module that can be included in projects to be used for generating the command lines for g-ir-scanner and g-ir-compiler for introspection builds on Visual Studio builds. This is currently not used directly in the MSVC builds of g-i, but is added here as other modules are directly to get this file from here (i.e. $(srcroot)/build) for inclusion in their Makefile.am's to support introspection builds for modules that support Visual Studio builds.
* giscanner: Mark gpointer nodes as nullable by defaultPhilip Withnall2015-10-049-29/+184
| | | | | | | | | | | | | gpointer parameters and return types should be marked as nullable by default, unless: • also annotated with (type) and not with (nullable); or • explicitly annotated with (not nullable). This introduces the (not nullable) annotation as a direct opposite to (nullable). In future, (not) could be extended to invert other annotations. https://bugzilla.gnome.org/show_bug.cgi?id=729660
* giscanner: Mark (closure) parameters as (nullable) by conventionPhilip Withnall2015-10-043-20/+107
| | | | | | | | All user_data pointers should be nullable, and they should all be annotated as closures too. I have not found any counter-examples where a closure is non-nullable. https://bugzilla.gnome.org/show_bug.cgi?id=729660
* scanner: Warn and ignore return annotations when there is no return valueGarrett Regier2015-10-044-5/+31
| | | | | | | | Otherwise the .gir can contain invalid data which would likely cause a crash at runtime. https://bugzilla.gnome.org/show_bug.cgi?id=752044 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* scanner: Warn and ignore on incorrect optional/nullable/allow-none annotationsGarrett Regier2015-10-045-3/+65
| | | | | | | These can easily be misunderstood, especially optional. https://bugzilla.gnome.org/show_bug.cgi?id=752065 Signed-off-by: Garrett Regier <garrett.regier@riftio.com>
* girparser: Avoid a crash with an unset transfer annotationColin Walters2015-10-041-2/+2
| | | | | | Spotted by Coverity. https://bugzilla.gnome.org/show_bug.cgi?id=752549
* girepository: Drop executable bits from cmph .[ch] filesColin Walters2015-10-0410-0/+0
| | | | | | No reason for it. https://bugzilla.gnome.org/show_bug.cgi?id=752931
* giscanner.ast: Map size_t and ssize_t to gsize and gssize, respectivelyMikhail Zabaluev2015-10-041-2/+1
| | | | | | | The mapping to long int types seems bogus; the code above it did the right thing, but only for size_t. https://bugzilla.gnome.org/show_bug.cgi?id=756016
* giscanner.message: Fix module-level logging functionsMikhail Zabaluev2015-09-301-3/+7
| | | | | | | | MessageLogger.get() calls the class constructor without arguments. The __init__ signature, however, did not default the namespace parameter, so any usage of the logging functions caused a bogus exception. https://bugzilla.gnome.org/show_bug.cgi?id=755890
* 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