summaryrefslogtreecommitdiff
path: root/girepository/girwriter.c
Commit message (Collapse)AuthorAgeFilesLines
* girepository: Add g_irepository_get_immediate_dependencies()Philip Withnall2015-02-161-2/+2
| | | | | | | | | | | | | | | | g_irepository_get_dependencies() is supposed to return the transitive closure of all dependencies of the given namespace. However, it just loads the dependencies field from the typelib, which is supposed to only list immediate dependencies. Introduce a new g_irepository_get_immediate_dependencies() which does this, and rewrite g_irepository_get_dependencies() to build the transitive closure of all its namespace dependencies. This does not require loading any new typelibs, as the transitive closure of dependencies should already have been loaded by g_irepository_require() or g_irepository_load_typelib(). https://bugzilla.gnome.org/show_bug.cgi?id=743782
* Make introspection compile with -Wall -WerrorJohan Dahlin2012-04-091-2/+0
| | | | | Address all gcc warnings, -Werror is not enabled yet but at least -Wall -Werror passes on my machine.
* Add Emacs mode lines to C sourcesColin Walters2012-02-031-2/+2
|
* girepository: Add GI_VFUNC_THROWSColin Walters2012-02-031-0/+3
| | | | | | | | Virtual functions can definitely throw an error. Right now the scanner omits the GError parameter for them and adds throws="1", but g-ir-compiler ignores this. https://bugzilla.gnome.org/show_bug.cgi?id=669332
* Switch to storing string form of error quarksDan Winship2011-08-121-0/+4
| | | | | | | | | | | | | | | | Instead of storing the name of the function to call to get the error quark, store the string form of the error quark, which we derive from the introspection binary during scanning. Update EnumBlob and GIEnumInfo to include the new information. This will allow determining a back-mapping from error quark to error domain without having to dlsym() and call all the known error quark functions. Based on earlier patches from Owen Taylor and Maxim Ermilov. https://bugzilla.gnome.org/show_bug.cgi?id=602516
* Deprecate ErrorDomainDan Winship2011-08-121-40/+0
| | | | | | | | | | | | | | The previous ErrorDomain blob was never actually scanned or used, and it was kind of a lame API conceptually. To keep some compatibility, rather than removing the enumeration values, rename them to _INVALID, and don't bump the typelib version. This should in theory allow a new libgirepository to read an old typelib. Based on a patch from Colin Walters https://bugzilla.gnome.org/show_bug.cgi?id=602516
* Add support for the (skip) annotation on parameters or return valuesDavid Zeuthen2011-05-131-0/+6
| | | | | | | | This was discussed in bug 649657. https://bugzilla.gnome.org/show_bug.cgi?id=649657 Signed-off-by: David Zeuthen <davidz@redhat.com>
* Handle enumerations with the full range of signed and unsigned valuesOwen W. Taylor2010-11-011-2/+5
| | | | | | | | | | | | | 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
* Fix regression in g_irepository_get_infoColin Walters2010-10-211-1/+3
| | | | | | | 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] Rename GArgument to GIArgumentJohan Dahlin2010-08-311-4/+4
| | | | | Keep a typedef for backwards compatibility, until the major bindings has moved over.
* Don't include machine-dependent integral types in the typelibColin Walters2010-07-091-18/+0
| | | | | | | | | | | | | | | | | | | | 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
* Add support for non-GObject fundamental objectsJohan Dahlin2010-07-091-0/+22
| | | | | | | | | | | | | | This patch adds support for instantiable fundamental object types, which are not GObject based. This is mostly interesting for being able to support GstMiniObject's which are extensivly used in GStreamer. Includes a big test case to the Everything module (inspired by GstMiniObject) which should be used by language bindings who wishes to test this functionallity. This patch increases the size of the typelib and breaks compatibility with older typelibs. https://bugzilla.gnome.org/show_bug.cgi?id=568913
* Allow attributes on parameters and return valuesDavid Zeuthen2010-06-241-1/+20
| | | | | | | | | | | | | | | | | | Any annotation where the key has a dot in the name will go into the attribute list. For example * @arg: (foo.bar baz): some arg the parameter @arg will get the attribute with key foo.bar and value baz. This also works for. * Returns: (foo.bar2 baz2): the return value Also add tests for this new feature. See https://bugzilla.gnome.org/show_bug.cgi?id=571548 Signed-off-by: David Zeuthen <davidz@redhat.com>
* [girwriter] Use GSliceJohan Dahlin2010-06-121-5/+4
|
* [gir_writer_write] Document properlyJohan Dahlin2010-06-111-2/+2
|
* Support the (transfer) annotation for properties.Tomeu Vizoso2010-06-081-28/+24
| | | | | | | | | | | | * girepository/*: Add g_property_info_get_ownership_transfer() and write the transfer attribute of properties into the typelib. * giscanner/*: Parse the (transfer) annotation and write it into the .gir. * tools/generate.c: Read the transfer annotation for properties and write to the .tgir. https://bugzilla.gnome.org/show_bug.cgi?id=620484
* [girwriter] Refactor out of generate.cJohan Dahlin2010-06-071-0/+1402
| | | | | Move out the girwriter out of generate.c. Still a private API, but that will probably change in the future.
* Remove unused file girwriter.cJohan Dahlin2010-03-251-532/+0
|
* [girepository] Remove trailing whitespaceJohan Dahlin2010-03-241-2/+2
|
* Bug 557405 – Use 'allow-none' consistentlyTommi Komulainen2008-10-221-2/+2
| | | | | | | | | | | | | | | | | | 2008-10-22 Tommi Komulainen <tommi.komulainen@iki.fi> * docs/typelib-format.txt: * girepository/ginfo.c (g_arg_info_may_be_null): * girepository/girnode.c (g_ir_node_build_typelib): * girepository/girnode.h (struct _GIrNodeParam): * girepository/girparser.c (start_parameter): * girepository/girwriter.c (function_generate): * girepository/gtypelib.h (ArgBlob): * tests/errors.gir: * tests/function.gir: * tools/generate.c (write_callable_info): Use 'allow-none' consistently throughout svn path=/trunk/; revision=782
* Move shared *.[ch] files to girepository from toolsJohan Dahlin2008-08-091-0/+532
2008-08-09 Johan Dahlin <johan@gnome.org> * girepository/Makefile.am: * tools/Makefile.am: * tools/girmodule.c: * tools/girmodule.h: * tools/girnode.c: * tools/girnode.h: * tools/girparser.c: * tools/girparser.h: * tools/girwriter.c: * tools/girwriter.h: Move shared *.[ch] files to girepository from tools svn path=/trunk/; revision=337