summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* Switch to nonrecursive make for core (i.e. not tests/)Colin Walters2010-11-091-73/+0
| | | | | This is cleaner and faster, and prepares us better for an incoming import of CMPH.
* Handle enumerations with the full range of signed and unsigned valuesOwen W. Taylor2010-11-018-17/+28
| | | | | | | | | | | | | 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
* Compute enumeration storage types more accuratelyOwen W. Taylor2010-11-011-25/+61
| | | | | | | | | | Previously we just were sloppy and didn't bother to accurately compute signed/unsigned for enumeration types. But since we expect bindings to decode a field value or function return value from an integer to an enumeration they have know whether an integer value is 0xffffffff or -1, so we need to do the full computation. https://bugzilla.gnome.org/show_bug.cgi?id=629704
* girepository: Use G_TYPE_TAG_IS_BASIC consistentlyColin Walters2010-10-262-6/+4
| | | | This is a preparatory patch for adding a new basic tag.
* Fix regression in g_irepository_get_infoColin Walters2010-10-212-3/+7
| | | | | | | Commit f97cc8687469f25752f79275 broke the lookup in g_irepository_get_info; the passed offset is 0-based, then we convert it to 1-based (and then back to 0 later...which needs to be fixed).
* girepository: Refactor lookup codeColin Walters2010-10-183-146/+150
| | | | | | | | | | | This is a cleanup patch in preparation for future indexing patches. The lookup code was a mess trying to mash in the 3 different cases of name, GType, and index into one mega-function. Split it up properly, and move the core typelib internal-scanning bits into gitypelib.c where it belongs.
* typelib: Don't fail on minor versiong-i-0.9Colin Walters2010-10-111-1/+1
| | | | | | Previously we bombed out if the minor version didn't match what we expected; this was silly since the whole point of the minor version is to enumerate compatible changes.
* Improve documentation for g_registered_type_info_get_g_typeGOBJECT_INTROSPECTION_0_9_11Johan Dahlin2010-10-061-1/+4
|
* dumper: Make g_irepository_dump static when being used in dumperColin Walters2010-10-011-0/+3
| | | | Otherwise we'll bomb out if CFLAGS contains -Werror.
* scanner: Don't link to -lgirepository when dumpingGOBJECT_INTROSPECTION_0_9_9Colin Walters2010-09-302-2/+11
| | | | | | | | This helps us avoid a problematic case where in say jhbuild, using a system (/usr/lib) glib, adding in -l girepository-1.0 will inject -L /path/to/builddir, when we don't want that. https://bugzilla.gnome.org/show_bug.cgi?id=630342
* Actually do something about fundamentals when parsing a .girTomeu Vizoso2010-09-291-0/+2
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=630710
* Fix memory leak.Pavel Holejsovsky2010-09-251-2/+8
|
* Update annotations for GIRepository.Repository.Pavel Holejsovsky2010-09-152-16/+16
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=628753
* Box GIBaseInfo structure.Pavel Holejsovsky2010-09-152-0/+18
| | | | | | This puts it into typelibs and allows to use it safely from scripts. https://bugzilla.gnome.org/show_bug.cgi?id=628753
* typelib compiler: Passthrough <doc> at any pointColin Walters2010-09-141-1/+1
| | | | This should have been in the previous commit.
* [girepository] Add a missing includeJohan Dahlin2010-09-071-0/+1
|
* [girepository] Support strict align platformsJoe Marcus Clarke2010-09-071-4/+7
| | | | | | Such as Sparc64. https://bugzilla.gnome.org/show_bug.cgi?id=620769
* Remove extra lines from the license commentTomeu Vizoso2010-09-061-2/+0
|
* [VFuncBlob] Unknown struct offset should be 0xFFFFSteve Frécinaux2010-09-061-1/+1
| | | | | | | | | | | | Documentation says about g_vfunc_get_offset(): "Obtain the offset of the function pointer in the class struct. The value 0xFFFF indicates that the struct offset is unknown." But g-ir-compiler did set the value to 0 when the offset is unknown. This patch fixes it. https://bugzilla.gnome.org/show_bug.cgi?id=628270
* [girepository] Document GIStructInfo & GIUnionInfoPavel Holejsovsky2010-09-057-11/+221
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=628753
* scanner: Fix previous rename-to handling commitColin Walters2010-09-031-1/+1
|
* scanner: Fix rename-to handlingColin Walters2010-09-031-0/+5
| | | | | We were writing the attributes backwards. Also actually use the attribute in the typelib generation.
* girepository: Call init_globals()Colin Walters2010-09-021-11/+13
| | | | | This fixes the search path initialization if g_irepository_require is called first thing.
* girepository: Fix compatibility typedefsColin Walters2010-09-011-4/+5
|
* [GIRepository] Add missing transfer and skipJohan Dahlin2010-08-315-9/+9
|
* [GIRepository] Rename GTypelib to GITypelibJohan Dahlin2010-08-3111-123/+124
| | | | | Keep a typedef for backwards compatibility, until the major bindings has moved over.
* [GIRepository] Rename GArgument to GIArgumentJohan Dahlin2010-08-318-21/+26
| | | | | Keep a typedef for backwards compatibility, until the major bindings has moved over.
* [girepository] Add a couple of missing transferJohan Dahlin2010-08-311-7/+16
|
* scanner: Avoid internal invalid Type instances from parentsColin Walters2010-08-311-8/+8
| | | | | We were adding a trailing ',' in the parent string, clean that up; and don't attempt to create a Type from the empty string.
* Major rewriteColin Walters2010-08-313-41/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Use GLib types consistentlyColin Walters2010-08-313-67/+41
| | | | | | | | | Rather than have the scanner/parser handle both e.g. "glong" and "long", simply use the GLib types everywhere. This commit adds TYPE_LONG_LONG and TYPE_LONG_DOUBLE to the scanner types; however, rather than add them to the typelib, they're just marked as not-introspectable.
* Move alias target to <type>Colin Walters2010-08-311-27/+72
| | | | | | | This makes type parsing more uniform. Delete the typedef for GSList in foo.h - that's not supported anymore, or at least for now.
* Fix warning when using g_irepository_enumerate_version()Steve Frécinaux2010-08-181-3/+6
| | | | | | The reason for the warning was that g_irepository_get_version() expects the typelib to be already loaded, but enumerate_version() can be called on typelibs that are not.
* Include the loaded version in g_irepository_enumerate_versions()Steve Frécinaux2010-08-181-2/+13
| | | | | | | | | | | | | | | | | | | Logically speaking, the already loaded version of a namespace is part of the currently available versions, and can be forgotten if we only consider the versions available in GI_TYPELIB_PATH, as it could have been loaded using g_irepository_require_private(). As a side effect, it meant that bindings relying on enumerate_version() (like pygobject) were not able to require private versions through their classical requirement scheme. This patch fixes it by adding the loaded version to the unsorted list of available versions returned by g_irepository_enumerate_versions() This patch also uses g_list_prepend() instead of g_list_append() in that function. https://bugzilla.gnome.org/show_bug.cgi?id=625983
* [gircompiler] Clean up parsingColin Walters2010-08-177-214/+241
| | | | | | | | | | | | | | We never actually include multiple modules in the compiler, so just nuke that. Also rather than passing around GIrModule consistently pass around a GIrTypelibBuild structure which has various things. This lets us maintain a stack there which we can walk for better error messages. Also, fix up the node lookup in giroffsets.c; previously it didn't really handle includes correctly. We really need to switch to always using Foo.Bar (i.e. GIName) names internally...
* [girepository] Fix up error printingColin Walters2010-08-172-4/+19
| | | | | | | We didn't show the right error message if we failed to find the symbol; fix this by removing error printing from the middle of the dumper, and add it correctly to the toplevel dump entry point.
* [girparser] Cleanly pass through c:includeColin Walters2010-08-171-0/+13
|
* Do not leak typelibs with wrong header info.GOBJECT_INTROSPECTION_0_9_3Steve Frécinaux2010-08-031-0/+2
| | | | | | | Previously the typelibs that were loaded but whose header information weren't right were just leaked. https://bugzilla.gnome.org/show_bug.cgi?id=625672
* Add new API g_typelib_require_private()Steve Frécinaux2010-08-032-35/+94
| | | | | | | This is equivalent to g_typelib_require() but intended for use with private typelibs, which get loaded from the provided directory. https://bugzilla.gnome.org/show_bug.cgi?id=625672
* Add BLOB_TYPE_FLAGS to BLOB_IS_REGISTERED_TYPEColin Walters2010-07-281-0/+1
|
* [girepository-private] Add ffi declarationsJohan Dahlin2010-07-281-0/+9
| | | | | Add declarations for the ffi closure api we're using, this silents GCC warnings on systems with broken ffi headers.
* [girepository] Update documentationJohan Dahlin2010-07-281-2/+12
|
* [GIRepository] Rename g_irepository_enumerateJohan Dahlin2010-07-282-10/+11
| | | | Rename it to g_irepository_enumerate_versions
* Add g_info_type_to_string (GIInfoType type)Tomeu Vizoso2010-07-282-0/+57
|
* Add g_irepository_enumerateColin Walters2010-07-272-14/+59
| | | | This will be used for pygobject to enumerate namespaces.
* [girepository] Include path to file in typelib load failure errorColin Walters2010-07-221-3/+13
| | | | This makes version conflicts more obvious.
* Fix two compilation warningsColin Walters2010-07-191-1/+1
|
* [girepository] Fix ordering in override_search_pathFlorian Müllner2010-07-151-0/+3
| | | | | | Entries in the GI_TYPELIB_PATH environment variable are added to the global search path in reverse order - instead, add entries in the same order in which they are specified.
* [girepository] Actually verify header of loaded typelibs in ↵Colin Walters2010-07-144-25/+71
| | | | | | | | g_irepository_require Take a GError * for typelib loading code, validate the header. This fixes bizarre errors from gjs where g_irepository_require would happily load old typelibs.
* Don't include machine-dependent integral types in the typelibColin Walters2010-07-099-224/+79
| | | | | | | | | | | | | | | | | | | | Previously we had both e.g. GI_TYPE_TAG_LONG and GI_TYPE_TAG_INT64, but in fact the typelib is already machine-specific, so it makes sense to just encode this as a fixed type. The .gir remains abstract. We also remove size_t from the typelib; one would never want to treat it differently than an integer. time_t is removed as well; while bindings like gjs had special handling to turn it into e.g. a JS Date object, I don't think we should encourage people to use these POSIX types in their API. Use GTimeVal or the like instead. Because the typelib is now really machine-specific, we need to remove the -expected.tgirs from git. (We could potentially add a check which wasn't just a literal diff later) https://bugzilla.gnome.org/show_bug.cgi?id=623774