summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix accessing structure fields that are arraysGiovanni Campagna2011-06-083-23/+10
| | | | | | | | | | We need to distinguish inline arrays inside structures, and arrays that are pointers and annotations, and we can do it with g_type_info_is_pointer(), setting it to FALSE for fixed size arrays. As a side effect, (array fixed-size=N) on a pointer type has no longer the expected result. https://bugzilla.gnome.org/show_bug.cgi?id=646635
* Assume only that an array is embedded in a struct if it's fixed sizeTomeu Vizoso2011-06-061-2/+6
|
* gifieldinfo.c: Quiet some compiler warningsColin Walters2011-05-231-0/+4
|
* Add Since: for g_arg_info_is_skip()Colin Walters2011-05-131-0/+1
|
* Add support for the (skip) annotation on parameters or return valuesDavid Zeuthen2011-05-139-2/+75
| | | | | | | | This was discussed in bug 649657. https://bugzilla.gnome.org/show_bug.cgi?id=649657 Signed-off-by: David Zeuthen <davidz@redhat.com>
* g_field_info_get_field: return correct pointer for C arrayMaxim Ermilov2011-05-041-1/+4
| | | | | | Also add a test case. https://bugzilla.gnome.org/show_bug.cgi?id=640468
* girparser: use c:identifier-prefixes instead of c:prefixSerkan Kaba2011-03-261-1/+1
| | | | | | | | This bug was introduced with http://git.gnome.org/browse/gobject-introspection/commit/?id=36aa515f1036978ced8d4ffb808260844f7229e0 due to rename of c:prefix to c:identifier-prefixes. https://bugzilla.gnome.org/show_bug.cgi?id=640264
* support setting gobjects and ginterfaces in struct fieldsJohn (J5) Palmieri2011-03-161-0/+17
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=644749
* Add "c:identifier" attribute to GIrNodeValue (for flags and enum values).GOBJECT_INTROSPECTION_0_10_3Laszlo Pandy2011-02-231-0/+6
| | | | | | | | | | | | | | | Flags and enums with a GType have a value_nick and value_name strings available in the class struct. But for flags and enums without GType, we need to get this information from introspection. g_base_info_get_name() gives the string for value_nick. In the GIR, the attribute "c:identifier" is the string neede for value_name. This patch adds the "c:identifier" from GIR to the typelib for all flags and enum values. It can be retireved using g_base_info_get_attribute(info, "c:identifier"). https://bugzilla.gnome.org/show_bug.cgi?id=642757
* GIrNode: fix lookup of cached type nodesGiovanni Campagna2011-02-211-11/+34
| | | | | | | | Different types of array have different type nodes, so they should produce different keys in the cache of already seen type nodes, to avoid turning a GByteArray into a reference to a GPtrArray. https://bugzilla.gnome.org/show_bug.cgi?id=642300
* Fix argument name of MISSING_ATTRIBUTE macro ('ctx' => 'context').Laszlo Pandy2011-02-171-1/+1
| | | | | | | The argument was called 'ctx' but the macro was using 'context'. This wasn't causing the build to fail because the variable 'context' was already defined in all the scopes where this macro was used.
* Account for arg direction in g_callable_info_get_ffi_arg_typesJonathan Matthew2011-02-091-1/+12
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=641647
* Pass shared-library as-is to g_module_openTomeu Vizoso2011-01-211-4/+0
| | | | | | Because it already has the lib prefix and the .so postfix https://bugzilla.gnome.org/show_bug.cgi?id=639961
* Add support for g[u]intptr in scanner and girwriter.Pavel Holejsovsky2011-01-131-3/+5
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=634838
* Add g_vfunc_info_invoke and g_vfunc_info_get_addressTomeu Vizoso2011-01-125-157/+323
| | | | | | | for calling the native implementation of a virtual function. Refactors the code common with g_function_info_invoke in _g_callable_info_invoke. https://bugzilla.gnome.org/show_bug.cgi?id=637145
* scanner: Rename g_irepository_dump when included from the dumperBenjamin Otte2011-01-111-2/+4
| | | | | This avoids a naming conflict when compiling GiRepository.gir, where g_irepository_dump() was defined in an included header.
* Avoid using namespace as identifier in public header filesKristian Rietveld2010-12-281-1/+1
|
* Don't emit shadowed methods into the typelibAndreas Rottmann2010-12-071-1/+4
| | | | Ignore shadowed methods when parsing the GIR.
* g_object_info_find_method_using_interfaces: Fix crash if not foundColin Walters2010-12-061-1/+1
| | | | If a method wasn't found, we'd try to unref NULL.
* g_object_info_find_method_using_interfaces: New functionColin Walters2010-12-062-0/+62
| | | | | | | | Pull this down into introspection from gjs; this will allow us to cache this better in the future (for example, by caching the infos for interfaces in the info for the object). https://bugzilla.gnome.org/show_bug.cgi?id=632924
* Add directory index sectionColin Walters2010-12-033-12/+164
| | | | | | | | | | Use the internal perfect hashing API to add an index to the directory. To support this, add the notion of additional "sections" to the typelib. A section index is inserted between the header and the directory. https://bugzilla.gnome.org/show_bug.cgi?id=554943
* Add internal hashing API designed for the typelibColin Walters2010-12-033-0/+292
| | | | | | | | | | | In multiple places in the typelib, but most importantly the directory, we need some fast indexing. Perfect hashing, as implemented by CMPH (previous commit), is an exact fit for the problem domain. Add an API built on top of CMPH which maps strings->guint16 (we just need a guint16 for the typelib index). https://bugzilla.gnome.org/show_bug.cgi?id=554943
* cmph-bdz-test: New testColin Walters2010-12-031-0/+141
| | | | Add a basic test of CMPH (without any layers on top).
* cmph: Squash a lot of gcc -Wall compiler warningsColin Walters2010-12-0321-26/+28
| | | | | | | * Functions taking no parameters need to explicitly say (void). * Mark some functions as static that are * Comment out an unused function in bdz.c * Change loop indicies "i" to be unsigned if our limit is unsigned
* cmph: Modify types to use GLib typesColin Walters2010-12-031-27/+10
| | | | | | | The 64 bit #ifdefs is just hackish and broken; e.g. it will fail on ppc64/linux and WIN64. Use the GLib typedefs, which I know are more correct.
* Import CMPH 1.0Colin Walters2010-12-0377-0/+12124
| | | | | This will be used for typelib indexing. See README-CMPH-IMPORT.txt for more information.
* girepository: Consistently prefix internal functions with _Colin Walters2010-11-167-302/+302
| | | | | This should better avoid them being exported. Rename girepository-parser.la to girepository-internals.la for clarity.
* gitypelib: Extend warning for validationColin Walters2010-11-161-1/+1
|
* Add support for gunichar in typelibColin Walters2010-11-128-7/+18
| | | | | | | Some API such as gtk_text_iter_get_char returns an individual "gunichar"; we should support this. https://bugzilla.gnome.org/show_bug.cgi?id=633197
* Add g_object_info_find_signalColin Walters2010-11-122-0/+35
| | | | | | | This matches g_object_info_find_method, and allows us to add indexing later. https://bugzilla.gnome.org/show_bug.cgi?id=633204
* Export gi_type_tag_get_ffi_typeColin Walters2010-11-094-7/+14
| | | | | | This is needed by the offsets code, and is generally useful. We need to export it for a future patch which won't export symbols with a leading _.
* 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.