summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* gimarshallingtests: Add a utf8-in-bytearray testColin Walters2012-11-292-0/+22
| | | | Will be used by gjs
* giscanner: don't continue parsing after multiline descriptionsDieter Verfaillie2012-11-281-2/+2
| | | | | | | | | | This doesn't change anything, really, except that you don't have to read a whole page of code just to realize that nothing else happens with that line and we go on processing the next. Putting the continue statements there makes it a bit more readable. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: fix DocBlock().commentDieter Verfaillie2012-11-285-19/+6
| | | | | | | | | If there is no comment block description, DocBlock().comment should be None. This results in the removal of unneeded blank lines in the output of DocBlock().to_gtk_doc and hence the .c files generated by misc/update-glib-annotations.py https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: update annotationparser to most recent gtkdoc-mkdb bug fixes.Dieter Verfaillie2012-11-283-3/+99
| | | | | | | This patch adds a test for and implements a more generic solution to GTK-Doc commit 47abcd53b8489ebceec9e394676512a181c1f1f6 https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: remove re.MULTILINE usage from annotationparserDieter Verfaillie2012-11-281-12/+11
| | | | | | | These are remnants from the original prototype and are no longer used. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: Correctly detect invalid GTK-Doc comment block end markersDieter Verfaillie2012-11-282-0/+22
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: treat the GTK-Doc Description: tag like any other tagDieter Verfaillie2012-11-282-14/+136
| | | | | | and add paragraph break tests. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: construct list of possible tag names for TAG_RE from _ALL_TAGS...Dieter Verfaillie2012-11-284-260/+221
| | | | | | | | ... instead of having a secondary hard-coded list. This results in the removal of giscanner/annotationpatterns.py to prevent a circular import. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: move unit tests from giscanner/annotationpatters.py...Dieter Verfaillie2012-11-284-557/+602
| | | | | | | ... to tests/scanner/annotationparser/test_patterns.py because the following patch will remove giscanner/annotationpatters.py https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: add AnnotationParser testsDieter Verfaillie2012-11-2846-0/+5780
| | | | | | | | | | | | | | The tests in giscanner/annotationpatters.py only test the regular expression programs used when parsing GTK-Doc comment blocks but do not test the structure of the resulting "parse tree". This patch adds 193 GTK-Doc comment blocks and the expected results AnnotationParser should return (with it's current level of understanding of GTK-Doc comment block syntax). These are compared by tests/scanner/annotationparser/test_parser.py which complains with a diff on failure. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: use re.match() instead of re.search()Dieter Verfaillie2012-11-281-10/+10
| | | | | | | | | | | | | | | From Python's documentation: Python offers two different primitive operations based on regular expressions: match checks for a match only at the beginning of the string, while search checks for a match anywhere in the string (this is what Perl does by default). The different behavior between match() and search() doesn't matter in our case and conceptually we are checking if a piece of text matches a certain pattern, so match() is a better fit. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: drop dead codeDieter Verfaillie2012-11-281-10/+2
| | | | | | | | DocOptions already has a position attribute, no need to overwrite it when the position of DocBlock or DocTag is set, hence the set_position methods are no longer needed. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: make it clear DocOptions() also has a position attributeDieter Verfaillie2012-11-281-0/+1
| | | | | | | Lost a couple of hours hunting down a failed test case (from the annotationparser work about to land) due to this not being clear... https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: implement DocOption() in terms of odict instead of dictDieter Verfaillie2012-11-282-6/+6
| | | | | | | | | The order of the "options" key/value pairs returned by DocOption().all() should be identical to the order in which they where stored. Hence replace the dict usage with odict. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: remove unused variablesDieter Verfaillie2012-11-285-22/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: remove duplicate "os" import...Dieter Verfaillie2012-11-281-2/+1
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: use collections.OrderedDict when availableDieter Verfaillie2012-11-281-16/+21
| | | | | | | | | Starting with Python 2.7 we can use the batteries included collections.OrderedDict class. However, configure.ac claims we still support Python 2.5 and 2.6, so don't remove our custom odict implementation just yet... https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: use dict.values() in favor of dict.itervalues()Dieter Verfaillie2012-11-281-2/+2
| | | | | | | This makes it possible to run the upcoming annotationparser.py tests with both Python 2 and Python 3. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: use dict.items()...Dieter Verfaillie2012-11-282-7/+6
| | | | | | | | | ... in favor of "for key in dict: value=dict[key]" and "dict.iteritems()". This makes it possible to run the upcoming annotationparser.py tests with both Python 2 and Python 3. https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: use "if in [a, b]" instead of "if == a or if == b"Dieter Verfaillie2012-11-281-2/+2
| | | | | | It simply looks better... https://bugzilla.gnome.org/show_bug.cgi?id=688897
* giscanner: improve wording of inline documentationDieter Verfaillie2012-11-282-37/+58
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* tests: add g-ir-doc-tool generated output to .gitignoreDieter Verfaillie2012-11-281-0/+4
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* Update GLib annotations to masterDieter Verfaillie2012-11-282-3/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688897
* GIMarshallingTests: Add more virtual methods with out argumentsMartin Pitt2012-11-212-0/+55
| | | | | | | Add virtuals method which takes both an (in) and and (out) argument, and variants with both caller and callee allocation. This came up in https://bugzilla.gnome.org/show_bug.cgi?id=688783
* Regress: Update expected gir for previous changesRico Tzschichholz2012-11-211-0/+34
| | | | Changes introduced by 5153efd29e9a813a97d58905340c0ec4af04c5bd
* Add more tests for boxed typesGiovanni Campagna2012-11-202-0/+57
| | | | | | | gjs needs a boxed type that cannot be trivially allocated but has also a complex constructor. https://bugzilla.gnome.org/show_bug.cgi?id=612033
* Bump version to 1.35.2GOBJECT_INTROSPECTION_1_35_2Martin Pitt2012-11-191-2/+2
| | | | | Our configure.ac still said 1.34.0, which is even older than the stable gnome-3-6 branch. Bump it to 1.35.2 so that pygobject can depend on >= 1.34.2.
* docs: add GTK-Doc generated output to .gitignoreDieter Verfaillie2012-11-151-0/+15
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=688418
* docs: don't mark non GTK-Doc as being a GTK-Doc comment blockDieter Verfaillie2012-11-151-1/+1
| | | | | | This patch silences another gtkdoc-mkdb warning. https://bugzilla.gnome.org/show_bug.cgi?id=688418
* docs: remove reference to object_grouped.sgml.Dieter Verfaillie2012-11-153-3/+0
| | | | | | | This most likely sneaked in as a copy paste error from GTK+ reference docs as g-i never had a object_grouped.sgml... https://bugzilla.gnome.org/show_bug.cgi?id=688418
* docs: make gtkdoc-mkdb ignore cmph doxygen comment blocks.Dieter Verfaillie2012-11-151-1/+1
| | | | | | | | | When building g-i reference documentation, girepository/cmph/* was being scanned for GTK-Doc comment blocks by gtkdoc-mkdb. Unfortunately, cmph uses doxygen comment blocks which also start with /**. This patch prevents gtkdoc-mkdb from complaining. https://bugzilla.gnome.org/show_bug.cgi?id=688418
* GIMarshallingTests: Add GVariant propertyMartin Pitt2012-11-142-0/+17
|
* giscanner: unbreak g-ir-annotationtool...Dieter Verfaillie2012-11-121-2/+2
| | | | | | | | | | | | | | | ... and by extension misc/update-glib-annotations.py. Commit 5c70ef2eb32949f8889e9ae654d50bfbf838951f broke these by assuming create_source_scanner() is always called with 'options' and 'args' built by the OptionParser() defined in scannermain.py's _get_option_parser(). This is not the case with g-ir-annotationtool, where annotationmain.py's annotation_main() creates it's own OptionParser() accepting a different set of 'options' and 'args' as compared to scannermain.py
* Update annotations from glib gitMartin Pitt2012-11-091-7/+7
|
* gimarshallingtests: Fix return data typeMartin Pitt2012-11-092-2/+2
| | | | | | gi_marshalling_tests_genum_returnv() should (and does) return a GIMarshallingTestsGEnum, not a GIMarshallingTestsEnum. The latter is already covered by gi_marshalling_tests_enum_returnv().
* gimarshallingtests: Add some GBytes testsColin Walters2012-11-072-0/+35
| | | | | | Will be used by gjs for new byte array work. https://bugzilla.gnome.org/show_bug.cgi?id=687696
* scanner: Emit correct type for unsigned integer constantsColin Walters2012-11-072-2/+2
| | | | | | Otherwise bindings will break. https://bugzilla.gnome.org/show_bug.cgi?id=685022
* Update annotations from glib gitMartin Pitt2012-11-032-17/+22
|
* tests: work around make check warningDieter Verfaillie2012-10-311-2/+5
| | | | | | | | | | The tests in tests/repository/ depend on libregress.so from tests/scanner which cannot be loaded during make check. Fixing this properly would require migrating to non-recursive automake for the tests, but for now we can just work around and set LD_LIBRARY_PATH (for linux) and PATH (for win32). http://bugzilla.gnome.org/show_bug.cgi?id=675049
* tests/offsets: Remove leftover g_type_init() callColin Walters2012-10-311-2/+0
|
* cmph: Remove leftover statement-without-effectColin Walters2012-10-301-1/+0
| | | | Compiler warning introduced from MSVC patches.
* scanner: Correctly handle large 64 bit integer constantsColin Walters2012-10-305-5/+33
| | | | | | | | | | | | | | | | In C, positive integer constants are by default unsigned. This means an expression like 0x8000000000000000 will be "unsigned long long". In the actual scanner code, we were parsing them as "gint64", and storing them as gint64. This was incorrect; we need to parse them as guint64, and store the bits we get from that. This gives us an equivalent result to what the C compiler does. However, when we actually return the value as a Python "long" (arbitrary length integer), we need to treat the value as unsigned if the result indicated it was. https://bugzilla.gnome.org/show_bug.cgi?id=685022
* Expand on the documentation testsGiovanni Campagna2012-10-2812-0/+423
| | | | | | | | Add tests for complex function signatures (including arrays and callbacks), for enumerations and for static methods. Add JS reference files. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* MallardWriter: support cross-references across namespacesGiovanni Campagna2012-10-281-12/+34
| | | | | | Look in included namespaces when resolving a cross-reference. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* Add documentation for enumeration membersGiovanni Campagna2012-10-288-78/+179
| | | | | | | | Enum members were Annotated in the AST, and most code already assumed they could have docs. What was missing was reading the docs from the comment blocks and writing them in the XML. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* Ast: Add parent to FieldsGiovanni Campagna2012-10-282-9/+13
| | | | | | | Properties have it, there is no reason for Field not to, and in this way mallard docs can treat a field almost like a property. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* Namespace: fix appending of nodesGiovanni Campagna2012-10-282-3/+30
| | | | | | | | Traverse appended nodes for methods, so that namespace.symbols contains all known symbols and not just global functions. Also, ensure that all relevant nodes are appended when parsing GIRs. https://bugzilla.gnome.org/show_bug.cgi?id=683046
* regress: Add a test case for skipping a function with an unannotated callbackColin Walters2012-10-273-0/+29
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=685399
* gimarshallingtests: Attempt to avoid using reserved wordsColin Walters2012-10-272-276/+276
| | | | | | | | "int8" apparently blows up on AIX. It was kind of lame how we would just ad-hoc append a _. Since we only have one value for a lot of these, let's just go with the couldn't-be-any-simpler "v". https://bugzilla.gnome.org/show_bug.cgi?id=664166
* gmarshallingtests: Fix prototype () -> (void)Colin Walters2012-10-272-3/+3
| | | | Dear Python programmers, () doesn't mean what you think it means in C.