| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This avoids a bit of python work and reduces the
amount of allocations.
|
|
|
|
|
| |
Only parse doc comments for the files we pass in
on the command line to g-ir-scanner, not the included dependencies.
|
|
|
|
|
|
|
|
| |
This fixes compilation where CC="ccache gcc" and similar.
https://bugzilla.gnome.org/show_bug.cgi?id=660160
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
|
| |
|
|
|
|
|
| |
This is cleaner and faster, and prepares us better for an incoming
import of CMPH.
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=630101
|
|
|
|
| |
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=594125
|
|
|
|
|
|
| |
Add a position class which will make it easier to
send filename/line/column information to the message
class.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One of the first big changes in this rewrite is changing the Type
object to have separate target_fundamental and target_giname properties,
rather than just being strings. Previously in the scanner, it was
awful because we used heuristics around strings.
The ast.py is refactored so that not everything is a Node - that
was a rather useless abstraction. Now, only things which can have
a GIName are Node. E.g. Type and Field are no longer Node.
More things were merged from glibast.py into ast.py, since it isn't
a very useful split.
transformer.py gains more intelligence and will e.g. turn GLib.List
into a List() object earlier. The namespace processing is a lot
cleaner now; since we parse the included .girs, we know the C
prefix for each namespace, and have functions to parse both
C type names (GtkFooBar) and symbols gtk_foo_bar into their
symbols cleanly. Type resolution is much, much saner because
we know Type(target_giname=Gtk.Foo) maps to the namespace Gtk.
glibtransformer.py now just handles the XML processing from the dump,
and a few miscellaneous things.
The major heavy lifting now lives in primarytransformer.py, which
is a combination of most of annotationparser.py and half of
glibtransformer.py.
annotationparser.py now literally just parses annotations; it's
no longer in the business of e.g. guessing transfer too.
finaltransformer.py is a new file which does post-analysis for
"introspectability" mainly.
girparser.c is fixed for some introspectable=0 processing.
|
|
|
|
|
|
|
|
| |
This is to support cases such as WebKitGTK+, that have C API
implemented in C++ files. Do note this does not mean we support proper
C++ parsing.
https://bugzilla.gnome.org/show_bug.cgi?id=627152
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=618562
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work allows us to move closer to replacing gtk-doc, among other
things. We add a generic attribute "introspectable", and inside the
typelib compiler if we see "introspectable=no", we don't put it in the
typelib. This replaces the hackish pre-filter for varargs with a much
more generic mechanism.
The varargs is now handled in the scanner, and we emit
introspectable=no for them.
Add generic metadata to Node with references to file/line/column,
which currently comes from symbols.
Add scanner options --warn-all and --warn-error.
https://bugzilla.gnome.org/show_bug.cgi?id=621570
|
|
|
|
| |
This reverts commit 074192b89c6afcdd7f062f03989972e44334b8bf.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This work allows us to move closer to replacing gtk-doc, among other
things. We add a generic attribute "introspectable", and inside the
typelib compiler if we see "introspectable=no", we don't put it in the
typelib. This replaces the hackish pre-filter for varargs with a much
more generic mechanism.
The varargs is now handled in the scanner, and we emit
introspectable=no for them.
Add generic metadata to Node with references to file/line/column,
which currently comes from symbols.
Add scanner options --Wall and --Werror.
|
|
|
|
|
| |
Don't hardcode gcc, any cc which handles those options is good
enough; in particular this is reported to fix Sun Studio.
|
|
|
|
|
|
| |
Using CC fails when building gobject-introspection because CC is defined to
be $(SHELL) scripts/shave cc '$(SHAVE_SAVED_CC)'. A more sophisticated fix
will be needed later.
|
| |
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2009-01-03 Jürg Billeter <j@bitron.ch>
* giscanner/ast.py:
* giscanner/dumper.py:
* giscanner/girparser.py:
* giscanner/glibtransformer.py:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* giscanner/xmlwriter.py:
Fix inconsistencies with PEP8
svn path=/trunk/; revision=997
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-30 Johan Dahlin <jdahlin@async.com.br>
Bug 558383 – builddir != srcdir build fails if giscanner python module not already installed
* gir/Makefile.am:
construct PYTHONPATH just once
* tests/everything/Makefile.am:
* tests/scanner/Makefile.am:
add $(top_srcdir) to PYTHONPATH to
handle builddir != srcdir
* giscanner/libtoolimporter.py:
* giscanner/sourcescanner.py:
Make the libtoolimporter work when distchecking too.
Mostly based on patch by Tommi Komulainen
svn path=/trunk/; revision=833
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-29 Johan Dahlin <jdahlin@async.com.br>
* giscanner/libtoolimporter.py:
* giscanner/sourcescanner.py:
Clean up the libtool importer a bit. Add a context so we
can use it through a with statement.
Don't just look in the current directory, look in the whole
sys.path.
svn path=/trunk/; revision=830
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-21 Johan Dahlin <johan@gnome.org>
Bug 556358 - don't use libtool internals
* giscanner/Makefile.am:
* giscanner/libtoolimporter.py:
* giscanner/sourcescanner.py:
* giscanner/utils.py:
Add a python meta importer and remove a libtool symlink hack.
svn path=/trunk/; revision=767
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-10-11 Johan Bilien <jobi@litl.com>
* giscanner/scannerparser.y: ignore non-UTF-8 string constants
2008-10-11 Johan Bilien <jobi@litl.com>
Bug 552347: Parse #defines constants
* girepository/gtypelib.c: update the list of value_size
with recently defined type tags
* giscanner/scannerparser.y: brought back parsing of #defined, as
present in older version
* giscanner/giscannermodule.c: bind gi_source_scanner_append_filename
* giscanner/girwriter.py: write out constant tags in the gir
* giscanner/sourcescanner.py: add accessor for const_string
* giscanner/transformer.py, giscanner/glibtransformer.py: handle
constant
svn path=/trunk/; revision=673
|
|
|
|
| |
svn path=/trunk/; revision=643
|
|
|
|
| |
svn path=/trunk/; revision=609
|
|
|
|
|
|
|
|
|
|
| |
2008-09-15 Johan Dahlin <johan@gnome.org>
* giscanner/sourcescanner.py (SourceType.type_qualifier): Add
a wrapper for type_qualifier as well.
svn path=/trunk/; revision=608
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-08-27 Tor Lillqvist <tml@novell.com>
Make g-ir-scanner work on Windows. Still problems with the typelib
code. Changes okayed by jdahlin.
* configure.ac: Check for Windows, set Automake conditional
OS_WIN32. Change backslashes to forward slashes in pyexecdir to
avoid shell quoting issues
* girepository/Makefile.am: Use -no-undefined so that libtool
agrees to build a shared library on Windows.
* girepository/girparser.c (backtrace_stderr): No backtrace() on
Windows. Empty implementation on Windows so far.
* girepository/gtypelib.c (g_typelib_check_sanity): Give more
informative error message for the assertion failures. Tell also
what the expected size of the struct is. Check all sizes first and
fail afterwards if at least one size was different from expected.
* tools/Makefile.am: Reorder libraries into proper logical
dependency order.
* tools/generate.c: Don't include <dlfcn.h>, not used.
* giscanner/Makefile.am: On Windows, link with the Python library,
and install the module DLL as _giscanner.pyd. Remove the
unnecessary import library and libtool library that libtool has
installed.
* giscanner/scannerlexer.l: Recognize the gcc __attribute__ syntax
and just skip it. Recognize also two "l" suffixes for long long
constants. Recognize also __inline__.
* giscanner/grealpath.h (g_realpath): Implement on Windows, using
GetFullPathName(). As such, GetFullPathName() does more than the
UNIX realpath(). It also changes relative paths into absolute
paths. But for our purposes that shouldn't matter.
* giscanner/giscannermodule.c (pygi_source_scanner_parse_file): On
Windows the file descriptor passed to us is from Python. Python
Python2.5 uses the msvcr71.dll C library, while mingw-built code
uses msvcrt.dll. On Windows, file descriptors are specific to
which C library is used. So we must find out what underlying OS
handle corresponds to the file descriptor Python passes us, and
then make that into a file descriptor valid for the C library this
code uses.
* giscanner/sourcescanner.py (_parse): Don't need to bypass
__attribute__ as the lexer now handles it. The definition as empty
was ineffective for mingw anyway, as mingw's _mingw.h undefines
__attribute__. Close the temp file before unlinking it.
* giscanner/cgobject.py: Use correct library name for the gobject
DLL on Windows.
* gir/Makefile.am: Must pass the full basename of the DLLs on
Windows to g-ir-scanner. It's a bit ugly that we have to "know"
that the names of the GLib DLLs are like libglib-2.0-0.dll, but in
reality they won't change, until there is a GLib 3, and then also
the Unix code here needs changing.
Must pass CPPFLAGS to g-ir-scanner when building GLib.gir so that
libintl.h is found.
svn path=/trunk/; revision=503
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-26 Johan Dahlin <johan@gnome.org>
* gir/Makefile.am:
* giscanner/Makefile.am:
* giscanner/cgobject.py:
* giscanner/config.py.in:
* giscanner/sourcescanner.py:
Avoid undeffing __GNUC__, instead define
__attribute__ & friends. Remove glibconfig.h hack.
svn path=/trunk/; revision=496
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-22 Johan Dahlin <johan@gnome.org>
* giscanner/sourcescanner.py:
Check for ../gobject-introspection-1.0.pc.in to determine
if we run installed or uninstalled.
svn path=/trunk/; revision=464
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-22 Johan Dahlin <johan@gnome.org>
* gir/Makefile.am:
* giscanner/sourcescanner.py:
Send in undefs/defines via writing it directly to stdin
of cpp instead of via arguments.
svn path=/trunk/; revision=463
|
|
|
|
| |
svn path=/trunk/; revision=459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-22 Johan Dahlin <johan@gnome.org>
* configure.ac:
* gir/Makefile.am:
* giscanner/Makefile.am:
* giscanner/config.py.in:
* giscanner/sourcescanner.py:
Use the generated glibconfig.h for all scanner invokations.
Rename it to glibconfig-scanner.h and install it.
Add a config.py which so far contains the include dir.
svn path=/trunk/; revision=456
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-09 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/ast.py:
* giscanner/cgobject.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girparser.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/odict.py:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
* giscanner/utils.py:
* giscanner/xmlwriter.py:
* tools/g-ir-scanner:
PEP8ify
svn path=/trunk/; revision=341
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-05-31 Johan Dahlin <jdahlin@async.com.br>
* giscanner/sourcescanner.py (ctype_name): Add ctype_name,
a function to convert a CTYPE symbol to a string
svn path=/trunk/; revision=275
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-24 Johan Dahlin <jdahlin@async.com.br>
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/giscannermodule.c
(pygi_source_scanner_append_filename),
(pygi_source_scanner_parse_file):
* giscanner/glibtransformer.py:
* giscanner/sourcescanner.py:
Revert back to using temporary files to send in headers.
Allow Functions to be passed in as callbacks, add a couple
of try/excepts missing features.
We can now scan pango
svn path=/trunk/; revision=274
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-05-05 Johan Dahlin <johan@gnome.org>
* giscanner/__init__.py:
* giscanner/sourcescanner.py:
* giscanner/transformer.py:
Move sourcescanner symbols to the sourcescanner module, instead
of in the global __init__ namespace.
svn path=/trunk/; revision=266
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-04-28 Johan Dahlin <johan@gnome.org>
* giscanner/transformer.py (Transformer._traverse_one): Avoid recursion
when scanning girepository.h
* giscanner/sourcescanner.py (SourceScanner._preprocess): Define
a __GI_SCANNER__ when we run.
svn path=/trunk/; revision=254
|
|
|
|
| |
svn path=/trunk/; revision=247
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/__init__.py:
* giscanner/cgobject.py:
* giscanner/gidlparser.py:
* giscanner/gidlwriter.py:
* giscanner/girwriter.py:
* giscanner/gobjecttreebuilder.py:
* giscanner/odict.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* giscanner/xmlwriter.py:
* tools/Makefile.am:
* tools/g-ir-scanner:
Add LGPLv2 license header and install all python files
svn path=/trunk/; revision=227
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-04-25 Johan Dahlin <jdahlin@async.com.br>
* TODO:
* giscanner/gidlwriter.py:
* giscanner/giscannermodule.c (pygi_source_directive_new),
(directive_get_options), (pygi_source_symbol_new),
(symbol_get_base_type), (pygi_source_type_new),
(type_get_base_type), (type_get_child_list),
(pygi_source_scanner_get_symbols),
(pygi_source_scanner_get_directives):
* giscanner/gobjecttreebuilder.py:
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tests/parser/foo-object.h:
Add support for virtual methods.
Pair struct FooClass with struct Foo.
Clean up the SourceScanner bindings a bit.
Add a testcase for virtual methods.
svn path=/trunk/; revision=226
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
svn path=/trunk/; revision=208
|
|
2008-04-18 Johan Dahlin <johan@gnome.org>
* giscanner/sourcescanner.py:
* giscanner/treebuilder.py:
* tools/g-ir-scanner:
split tree building and source scanning interface to separate files.
svn path=/trunk/; revision=174
|