summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* giscanner: Create AST nodes for SECTION: doc blocks; add a GIR nodeJasper St. Pierre2014-02-121-0/+7
| | | | | These will eventually be paired with the sections file parser to create a set of sections.
* giobjectinfo: Add missing transfer annotation to find_signal ()Rico Tzschichholz2014-01-231-1/+1
|
* typelib compiler: properly initialise memoryRyan Lortie2013-12-302-1/+4
| | | | | | | | | | | | | | The typelib compiler was writing uninitialised memory to the output file. There were two sources of this uninitialised memory: the hash writer included some uninitialised memory in its output, and the bytes added after the hash output for padding were also not being initialised. Fix this by passing the padded size to the hash code writer function and having that function initialise the entire memory region to zero before writing. https://bugzilla.gnome.org/show_bug.cgi?id=721177
* scanner: Support boolean constantsFlorian Müllner2013-11-291-2/+2
| | | | | | | | 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
* girnode: Fix a NULL pointer deference if a namespace can’t be foundPhilip Withnall2013-11-061-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=711541
* GIVFuncInfo: allow retrieving the address of an interface vfuncGiovanni Campagna2013-10-221-5/+31
| | | | | | | | Don't assume that the parent of a GIVFuncInfo is a GIObjectInfo, it could be a GIInterfaceInfo, if the vfunc is part of interface instead of a class. https://bugzilla.gnome.org/show_bug.cgi?id=688375
* docs: fix up reference docs a bitDieter Verfaillie2013-10-1043-449/+1018
| | | | | | | | | | | | | - require GTK-Doc 1.19 - remove sgml mode - automatically generate gi.types (needs GTK-Doc 1.19) - fix https://bugzilla.gnome.org/show_bug.cgi?id=700025 [WIP] - rearange sections a bit [WIP] - add gi-building, gi-programming sections [WIP] - mark missing docs with TODO, which is only marginaly better than nothing but at least can be grepped :) https://bugzilla.gnome.org/show_bug.cgi?id=571648
* girepository: remove glib-compatDieter Verfaillie2013-10-093-27/+0
| | | | | We depend on glib-2.0 >= 2.36.0, so no need to keep a 2.22.X compatibility symbol around...
* giscanner: fix description field storage in .gir filesDieter Verfaillie2013-10-081-1/+2
| | | | | | | | | | | | | | | | | | GTK-Doc description fields for tags can contain multiple lines and even multiple paragraphs. Whitespace cannot be preserved in XML attributes, so we move the "deprecated" description text into a "<doc-deprecated />" element right next to where we already have the "<doc />" element. Keep the "deprecated" attribute around for backwards compatibility though, but set its value to "1" (analogous to the "writable", "contruct", etc attributes) if the annotated symbol is marked as deprecated. While at it, add <doc-version /> and <doc-stability /> which was not yet available in the .gir files... This takes care of the "Since:", "Stability:" and "Deprecated:" GTK-Doc tags. Nothing needs to be done for the "Returns:" tag as as we already write a "<doc />" child element on "<return-value />".
* giscanner: store code before and after comment blockDieter Verfaillie2013-10-081-1/+1
| | | | | | so we can later use them to re-write source files containing broken GTK-Doc comment blocks where /** is preceded by and/or */ is followed by code...
* Use case insensitive compare for signal "when" attributeSimon Feltman2013-10-051-2/+2
| | | | | | | | Update parser to use g_ascii_strcasecmp instead of strcmp. This fixes incorrect flags being set when the incomming gir is using lowercase values for the "when" attribute. https://bugzilla.gnome.org/show_bug.cgi?id=709462
* g_irepository_dump: Update doc to match codeSimon Kågedal Reimer2013-06-051-2/+4
| | | | | | | The input file no longer only consists of names of get_type-functions, instead begins with either "get-type:" or "error-quark:". https://bugzilla.gnome.org/show_bug.cgi?id=701639
* Add printf attributeChristian Persch2013-05-051-0/+3
| | | | | | This fixes a compiler warning when using -Wmissing-format-attribute. https://bugzilla.gnome.org/show_bug.cgi?id=698521
* typelib: Also ignore typelibs with empty c:prefixColin Walters2013-04-151-1/+1
| | | | | | | As seen in xlib.gir at least; this is something we should probably ban though. https://bugzilla.gnome.org/697759
* girparser: Also honor legacy c:prefixColin Walters2013-04-151-0/+3
| | | | | | | vala generates this, and we need to honor it now that we're using the c:prefix as an optimization when searching for gtypes. https://bugzilla.gnome.org/697759
* gitypelib: And another fix for empty stringsColin Walters2013-04-081-3/+12
|
* typelib: Fix logic error in previous commitColin Walters2013-04-081-3/+8
|
* typelib: Only malloc once during string iterationColin Walters2013-04-081-8/+60
| | | | Just more efficient.
* Optimize g_irepository_find_by_gtypeDaniel Drake2013-04-083-79/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | When g_irepository_find_by_gtype() doesn't succeed on a simple prefix match (the current 'fastpass' mechanism), it ends up taking a considerable amount of CPU time, traversing the contents of all typelibs. I imagine that the reasons to have the exhaustive search fallback are not as strong as they used to be. For example, the case mentioned (Clutter including Cogl) no longer seems to be true. Also, typelibs (as generated by g-ir-scanner) now provide comma-separated C prefix info for cases when the typelib includes introspection info for multiple prefixes. For example, the Sugar typelib has a c_prefix string of Sugar,EggSM,Gsm,Acme. So I imagine there are not many remaining justified cases where the exhaustive search is needed. With that in mind, I found two ways to optimize this function: 1. Support comma-separated C prefixes 2. Don't bother with an exhaustive search if we did find a typelib claiming support for the prefix. For example, if we're looking for GdkDeviceManagerXI2 (currently non-introspectable) and we already found typelib files providing the 'Gdk' prefix that didn't offer this, lets not bother with the exhaustive search, we aren't going to find anything.
* girepository: Use g_atomic for refcountingColin Walters2013-04-022-15/+19
| | | | | | | | They could be freed in separate threads (e.g. language binding GC thread). But no particular reason to change other than noticing it during code inspection for a different bug. https://bugzilla.gnome.org/show_bug.cgi?id=688694
* GIRepository: add API for extending library pathsGiovanni Campagna2013-02-243-24/+69
| | | | | | | | | | Previously we would require applications that shipped with private typelibs to add the private path to LD_LIBRARY_PATH, or to have a launcher binary with the right RPATH. Now they can just call GIRepository.prepend_library_path() before they access the module. https://bugzilla.gnome.org/show_bug.cgi?id=694485
* girepository: Document g_enum_info_get_error_domainTorsten Schönfeld2013-02-151-0/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=693838
* girparser: Serialize and read back the instance_parameterJasper St. Pierre2013-02-011-0/+5
| | | | | | | | g-ir-doc-tool wants to use the instance parameter to read docs and the parameter name, so it needs to be shuttled through the GIR. https://bugzilla.gnome.org/show_bug.cgi?id=693040
* girparser: Clean up passthrough handlingJasper St. Pierre2013-02-011-6/+4
| | | | | | | Instead of remembering to have to set unknown_depth, smarten up state_switch to do it for us. https://bugzilla.gnome.org/show_bug.cgi?id=693040
* girparser: Move <doc> handling to passthroughJasper St. Pierre2013-02-011-27/+6
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=693040
* girepository: gchar is a signed typeMartin Pitt2013-01-111-1/+2
| | | | | | | gchar is signed, not unsigned. Add "guchar" alias as unsigned for completeness (but usually it appears as guint8). https://bugzilla.gnome.org/show_bug.cgi?id=691524
* build: Properly export g_interface_info_find_signalTorsten Schönfeld2013-01-071-0/+1
| | | | It was missing from girepository.symbols.
* repo: Drop deprecated GStaticMutex usageColin Walters2012-12-171-6/+6
| | | | In favor of GOnce, since we just want initialize-once semantics.
* docs: don't mark non GTK-Doc as being a GTK-Doc comment blockDieter Verfaillie2012-11-151-1/+1
| | | | | | This patch silences another gtkdoc-mkdb warning. https://bugzilla.gnome.org/show_bug.cgi?id=688418
* cmph: Remove leftover statement-without-effectColin Walters2012-10-301-1/+0
| | | | Compiler warning introduced from MSVC patches.
* girepository: Use girepository.symbols for Unix builds tooColin Walters2012-10-271-37/+2
| | | | | | | | Rather than having a regex for both builds, but *also* use a symbol file for the MSVC build which would bitrot quickly, force us to update the .symbols file by using it for Unix too. Add some missing symbols.
* Add girepository.symbolsChun-wei Fan2012-10-271-0/+229
| | | | | | | | This is the listing of symbols to export from the main libgirepository .dll/.so. This is used for example to generate the .lib file from the Windows DLL. https://bugzilla.gnome.org/show_bug.cgi?id=681820
* girepository: Remove C99ism and other updatesChun-wei Fan2012-10-275-15/+42
| | | | | | | | | | -Make code using libgirepository_internals relocatable on Windows, like what is done in the GTK+ stack, and the girepository DLL. -Remove C99isms -"interface" is a reserved keyword on certain compilers, so change that to "giinterface" https://bugzilla.gnome.org/show_bug.cgi?id=681820
* girffi.c: Don't include unistd.h unconditionallyChun-wei Fan2012-10-271-0/+2
| | | | | | It does not exist on all platforms https://bugzilla.gnome.org/show_bug.cgi?id=681820
* cmph: Remove C99ism and other fixesChun-wei Fan2012-10-2711-152/+252
| | | | | | | | | | | ...So that it will compile on non-C99 compilers. The changes are mainly moving the variable declarations to the start of the resecptive blocks. Also, replace the use of buflen in chd.c as it might not be defined for all platforms, instead using packed_cr_size as it seems to represent the value that is to be printed/displayed by the debugging output. https://bugzilla.gnome.org/show_bug.cgi?id=681820
* Drop calls to g_type_init()Colin Walters2012-10-163-4/+0
| | | | And bump our GLib requirement.
* ginvoke: support conversion of fundamental type GParamSpec valuesMark Nauwelaerts2012-09-031-0/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=683265
* girepository: Fix leak in g_vfunc_info_get_addressJasper St. Pierre2012-08-251-3/+7
| | | | | | We need to fix the struct info here. https://bugzilla.gnome.org/show_bug.cgi?id=682647
* girepository: Add g_interface_info_find_signalTorsten Schönfeld2012-08-252-0/+35
| | | | | | | Add the convenience method g_interface_info_find_signal, mirroring g_object_info_find_signal. https://bugzilla.gnome.org/show_bug.cgi?id=682672
* girffi: Fix g_callable_info_prepare_closure for certain callablesJasper St. Pierre2012-08-201-71/+44
| | | | | | | | Namely, those that are methods and those that throw GErrors. We have very similar code in two places that calculate arg lengths and argument types to stick into libffi. Merge, clean up, and correct both. https://bugzilla.gnome.org/show_bug.cgi?id=673805
* gicallableinfo: Add two new convenience methods: is_method and can_throw_gerrorJasper St. Pierre2012-08-203-27/+74
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=673805
* Fix buildJasper St. Pierre2012-06-291-2/+2
|
* fix GIArgument being exported as _Argument in .girAlan Knowles2012-06-281-3/+7
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=635128
* givfuncinfo: Fix memory leakJasper St. Pierre2012-05-251-0/+1
| | | | The field info wasn't being freed after it was used
* girepository: avoid crash when querying nonexistent infoPavel Holejsovsky2012-05-124-9/+17
| | | | | | | | | It appears that cmph library can return (n+1) when querying item not present in its original n-item-sized set. Adjust code so that it detects this condition and do not chase stray pointers resulting from this bogus(?) hash result. https://bugzilla.gnome.org/show_bug.cgi?id=675939
* Make introspection compile with -Wall -WerrorJohan Dahlin2012-04-0914-9/+91
| | | | | Address all gcc warnings, -Werror is not enabled yet but at least -Wall -Werror passes on my machine.
* Avoid _get_func() consuming reference from input infoPavel Holejsovsky2012-04-071-2/+1
| | | | | | | | | | | | Fix of leak in 4c9424e18d71237f438a99bc5f2d45ae7de60b78 was a bit overaggressive, stealing also one reference from input 'info' argument. Also fixes another bug in that commit - local 'func' shadowing the return value, causing that function always returned NULL even when some result was actually found. https://bugzilla.gnome.org/show_bug.cgi?id=673282
* Fix malformed GTK-Doc comment blocks:Dieter Verfaillie2012-04-053-5/+5
| | | | | | | | | | | | | | | | | - add missing colons - invalid annotations - invalid parameters and tags - correct parameter name - preserve description indentation - no description parts - comment end marker - invalid empty lines - line numbers AnnotationParser now emits warnings which are considered as errors by "make check" so fix those warnings... https://bugzilla.gnome.org/show_bug.cgi?id=672254
* Make g_callable_info_invoke publicTomeu Vizoso2012-03-275-41/+40
| | | | | | | | So it can be used for invoking callbacks https://bugzilla.gnome.org/show_bug.cgi?id=663052 Signed-off-by: Martin Pitt <martinpitt@gnome.org>
* repository: Remove extraneous leftover assignment to rvalue.Michel Dänzer2012-03-081-1/+0
| | | | | | Signed-off-by: Michel Dänzer <michel@daenzer.net> https://bugzilla.gnome.org/show_bug.cgi?id=668902