summaryrefslogtreecommitdiff
path: root/girepository
Commit message (Collapse)AuthorAgeFilesLines
* Correctly ref repository in GIUnresolvedInfoColin Walters2009-09-041-1/+1
| | | | Followup to previous patch.
* Bug 593322 - Fix unref of GIUnresolvedInfo instancesColin Walters2009-09-041-0/+8
| | | | | | | | We are treating GIUnresolvedInfo as a GIBaseInfo, but the structures had drifted out of sync. Add a repository pointer and bring them back into sync. Based on a report and patch from Jan Hudec <bulb@ucw.cz>
* [typelib] Clean up dlopen handlingColin Walters2009-08-193-83/+92
| | | | | | | | | | | | It's was busted that g_typelib_new_* does the dlopen() since that caused g-ir-compiler to load the modules even though it wasn't going to do anything with them. Instead, change things so that g_module_symbol does the dlopen on-demand. Remove the extra dlopen(NULL) inside girepository.c, we had another already in gtypelib.c. Thanks to Owen Taylor for suggesting this approach.
* Don't open shared libraries twiceOwen W. Taylor2009-08-131-2/+4
| | | | | | If loading a referenced shared library succeeds, don't try loading it again. http://bugzilla.gnome.org/show_bug.cgi?id=591737
* Fix checks in gfield.cOwen W. Taylor2009-07-091-3/+3
| | | | | | | When checking if the readable/writable flags are missing for the fields we are trying to read and write, use (a & flag) == 0, not (!a & flag). http://bugzilla.gnome.org/show_bug.cgi?id=579727
* Sync the basic types array in girnode.c:serialize_type with GITypeTagDan Winship2009-07-061-3/+4
| | | | | | Fixes a crash compiling GIRepository-2.0.gir. http://bugzilla.gnome.org/show_bug.cgi?id=587823
* Name unions to enable compilation on SolarisTobias Mueller2009-06-244-39/+39
| | | | | Patch by Brian Cameron <brian.cameron@sun.com>. Fixes bug 578199.
* Bug 584423 – Add short/ushort supportMark Lee2009-06-228-18/+56
| | | | | | | | | Add type tags for short and ushort, plus all of the requisite code needed to utilize them in libgirepository. Add support in the scanner's AST files. Add test functions to the everything library and the expected gir file. gtypelib.c constant validation fixed by Colin Walters <walters@verbum.org>
* Bug 585328 - Only set zero_terminated flag for types we know areSimon van der Linden2009-06-171-0/+6
| | | | | Rationalize our setting of the zero_terminated flag; we shouldn't set it if the gir doesn't say to.
* Bug 585584: Fix warnings in girparser backtrace functionality and compiler.cC. Scott Ananian2009-06-121-3/+6
|
* Make g-ir-compiler find files installed by make installHolger Hans Peter Freyther2009-06-111-2/+8
| | | | | | | | | | | When ./configure --prefix $HOME/some/where is used gobject-introspection will happily install the files into $HOME/some/where/data/gir-1.0 but it will refuse to find them. Apply the same trick as in girepository/girepository.c:init_globals to find the gir files. Unifiy the name gir-1.0 in GIR_SUFFIX and use it throughout the project, introduce GIR_DIR which holds the path to the gir files and update girparser and transformer.py to look into this path.
* Update doc comments.C. Scott Ananian2009-05-121-3/+1
| | | | | | The enumeration values cited here were out of date. Rewrite to eliminate the explicit mention of the enumeration value, to prevent it from drifting out of date again in the future.
* Fix 'Could not find GIR file ...' error to use right filename.Dan Winship2009-03-281-10/+8
| | | | Also plug a leak; girname was previously only freed on error.
* Bug 576605 - Get rid of GI_SCOPE_TYPE_OBJECTAndreas Rottmann2009-03-272-4/+0
| | | | Remove support for (scope object) as it lacks a real use case.
* Bug 576323 - Fix inner constant parsing Signed-off-by: Didier 'Ptitjes ↵Didier 'Ptitjes2009-03-241-1/+1
| | | | | | <ptitjes@free.fr> Signed-off-by: Colin Walters <walters@verbum.org>
* Bug 564016 - Include c:prefix in typelib, use it to optimize find_by_gtypeColin Walters2009-03-177-12/+98
| | | | | | | Parse the c:prefix from the .gir, include it in the header. Armed with this information, we can now optimize lookups of GTypes because we have the requirement that GTypes must start with the c:prefix. We do fall back though if a lookup fails.
* Bug 557383 - Virtual method supportColin Walters2009-03-056-4/+170
| | | | | | | | | | | | | | | | Broadly speaking, this change adds the concept of <vfunc> to the .gir. The typelib already had most of the infrastructure for virtual functions, though there is one API addition. The scanner assumes that any class callback slot that doesn't match a signal name is a virtual. In the .gir, we write out *both* the <method> wrapper and a <vfunc>. If we can determine an association between them (based on the names matching, or a new Virtual: annotation), then we notate that in the .gir. The typelib gains an association from the vfunc to the function, if it exists. This will be useful for bindings since they already know how to consume FunctionInfo.
* Bug 571548 - Generic attributesColin Walters2009-03-038-71/+324
| | | | | | | | We now support an extensible mechanism where arbitrary key-value pairs may be associated with almost all items, including objects, methods, and properties. These attributes appear in both the .gir and the .typelib.
* Add a parent parmeter to g_ir_node_build_typelibColin Walters2009-02-273-38/+41
| | | | This will be useful for later changes which need to inspect the parent.
* Bug 572434 - Associate interfaces with their C structuresColin Walters2009-02-257-33/+64
| | | | | | | | Similar to GObject class structs, we pair up GInterfaces with their C structures. Also, move some GLib-specific things into glibast.py, and make the naming more generic.
* Bug 572965 – Allow generic marshaller to be called without parametersJohan Bilien2009-02-241-8/+16
| | | | | girepository/ginvoke.c: handle the case where n_param_values == 0. tests/invoke/genericmarshaller.c: add a test case for this.
* typelib building: Compress 5 arguments for g_ir_node_build_typelibColin Walters2009-02-203-99/+67
| | | | | This makes it easier to add more over time without changing lots of unrelated code.
* Further cleanup for commented-out Union discriminator handlingColin Walters2009-02-191-6/+1
|
* Fix bad merge introduced in commit b006d50Colin Walters2009-02-191-3/+8
|
* Bug 571373 - Add padding to typelib objectsColin Walters2009-02-182-13/+36
| | | | | | Expand various typelib objects to ensure we have at least 16 bits left for each one to add another string indirection or directory offset, and also that we have at least a few bits for more flags.
* Bug 571373 - Remove hardcoded sizes/offsets in girnode.cColin Walters2009-02-181-73/+82
| | | | | | Where appropriate we now use G_STRUCT_OFFSET and sizeof() instead of hardcoded integers. Add comments for some special cases.
* Bug 571373 - Remove hardcoded offsets in ginfo.cColin Walters2009-02-181-4/+6
| | | | | In a few places we had hardcoded sizes for accessing structure members and computing into variable size arrays. Remove those.
* Bug 571373 - Consistently use sizeof () inside gtypelib and girmoduleColin Walters2009-02-182-37/+37
| | | | | This not only makes it easier to change these structures, it becomes clearer exactly what each magic number is just for reference.
* Bug 571373 - Move typelib docs from typelib-format.txt into girepository.hColin Walters2009-02-182-62/+540
| | | | | | typelib-format.txt was growing out of date; a good solution to this is to move it closer to the code it's documenting. By doing this we also gain the ability to use gtk-doc on it.
* Merge branch 'master' of ssh://walters@git.gnome.org/git/gobject-introspectionColin Walters2009-02-136-46/+54
|\
| * Fix buildRobert Carr2009-02-121-3/+3
| |
| * Add gtk-doc supportJohan Dahlin2009-02-126-43/+51
| |
* | Bug 567906 - Put pkg-config dependencies in .gir filesColin Walters2009-02-111-23/+37
|/ | | | | | | | | | When generating a .gir file, we now first parse all of our .gir includes to pick up their <package> headers. Then, we merge that with the set of --pkg arguments passed to us, run pkg-config to gather the arguments, and finally save the merged pkg-config list to our new .gir file. This is useful for software which needs to map from .gir to pkg-config in a programmatic way.
* Bug 571248 - Ignore unknown elements in girparserColin Walters2009-02-111-10/+17
| | | | | | We want the gir to be extensible. svn path=/trunk/; revision=1096
* Bug 569633 – Typelib compiler fails with vararg callbacksRober Carr2009-02-101-11/+89
| | | | | | | | | | | 2009-02-10 Rober Carr <carrr@rpi.edu> Bug 569633 – Typelib compiler fails with vararg callbacks * girepository/girparser.c: Also filter out callback functions which take vararg arguments. svn path=/trunk/; revision=1095
* Rename namespace to namespace_ to make the header compilable with a C++ compilerJohan Dahlin2009-02-101-9/+9
| | | | svn path=/trunk/; revision=1094
* Bug 551738 - Associate classes with their structsColin Walters2009-02-068-11/+100
| | | | | | | | | | | | | | | | | | | | | Inside glibtransformer, we now look at structures ending in "Class" and see if they have an associated GlibObject (i.e. a structure of the same name without the "Class" suffix). If found, pair them up. The .gir file for <class> gains an attribute denoting its associated class struct. Any <record> many now have a glib:is-class-struct-for annotation which tells which (if any) <class> for which it defines the layout. In the .typelib, we record the association between the class and its structure. Generic structures however just have a boolean saying whether they're a class struct. (Going from a generic class struct to its class should not be necessary). Finally, we expose GIRepository APIs to access both bits of information from the .typelib. svn path=/trunk/; revision=1088
* girnode.c: Fix copy & paste errorColin Walters2009-02-051-1/+0
| | | | | | | This line is almost certainly a copy & paste error. It appears to be harmless, but it's better to not have it. svn path=/trunk/; revision=1085
* Add utility functions for invocing closures given a GICallableInfo usingJohan Dahlin2009-02-053-2/+154
| | | | | | | | | | | | | | | 2009-02-04 Johan Dahlin <jdahlin@async.com.br> * girepository/Makefile.am: * girepository/girffi.c (g_callable_info_get_ffi_arg_types), (g_callable_info_get_ffi_return_type), (g_callable_info_prepare_closure), (g_callable_info_free_closure): * girepository/girffi.h: Add utility functions for invocing closures given a GICallableInfo using libffi. svn path=/trunk/; revision=1084
* Bug 555960 - Nested structs and unions (generation portion)Colin Walters2009-02-041-16/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch from Andreas Rottmann <a.rottmann@gmx.at>. * tests/scanner/utility.h (UtilityTaggedValue): Make the union member anonymous. (UtilityByte): New union typedef with an unnamed struct in it. * giscanner/transformer.py (Transformer._create_struct): Create unnamed structs for symbols with a None ident. (Transformer._create_union): Likewise. * giscanner/girwriter.py (GIRWriter._write_record): Allow name being None. (GIRWriter._write_union): Likewise. * girepository/girparser.c (start_struct): Allow a NULL name for non-toplevel structs. (start_union): Likewise. * tests/scanner/utility.h (UtilityTaggedValue): New struct typedef, which has a nested union member. * tests/scanner/utility-expected.gir: Adapted. * giscanner/transformer.py (Transformer._create_member): Create struct/union members if appropriate. (Transformer._create_struct, Transformer._create_union): Allow for structs/unions without a C type. * giscanner/glibtransformer.py (GLibTransformer._resolve_field): We don't need to resolve non-typef'd (GLibTransformer._resolve_field): Add cases for non-typedef'd struct/union "fields". * giscanner/girwriter.py (GIRWriter._write_record): Allow for records without a C type. (GIRWriter._write_field): structs and unions may appear in places where fields do. svn path=/trunk/; revision=1082
* Bug 555960 - nested structs and unionsColin Walters2009-02-041-67/+83
| | | | | | | | | | Patch from Andreas Rottmann <a.rottmann@gmx.at>. This change modifies the parser to hold a stack of nodes, instead of a single concept of "current" node. This allows the parser to recurse into nested nodes. svn path=/trunk/; revision=1081
* handle the special case for GObject, whose glib:get-type is listed asDan Winship2009-02-021-0/+2
| | | | | | | | * girepository/ginfo.c (g_registered_type_info_get_g_type): handle the special case for GObject, whose glib:get-type is listed as "intern". svn path=/trunk/; revision=1080
* Bug 569408, Bug 568680 - Scanner misses fields (at least in GObject.Object)Colin Walters2009-02-021-2/+3
| | | | | | | | The scanner misses all fields of the GObject struct -- there are no <field> children of the <class> element for GObject in the GIR. This of course yields wrong field offsets for all derived objects. svn path=/trunk/; revision=1079
* Bug 563469 – Arrays not treated correctly in struct offset calculationColin Walters2009-02-021-26/+57
| | | | | | | Arrays are currently not handled specially, and hence treated as pointers in giroffsets.c:get_field_size_alignment(), which is (obviously) wrong. svn path=/trunk/; revision=1078
* Undo revision 1075Robert Carr2009-01-291-72/+11
| | | | svn path=/trunk/; revision=1077
* post_filter_varargs_functions should also filter callbacks. Add tests ofRobert Carr2009-01-291-11/+72
| | | | | | | | * girepository/girparser.c: post_filter_varargs_functions should also filter callbacks. * tests/scanner/foo.h: Add tests of varargs callbacks. svn path=/trunk/; revision=1075
* Only unref the repository if it's actually set.Johan Dahlin2009-01-261-1/+2
| | | | | | | | | | 2009-01-26 Johan Dahlin <jdahlin@async.com.br> * girepository/ginfo.c (g_base_info_unref): Only unref the repository if it's actually set. svn path=/trunk/; revision=1068
* add FT_Int32 add XftFont Report errors when an invalid type is encounteredJohan Dahlin2009-01-161-1/+2
| | | | | | | | | | | | | | | | 2009-01-15 Johan Dahlin <jdahlin@async.com.br> * gir/freetype2-2.0.gir: add FT_Int32 * gir/xft-2.0.gir: add XftFont * girepository/gdump.c (g_irepository_dump): Report errors when an invalid type is encountered * giscanner/glibtransformer.py: Make the error message a bit nicer. Part of preparating for gir generating inside pango. svn path=/trunk/; revision=1050
* Bug 567813 – Everything should be versionedJohan Dahlin2009-01-153-8/+8
| | | | | | | | | | | | | | | | | | | | | | | 2009-01-15 Johan Dahlin <jdahlin@async.com.br> Bug 567813 – Everything should be versioned * gir/Makefile.am: * girepository/Makefile.am: * girepository/girepository.c (init_globals): * girepository/girparser.c (locate_gir): * giscanner/dumper.py: * giscanner/transformer.py: * gobject-introspection-1.0.pc.in: * tests/everything/Makefile.am: * tests/invoke/Makefile.am: * tests/offsets/Makefile.am: * tests/repository/Makefile.am: * tests/scanner/Makefile.am: * tools/Makefile.am: svn path=/trunk/; revision=1046
* Bug 562914: Order GI_TYPELIB_PATH before anything elseColin Walters2009-01-121-4/+29
| | | | | | | We want the environment variable to override so that people can easily write scripts that run their programs uninstalled. svn path=/trunk/; revision=1024