summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* scanner: Use tag namespace for parsing unionsSimon Feltman2014-01-041-74/+30
| | | | | | | Generalize _create_tag_ns_struct for both structs and unions. Remove _create_compound newer struct parsing code has completely replaced it. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* scanner: Add simplified parsing for nested structsSimon Feltman2014-01-041-4/+7
| | | | | | | | Add _create_member_struct for the parsing of nested structs. This is precursory work to remove the member/anonymous flag from other struct/union creation code and allow simplification of those code paths. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* scanner: Fix parsing for various typedef struct orderingsSimon Feltman2014-01-044-14/+106
| | | | | | | | | Add structs parsed from C's "tag namespace" into their own cache for lookup by typdef parsing. This fixes issues where a typedef declared after a struct would not have a correct name. This also cleans up the need for special casing struct tags prefixed with an underscore. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Remove debug echo from gi-testerSimon Feltman2014-01-041-1/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=721477
* tests: Update GI to use parallel test harnessSimon Feltman2014-01-045-8/+7
| | | | | | | | There was some dependence on the serial test harness in the recent tests that were added. Update GI to use the parallel test harness to avoid incompatibilities. https://bugzilla.gnome.org/show_bug.cgi?id=721477
* Update glib annotations from git masterRico Tzschichholz2014-01-042-2/+43
|
* tests: Add transformer tests for callback typedefsSimon Feltman2014-01-021-0/+16
| | | | | | Add a basic transformer unittest for callback typedefs. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add nested union unittestsSimon Feltman2014-01-021-0/+85
| | | | | | | Add a sub-set of tests found in struct testing as only basic validation is needed due to the shared code paths. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add nested struct tests for transformerSimon Feltman2014-01-021-0/+107
| | | | | | Add tests for nested structs as they pass through the transformer. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add transformer typedef struct testsSimon Feltman2014-01-022-1/+243
| | | | | | | | | Add tests for various combinations of struct tags and typedefs. This includes tests for orderings of a typedef prior to struct definition, reversed, all in one, and multiple typdefs. The currently failing tests have been marked as "expectedFailure" so the test suite doesn't bail out. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* scanner: Fix get_symbols/comments to maintain the scanner listsSimon Feltman2014-01-024-3/+64
| | | | | | | | | | | | Use g_slist_copy prior to returning the lists run through g_slist_reverse. This preserves the source scanners internally held lists where previously they would only point to a single element after a call, leaking memory and breaking subsequent calls. Note the functions as (transfer container) and use g_slist_free after calls in the Python bindings. Add new unittest file: test_sourcescanner.py for isolated unittesting of the SourceScanner. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Add tests for various struct typedef combinationsSimon Feltman2014-01-024-0/+258
| | | | | | | | | Add functional blackbox tests typedefs.[h|c] for various struct typedef orderings. Use XFAIL_TESTS with the new Typedefs-1.0.gir target. This allows for a differing expected gir that does not cause the suite to fail but rather a goal to work towards. https://bugzilla.gnome.org/show_bug.cgi?id=581525
* tests: Use Automake test harness for tests/offsetsSimon Feltman2014-01-021-10/+13
| | | | | | | | Replace usage of check-local with the Automake test harness. Change check_ variable usage to EXTRA_ in order to avoid building these dependencies with targeted testing using TESTS= in parent directories. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Update Python stanza to change directories before running testsSimon Feltman2014-01-021-3/+5
| | | | | | | | Ensure PYTHONPATH uses absolute paths for top_builddir and top_srcdir. Use pushd/popd before and after running tests with "python -m unittest...". This ensures TESTARGS can be used from within a vpath build directory. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* typelib compiler: properly initialise memoryRyan Lortie2013-12-302-1/+4
| | | | | | | | | | | | | | The typelib compiler was writing uninitialised memory to the output file. There were two sources of this uninitialised memory: the hash writer included some uninitialised memory in its output, and the bytes added after the hash output for padding were also not being initialised. Fix this by passing the padded size to the hash code writer function and having that function initialise the entire memory region to zero before writing. https://bugzilla.gnome.org/show_bug.cgi?id=721177
* tests: Use Python unittest module parameterization for annotationparserSimon Feltman2013-12-295-63/+84
| | | | | | | | | | | | | | Add Python unittest module parameterization support to gi-tester through the use of a "TESTARGS" variable. Use the Automake test harness along with gi-tester for running the Python annotationparser tests. Add tests/scanner/annotationparser/Makefile.am and localize testing rules and EXTRA_DIST setup to this file. Specific Python tests can now be run as follows: cd tests/scanner/annotationparser make check TESTS=test_patterns.py TESTARGS=TestTagValueStability https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Refactor test_parser and test_patterns to use unittest.TestSuiteSimon Feltman2013-12-292-50/+119
| | | | | | | | | | | | | Update both test_parser.py and test_patterns.py to dynamically generate TestCase sub-classes rather than modify a statically defined one. Use unittest.TestSuite to queue up the generated test cases via the "load_tests" hook. Use underscores instead of periods as a seperator for dynamically generated test cases and methods to match Python identifiers. Beyond general cleanup, these changes will help the ability to specify Python tests individually. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Automake test harness instead of gtesterSimon Feltman2013-12-293-6/+12
| | | | | | | | Switch both cmph-bdz-test and gthash_test to use the Automake test harness. Use EXTRA_PROGRAMS and EXTRA_LTLIBRARIES along with CLEANUP to allow lazy dependency evaluation of testing targets. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Automake test harness for warning testsSimon Feltman2013-12-292-13/+4
| | | | | | | | | | Update warning tests to use the Automake test harness per-header file check. This allows for quicker more granular testing, for example: cd tests/warn make check TESTS=return-gobject.h https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use EXTRA_LTLIBRARIES instead of check_LTLIBRARIESSimon Feltman2013-12-293-6/+13
| | | | | | | | Update tests/Makefile.am and tests/scanner/Makefile.am to use EXTRA_LTLIBRARIES which minimizes the building of libraries to only dependencies of specific tests when using: make check TESTS="..." https://bugzilla.gnome.org/show_bug.cgi?id=720713
* tests: Use Automake test harness for scanner diff testsSimon Feltman2013-12-294-21/+72
| | | | | | | | | | | | | | | | | | | Add gi-tester script for dispatching various scanner diff tests based on their target suffix. Hook the dispatcher script into the Automake test harness which is passed the diff test target name. Remove usage of check-local which is always run regardless of whether or not the TESTS variable is set from the command line. This allows for both the ability to use the harnesses XFAIL_TESTS variable for expected failures as well as testing of targets individually, for example: cd tests/scanner make check TESTS=GtkFrob-1.0.gir make check TESTS=Regress-1.0-Python Add Headeronly-1.0-expected.gir for validating the results of the header only gir creation test. https://bugzilla.gnome.org/show_bug.cgi?id=720713
* Honour CPPFLAGS as we do CFLAGSRyan Lortie2013-12-212-0/+7
| | | | | | | In all of the places that we pass through the CFLAGS, we should be doing the same with the CPPFLAGS. https://bugzilla.gnome.org/show_bug.cgi?id=720063
* Update glib annotations to 2.39.2Rico Tzschichholz2013-12-172-15/+29
|
* scannerlexer: Fix bad unrefJasper St. Pierre2013-12-171-1/+2
| | | | It's possible for scanner->current_file to be NULL, so add a check...
* Update glib annotations from git masterMartin Pitt2013-12-112-6/+11
|
* dumper: use 'cc' as the default C compilerRyan Lortie2013-12-081-1/+1
| | | | | | | | If $(CC) is unset, use 'cc' instead of 'gcc' as the default compiler. This matches the behaviour used in the source scanner. https://bugzilla.gnome.org/show_bug.cgi?id=720066
* scanner: make sure we pass CFLAGS to cppRyan Lortie2013-12-081-0/+1
| | | | | | | | When doing the source scanning in giscanner, make sure we pass the user's CFLAGS environment variable to the compiler, as we do for the dumper. https://bugzilla.gnome.org/show_bug.cgi?id=720063
* Update glib annotations from git masterRico Tzschichholz2013-12-083-27/+78
|
* Post-release version bump to match glibRico Tzschichholz2013-12-081-1/+1
|
* scanner: Support boolean constantsFlorian Müllner2013-11-2910-6/+49
| | | | | | | | Aliasing TRUE or FALSE is not very common, but done occasionally for extra clarity. Namely G_SOURCE_REMOVE / G_SOURCE_CONTINUE are self-explanatory, unlike the "raw" booleans. https://bugzilla.gnome.org/show_bug.cgi?id=719566
* Update glib annotations from git masterRico Tzschichholz2013-11-264-66/+195
|
* scanner: Use PATH_MAX, not hardcoded 1024 for realpath()1.39.0Colin Walters2013-11-161-1/+15
| | | | | | Otherwise we can overflow the stack on longer pathnames. Tested-By: Mantas Mikulėnas <grawity@gmail.com>
* giscanner: Handle the case when there's a space between -I cpp flag and the pathCarlos Garcia Campos2013-11-161-0/+3
| | | | | | | | | | In this case we were considering -I and the path as two different command line options. This was not a problem in the past (or for other cpp flags) because they are passed directly to gcc that accepts it. Now that we are ensuring that the include paths are always real paths, we need to handle this case to identify include paths in the command line. https://bugzilla.gnome.org/show_bug.cgi?id=712211
* giscanner: Make sure we use real paths in more placesCarlos Garcia Campos2013-11-154-7/+20
| | | | | | | | Ensure we are using the real path also for cflags comming from pkg_config files and command line options. This fixes the generation of the gir files when include paths contain symlinks. https://bugzilla.gnome.org/show_bug.cgi?id=712211
* giscanner: Make sure that the current path set from linemarks is also a real ↵Carlos Garcia Campos2013-11-151-1/+55
| | | | | | | | | path This fixes the case when the include path doesn't contain any symlink, but the path built by the preprocessor does. https://bugzilla.gnome.org/show_bug.cgi?id=712211
* Update glib annotations from git masterJasper St. Pierre2013-11-071-3/+19
|
* Update glib annotations from git masterRico Tzschichholz2013-11-072-6/+68
|
* girnode: Fix a NULL pointer deference if a namespace can’t be foundPhilip Withnall2013-11-061-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711541
* scanner: Don't barf on anonymous unionsColin Walters2013-10-309-0/+183
| | | | | | | | I'd like to be able to use this inside GTK+. See: https://bugzilla.gnome.org/show_bug.cgi?id=711153 https://bugzilla.gnome.org/show_bug.cgi?id=711157
* Update glib annotations from git masterRico Tzschichholz2013-10-292-98/+527
|
* giscanner: Test fixups for field annotations and documentationStef Walter2013-10-284-7/+63
| | | | Related to: https://bugzilla.gnome.org/show_bug.cgi?id=710561
* giscanner: Include field documentationStef Walter2013-10-282-1/+4
| | | | | | Structure field documentation was not being included in the gir file. https://bugzilla.gnome.org/show_bug.cgi?id=710562
* giscanner: Correctly consume field annotations on structsStef Walter2013-10-286-18/+106
| | | | | | | | A hidden exception was being thrown (which we now log), due to fields being treated as function parameters. Fixed to make field array annotations be transformed and written out to the gir correctly. https://bugzilla.gnome.org/show_bug.cgi?id=710561
* GIVFuncInfo: allow retrieving the address of an interface vfuncGiovanni Campagna2013-10-221-5/+31
| | | | | | | | Don't assume that the parent of a GIVFuncInfo is a GIObjectInfo, it could be a GIInterfaceInfo, if the vfunc is part of interface instead of a class. https://bugzilla.gnome.org/show_bug.cgi?id=688375
* Update glib annotations from git masterJasper St. Pierre2013-10-212-20/+1269
|
* sourcescanner: Removed unused struct_or_union_or_enum_table fieldStef Walter2013-10-212-13/+0
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=710560
* giscanner: Respect __GI_SCANNER__ when scanning for macrosStef Walter2013-10-216-3/+213
| | | | | | | | | When scanning for macros respect ifdefs of __GI_SCANNER__ in the various header files. Only #ifdef and #ifndef are supported. If __GI_SCANNER__ appears in plain #if statements, a warning is printed. https://bugzilla.gnome.org/show_bug.cgi?id=698367
* giscanner: remove g_realpathDieter Verfaillie2013-10-176-84/+11
| | | | | | | | | | | giscannermodule expects file names to be canonicalized and symlinks to be resolved (most likely to support users of symlinked /usr/local). Instead of computing absolute and real paths all over the place, we can do this once on entry in SourceScanner().parse_files() and SourceScanner().parse_macros() and clean the rest a bit... https://bugzilla.gnome.org/show_bug.cgi?id=710320
* giscanner: speed up SourceScanner().parse_files()Dieter Verfaillie2013-10-175-102/+96
| | | | | | | | | | | | | | | | | | | Was looking around a bit and noticed about 2/3 of g-ir-scanner time is spent in SourceScanner().parse_files(). Some profiling quickly shows most of that 2/3 is used by gi_source_scanner_add_symbol() where it creates a whole bunch of GFile instances just to compare paths and throw them away again. With this a scanner instance now maintains a hash table of GFile instances instead of a list of file names, so comparing those paths can be reduced to a fast g_hash_table_contains() call. This makes "g-ir-scanner <whole_bunch_of_options> --output Gtk-3.0.gir" complete in about 10 seconds on my box instead of about 30 seconds (both best of 3 runs). https://bugzilla.gnome.org/show_bug.cgi?id=710320
* giscanner: restore linemark filename unescapingDieter Verfaillie2013-10-171-15/+14
| | | | | | | | This was broken in 0d6db7114a176c2d24a19a2d6a570aab406608ac where the unescaped filename was still computed but no longer used... https://bugzilla.gnome.org/show_bug.cgi?id=710320