| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
For backwards compat, keep the presence of the environment
variable at all to mean "exception".
Also start a HACKING file.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Instead of catching all errors, including AttributeError,
TypeError and NameError.
|
|
|
|
|
|
| |
If we don't have permission to execute the libtool binary, we'd
just throw here which is wrong. Fix this by catching all
exceptions.
|
|
|
|
| |
The last few commits regressed 'check'; fix those up.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In addition to the current --library=<foo>, support --library=lib<foo>.la.
This makes it unambiguous that we are referencing an uninstalled
library and allows accurate extraction of the shared library name
for the uninstalled library.
* tests/scanner/Makefile.am tests/offsets/Makefile.am: Use the
new form of --library=. Also some LD_LIBRARY_PATH frobbing as needed.
*-expected.gir *-expected.tgir: We now pick out the shared library
accurately, so fix shared-library="" in our reference girs. (The
comparison may need some pre-sanitization now to work on non-ELF)
http://bugzilla.gnome.org/show_bug.cgi?id=591669
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using ctypes.util.find_library() to resolve library names to
sonames causes problems with dealing with uninstalled libtool
operation properly. We're unlikely to find any way of combining
the two that will be robust against future changes in both
facilities.
Switch to a different approach - run 'ldd' on the compiled
introspection binary and extract sonames from there This is
less portable but should be quite robust where it works.
utils.py dumper.py: Move libtool-command-line finding into utils.py
girwriter.py: Remove library name resolution from here, expect libraries
to be passed in preresolved.
shlibs.py scannermain.py: New file including resolve_shlibs() to resolve
library names using the introspection binary.
tests/scanner/Makefile.am: Add .libs to LD_LIBRARY_PATH
http://bugzilla.gnome.org/show_bug.cgi?id=591669
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some enums have members which have a common prefix which doesn't
match that of the enum name, but it also longer than the global
namespace prefix. Instead, try stripping the common prefix first,
and only if that fails fall back to the global strip.
Also, for glib-registered enums we were using the nick, which
typically has "-" as a separator. Replace that with "_" for
consistency between unregistered enums and registered.
utils.py:strip_common_prefix is now unused, delete.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-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 Lucas Rocha <lucasr@gnome.org>
Bug 552376: scanner generates wrong names for enum members when
there's no defined gtype.
* giscanner/utils.py (strip_common_prefix): Always strip common
prefix exactly up to the last "_", and not beyond.
* tests/scanner/foo.h (FooEnumNoType): add FOO_ENUM_NEUF. The point
here is that the first character after the last '_' should should be
the same as the character in the same position on the type name.
* tests/scanner/foo-expected.gir: test that
svn path=/trunk/; revision=664
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
full type name prefix
* giscanner/utils.py (strip_common_prefix): Fix this to strip the
right amount when the entire "first" string is a prefix of
"second"
* tests/scanner/foo.h (FooEnumFullname):
* tests/scanner/foo-expected.gir: test that
svn path=/trunk/; revision=640
|
|
|
|
|
|
|
|
| |
The to_underscores function was designed for use against prefixed
names; we need a separate function which will convert names like
DBusFoo into dbus_foo, not d_bus_foo.
svn path=/trunk/; revision=621
|
|
|
|
| |
svn path=/trunk/; revision=555
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-31 Johan Dahlin <johan@gnome.org>
* giscanner/glibtransformer.py:
Clean up a huge if. Do not add methods or constructors
to enums/flags.
* giscanner/utils.py:
second might be longer than first, check that.
svn path=/trunk/; revision=550
|
|
|
|
|
|
|
|
|
|
| |
2008-08-21 Colin Walters <walters@verbum.org>
* giscanner/glibtransformer.py: Much simpler approach
of mapping uscored names to classes.
* giscanner/utils.py: Remove unnecessary function.
svn path=/trunk/; revision=443
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-21 Colin Walters <walters@verbum.org>
* giscanner/glibtransformer.py: Look up all permutations
of class names when scanning methods/ctors based on
the prefix instead of using the return value. This
associates gtk_window_new with the right class.
svn path=/trunk/; revision=442
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-18 Johan Dahlin <johan@gnome.org>
* gir/Makefile.am:
* giscanner/girparser.py:
Set ctype of enums
* giscanner/transformer.py:
Improve enum parsing for enums without a GType.
Make flags/enum references to other girs work
* giscanner/utils.py:
Simplify this a bit
* tests/scanner/Makefile.am:
* tests/scanner/foo-object.h:
* tests/scanner/utility-expected.gir:
* tests/scanner/utility.h:
Add a new test for external enum references
svn path=/trunk/; revision=397
|
|
|
|
|
|
|
|
|
|
|
|
| |
2008-08-14 Johan Dahlin <johan@gnome.org>
* giscanner/glibtransformer.py:
* giscanner/utils.py:
Refactor a bit, avoid isinstance and add a method
for each type we parse.
svn path=/trunk/; revision=367
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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-06-03 Johan Dahlin <jdahlin@async.com.br>
* giscanner/Makefile.am:
* giscanner/ast.py:
* giscanner/girwriter.py:
* giscanner/glibast.py:
* giscanner/glibtransformer.py:
* giscanner/transformer.py:
* giscanner/utils.py:
* tests/parser/Foo-expected.gir:
Improve enum member parsing and introspection
svn path=/trunk/; revision=283
|