| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
_Thread_local is a C11 keyword, and thread_local is a macro to make it
more confortable to read. As this keyword can only be used in variable
declarations, not in function return values or parameters, it cannot
be included in bindable APIs and we can safely ignore it.
https://bugzilla.gnome.org/show_bug.cgi?id=756921
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=710560
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
We need to copy the source symbols, otherwise we'll
overwrite their values. This isn't good.
https://bugzilla.gnome.org/show_bug.cgi?id=693939
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=693939
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
* Due to the way that flex/bison works, the symbols were being added
to the scanner after additional lines are parsed.
* If these lines are #line directives, then scanner->current_filename
can change between when the symbol is parsed and when it's added.
* Change so that symbol gets filename when parsing rather than when
being added to the scanner.
https://bugzilla.gnome.org/show_bug.cgi?id=650200
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Modify the lexer to consider all "trigraph" comments specially, and
parse them for "flags" as well as "private" and "public" (which were
previously hardcoded). This change allows for future support of
multiple annotations inside a single trigraph comment.
- Change the parser to consider the additional field "flags" set by
the lexer when constructing enums.
- Add a test case for the "flags" trigraph comment to the scanner
annotation tests.
See <https://bugzilla.gnome.org/show_bug.cgi?id=631530>.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C compiler will pick an enumeration type that accomodates the specified
values for the enumeration, so ignoring 64-bit enumerations, we can
have enumeration values from MININT32 to MAXUINT32. To handle this properly:
- Use gint64 for holding eumeration values when scanning
- Add a 'unsigned_value' bit to ValueBlob so we can distinguish the
int32 vs. uint32 cases in the typelib
- Change the return value of g_value_info_get_value() to gint64.
https://bugzilla.gnome.org/show_bug.cgi?id=629704
|
|
|
|
| |
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=594125
|
| |
|
|
|
|
|
| |
Add line numbers to symbols, which can be useful
in later stages of the scanner.
|
|
|
|
|
|
| |
Previously we just supported int and string, add double to this.
Technically we should probably differentiate between float and
double, but it's not likely to be very useful in practice to do so.
|
|
|
|
|
| |
We keep track of the source filename for every symbol. This enables
us to later filter symbols based on that name.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-12 Johan Dahlin <jdahlin@async.com.br>
Bug 563591 – Flags not recognized when there is no introspection data
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c (type_get_is_bitfield):
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/scannerparser.y:
* giscanner/sourcescanner.c (gi_source_type_copy):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.h:
Large parts of this patch was done by Jürg Billeter.
svn path=/trunk/; revision=1025
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-12 Johan Dahlin <jdahlin@async.com.br>
Bug 563794 - Redo annotation parsing & applying
Thanks to Colin for helping out considerably in landing this.
* giscanner/Makefile.am:
* giscanner/ast.py:
* giscanner/dumper.py:
* giscanner/girparser.py:
* giscanner/giscannermodule.c (pygi_source_scanner_get_comments),
(calc_attrs_length), (pygi_collect_attributes), (init_giscanner):
* giscanner/glibtransformer.py:
* giscanner/scannerlexer.l:
* giscanner/sourcescanner.c (gi_source_symbol_unref),
(gi_source_scanner_new), (gi_source_scanner_free),
(gi_source_scanner_get_comments):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* giscanner/xmlwriter.py:
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir:
* tests/scanner/annotation.c:
* tests/scanner/annotation.h:
* tests/scanner/foo-1.0-expected.gir:
* tests/scanner/foo-1.0-expected.tgir:
* tests/scanner/foo.h:
* tools/g-ir-scanner:
This commit merges the annotation parser rewrite branch.
It'll change the annotation parsing to be done completely in python
code which will make it easier to do further annotation parsing
easier.
svn path=/trunk/; revision=1017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-11-04 Johan Dahlin <jdahlin@async.com.br>
* giscanner/__init__.py:
* giscanner/ast.py:
* giscanner/cachestore.py:
* giscanner/cgobject.py:
* giscanner/girparser.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/libtoolimporter.py:
* giscanner/minixpath.py:
* giscanner/odict.py:
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* giscanner/utils.py:
* giscanner/xmlwriter.py:
* COPYING:
Relicense the giscanner library under LGPLv2+.
This has been approved by all contributors.
svn path=/trunk/; revision=862
|
|
|
|
| |
svn path=/trunk/; revision=814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-16 Tommi Komulainen <tommi.komulainen@iki.fi>
Bug 556543 – reduce compiler warnings
* girepository/ginfo.c:
* girepository/girepository.c (register_internal,
count_interfaces, find_interface, find_namespace_version,
parse_version, g_irepository_require):
* girepository/girmodule.c (g_ir_module_build_typelib):
* girepository/girnode.c (init_stats, dump_stats,
_g_irnode_init_stats, _g_irnode_dump_stats,
g_ir_node_can_have_member):
* girepository/girparser.c (firstpass_end_element_handler,
locate_gir, parse_basic, parse_type_internal, resolve_aliases,
start_alias, start_type, end_type_top, parse_include, cleanup,
post_filter):
* girepository/gtypelib.c (validate_function_blob, validate_enum_blob):
* giscanner/giscannermodule.c (directive_get_options,
type_get_child_list):
* giscanner/scannerlexer.l (parse_gtkdoc):
* giscanner/scannerparser.y (ctype_free):
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h (gi_source_scanner_parse_macros):
* tests/types/gitesttypes.c:
* tools/compiler.c (main):
* tools/generate.c (write_repository): Remove unused variables
and code, add missing includes, declarations and case
statements.
svn path=/trunk/; revision=730
|
|
|
|
| |
svn path=/trunk/; revision=643
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-31 Johan Dahlin <johan@gnome.org>
* giscanner/scannerlexer.l:
* giscanner/scannerparser.y:
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
Parse GCC extensions in the parser instead of just undeffing them
in the pre-processor.
svn path=/trunk/; revision=553
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-31 Johan Dahlin <jdahlin@async.com.br>
* giscanner/scannerparser.y:
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
Add a new source type enum for member.
Use __repr__ for improved debugging
* giscanner/girparser.py:
Ignore some more
* giscanner/transformer.py:
Improve parsing of struct members.
* tests/parser/foo-object.h:
Add a new testcase
svn path=/trunk/; revision=281
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-04-24 Johan Dahlin <jdahlin@async.com.br>
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c (directive_get_name),
(directive_get_value), (directive_get_options),
(symbol_get_directives), (symbol_set_directives),
(pygi_source_scanner_parse_file),
(pygi_source_scanner_lex_filename),
(pygi_source_scanner_get_directives), (init_giscanner):
* giscanner/sourcescanner.c (gi_source_scanner_get_directives):
* giscanner/sourcescanner.h:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
Add support for source/header annotations.
svn path=/trunk/; revision=224
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-03-25 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/giscannermodule.c:
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h:
Add constants and wrap a few more SymbolType fields
svn path=/trunk/; revision=166
|
|
2008-03-25 Johan Dahlin <johan@gnome.org>
* Makefile.am:
* configure.ac:
* giscanner/Makefile.am:
* giscanner/sourcescanner.c:
* giscanner/sourcescanner.h:
* tools/Makefile.am:
* tools/grealpath.h:
* tools/sourcescanner.c:
* tools/sourcescanner.h:
Move the scanner to a separate library.
svn path=/trunk/; revision=164
|