summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* 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
* repository: Add new public gi_type_info_extract_ffi_return_value() APIColin Walters2012-03-052-7/+11
| | | | | | | | | | | Dealing with FFI and return values is very tricky; this API allows sharing the bits to do it between gobject-introspection and gjs (and potentially other FFI binding consumers). **NOTE** I swapped the order of the arguments, under the premise that out arguments should generally be last. https://bugzilla.gnome.org/show_bug.cgi?id=668902
* repository: Fix conversion of FFI values on big-endian architecturesMichel Dänzer2012-03-052-42/+203
| | | | | | | | | | | Adapted from the fixes for (see bug 665152). It makes sure values are properly converted between glib and FFI, which is critical for big endian architectures. Patch adjusted to use GIArgument instead of custom union types by Colin Walters <walters@verbum.org> https://bugzilla.gnome.org/show_bug.cgi?id=668902
* repository: Ensure error is set if we're parsing a malformed fileJean Bréfort2012-02-171-4/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=661951
* girffi: Virtual functions are methodsJasper St. Pierre2012-02-101-1/+1
|
* typelib: Fix invalid alignment assumptionsThorsten Glaser2012-02-081-1/+7
| | | | | | | | | | | The current source has invalid assumptions about structure alignment that break on platforms like m68k where 32-bit integers are aligned to 16-bit only. Fix this by introducing explicit structure padding for 32-bit quantities following odd numbers of 16-bit quantities and structure trail padding, to make the binary representation generated by the compiler match the text of the specification exactly. https://bugzilla.gnome.org/show_bug.cgi?id=661839
* Plug memory leak in lazy typelibs hash tableJesse van den Kieboom2012-02-051-1/+3
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=669317
* girffi: Fix g_function_info_new_for_address to respect G_VFUNC_THROWSJasper St. Pierre2012-02-031-1/+8
|
* Add Emacs mode lines to C sourcesColin Walters2012-02-0356-58/+111
|
* girepository: Add GI_VFUNC_THROWSColin Walters2012-02-037-2/+20
| | | | | | | | 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
* giobjectinfo: Add g_object_info_find_vfunc_using_interfacesJasper St. Pierre2012-02-032-0/+63
| | | | | As an analogue to g_object_info_find_method_using_interfaces, add a new API so that we can find a vfunc using the same strategy.
* girffi: Add new g_function_invoker_new_for_addressJasper St. Pierre2012-02-032-14/+70
| | | | | This is a new method designed to make a GIFunctionInvoker for any GICallableInfo*, for bindings to use.
* girffi: Fix compiler warningsJasper St. Pierre2012-01-061-12/+9
|
* repository: Squash memory leak in _get_func and fix up styleJasper St. Pierre2012-01-061-17/+19
|
* ffi: Treat enums as 32 bit signed values to fix PPC64Ray Strode2011-12-211-12/+48
| | | | | | | | | | | | | | | | | | | | | | To call a function dynamically using ffi, the caller first has to tell ffi the size of all the input arguments of the function. On little endian architectures (like x86_64) specifying a size that's too large will happen to work because of how the bits are laid out in memory. On big endian architectures, however, specifying the wrong size can lead to reading the wrong bits. The function g_type_info_get_ffi_type maps input giargument types to specific sizes. It was assuming enums were word (pointer) sized; in fact they can be in theory any size (1,2,4,8 bytes), but in practice in introspection (via GIArgument) as well as GValue we're limited to 4 byte enums. This commit fixes PPC64 (big endian, 64 bit). Signed-off-by: Colin Walters <walters@verbum.org> https://bugzilla.gnome.org/show_bug.cgi?id=665150
* gitypelib: Fix compiler warningsJasper St. Pierre2011-12-011-20/+0
| | | | | | These variables are unused. https://bugzilla.gnome.org/show_bug.cgi?id=665249
* gibaseinfo: Fix compiler warningsJasper St. Pierre2011-12-011-1/+1
| | | | | | | g_slice_free complains when you pass it a pointer of a different type than it was expecting, like it should. https://bugzilla.gnome.org/show_bug.cgi?id=665249
* Use the correct size when freeing unused infoSjoerd Simons2011-10-201-1/+4
| | | | | | | A GIBaseInfo struct can underneath either be GIRealInfo *or* GIUnresolvedInfo if the type is GI_INFO_TYPE_UNRESOLVED. So when we eventually free the structures slice use the correct struct type otherwise things get unhappy.
* parser: prevents a segfault when _g_ir_parser_parse_string returns NULL ↵Alberto Ruiz2011-10-181-0/+5
| | | | | | | | | | error was not set. Noticed the segmentation fault while using Vala to generate a .gir, a bug has been filed tomake sure Vala doesn't export gir symbols outside of a namespace (see https://bugzilla.gnome.org/show_bug.cgi?id=661952) https://bugzilla.gnome.org/show_bug.cgi?id=661951
* giconstantinfo: Add API to fix memory leakJasper St. Pierre2011-10-052-0/+32
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=654069
* repository: Fix g_irepository_get_c_prefix()Colin Walters2011-09-211-1/+1
| | | | | | It was returning the wrong data. https://bugzilla.gnome.org/show_bug.cgi?id=659749
* Fix g_type_info_is_pointer() for overriden types of arguments.Pavel Holejsovsky2011-09-121-0/+4
| | | | | | | | | Algorithm which detects whether argument type is pointer checks for trailing '*' characters in c:type .gir elements. This failed if ctype is either 'gpointer' or 'gconstpointer'. Add specific check for gpointer/gconstpointer types when deducing pointerness of the type. https://bugzilla.gnome.org/show_bug.cgi?id=658848
* Windows port: compute GOBJECT_INTROSPECTION_LIBDIR at runtime.Dieter Verfaillie2011-09-071-0/+33
| | | | | | | | | | | Otherwise, we fail to properly locate the typelibs, because on Windows the value of GOBJECT_INTROSPECTION_LIBDIR depends on where Glib has been installed. Due to the nature of how we handle software that depends on Glib on Windows (it is recommended that each program bundles it's private copy), we're working in a "multi-prefixed" environment. Hence the value computed at build time will most likely not even exist at runtime. https://bugzilla.gnome.org/show_bug.cgi?id=620566
* Windows port: cmph_time.h includes sys/resource.h which is not available on ↵Dieter Verfaillie2011-09-071-5/+3
| | | | | | | | Windows. So only include it when WIN32 is not defined. https://bugzilla.gnome.org/show_bug.cgi?id=620566
* gi-dump-types: New uninstalled debugging programColin Walters2011-09-032-0/+36
| | | | Usage: ./_build/gi-dump-types g_object_get_type
* girffi: Remove unnecessary sys/mman.h includeColin Walters2011-09-031-2/+2
| | | | While we're here move config.h to the top for consistency.
* Fix g_irepository_find_by_gtype() for GDK_TYPE_RECTANGLEPavel Holejsovsky2011-08-251-0/+11
| | | | | | | | | | | | | | | | | | Complement fix for g-ir-scanner which converts every GdkRectangle gtype to CairoRectangleInt. Make sure that C-side API is also aware of this workaround. Use case requiring this patch: When binding implementation wants to get/set property, it can use either GI-based approach (g_property_info_xxx() funcs), or just GLib facilities. Although former is probably preferred, there are cases when latter is still needed (e.g. gstreamer uses dynamic properties, which are not present in the gir). In this case, binding implementation queries the type of the propertyb (using g_object_class_find_property()), it gets GDK_TYPE_RECTANGLE, and without the patch it cannot map it to any known type. https://bugzilla.gnome.org/show_bug.cgi?id=655423
* Add 'Since:' tags to the newly added GIEnumInfo methodsTorsten Schönfeld2011-08-181-0/+4
|
* Allow enums and bitfields to have static methodsTorsten Schönfeld2011-08-167-10/+115
| | | | | | | | | | | | | This uses the same backcompat machinery that was introduced for static methods for non-class types, so this change does not break users of the existing presentations. New libgirepository API: g_enum_info_get_n_methods g_enum_info_get_method https://bugzilla.gnome.org/show_bug.cgi?id=656499
* Add signal flagsJohan Dahlin2011-08-131-1/+25
| | | | | | This adds all GSignalFlags into the gir. https://bugzilla.gnome.org/show_bug.cgi?id=656457
* Add g_irepository_find_by_error_domain()Dan Winship2011-08-124-0/+118
| | | | | | | | Add a method to look up a GIEnumInfo given its associated error quark. Based on a patch from Colin Walters. https://bugzilla.gnome.org/show_bug.cgi?id=602516
* Switch to storing string form of error quarksDan Winship2011-08-128-17/+104
| | | | | | | | | | | | | | | | 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-1216-494/+18
| | | | | | | | | | | | | | 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
* girepository: fix some doc comment syntaxDan Winship2011-08-121-6/+6
|
* Rename ALIGN to GI_ALIGN to prevent redefining this macro on some platformsJasper Lievisse Adriaanse2011-06-211-5/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=652625
* Free allocated ffi_types in g_callable_info_free_closure()Giovanni Campagna2011-06-201-0/+1
| | | | | | | g_callable_info_prepare_closure() allocates memory for the argument types in the ffi_cif, so we need to free it. https://bugzilla.gnome.org/show_bug.cgi?id=652954
* Rework how fundamental GObject types are introspectedGiovanni Campagna2011-06-082-2/+4
| | | | | | | | | | | Change the special code for handling GObject and GInitiallyUnowned so that it exposes GParamSpec as a class, and it allows GVariant to have a GType without using the deprecate g_variant_get_gtype. It is a sort of ABI break, in that new typelibs won't work with previous versions of libgirepository. https://bugzilla.gnome.org/show_bug.cgi?id=646635