Commit Graph

20 Commits

Author SHA1 Message Date
Christoph Reiter
a718ebac86 build: enable -Wswitch-default
In case the surrounding code handles missing cases break, otherwise add
a g_assert_not_reached().

The generated parser code triggers this as well, so disable it there only.
2018-07-29 18:57:03 +02:00
Chun-wei Fan
adc6f08ff7 girepository: Include config.h First in All Sources
This includes config.h in all the C-sources of girepository so that we can
get the correct export directive from config.h during compile time and
therefore export the symbols as necessary, like what GLib and GTK+ is
currently doing.

https://bugzilla.gnome.org/show_bug.cgi?id=732669
2014-07-07 09:24:12 +08:00
Dieter Verfaillie
bb7f8d57c2 docs: fix up reference docs a bit
- 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
2013-10-10 16:48:51 -04:00
Colin Walters
e865dcb7b4 Add Emacs mode lines to C sources 2012-02-03 13:42:56 -05:00
Dan Winship
f9ebb4e99d Deprecate ErrorDomain
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
2011-08-12 11:10:43 -04:00
Giovanni Campagna
fef2a7b8dd Fix accessing structure fields that are arrays
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
2011-06-08 17:45:13 +02:00
Tomeu Vizoso
343c76431a Assume only that an array is embedded in a struct if it's fixed size 2011-06-06 20:13:50 +02:00
Colin Walters
9948f518dc gifieldinfo.c: Quiet some compiler warnings 2011-05-23 09:59:02 -04:00
Maxim Ermilov
eeddf77567 g_field_info_get_field: return correct pointer for C array
Also add a test case.

https://bugzilla.gnome.org/show_bug.cgi?id=640468
2011-05-04 15:01:10 -04:00
John (J5) Palmieri
feedce8029 support setting gobjects and ginterfaces in struct fields
https://bugzilla.gnome.org/show_bug.cgi?id=644749
2011-03-16 14:33:05 -04:00
Colin Walters
f9a3bb7300 Add support for gunichar in typelib
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
2010-11-12 16:00:10 -05:00
Owen W. Taylor
ec76ea8628 Handle enumerations with the full range of signed and unsigned values
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
2010-11-01 17:25:45 -04:00
Pavel Holejsovsky
bc6a8d2f23 [girepository] Document GIStructInfo & GIUnionInfo
https://bugzilla.gnome.org/show_bug.cgi?id=628753
2010-09-05 11:04:27 -03:00
Johan Dahlin
9c80c84dc7 [GIRepository] Rename GArgument to GIArgument
Keep a typedef for backwards compatibility, until
the major bindings has moved over.
2010-08-31 17:35:57 -03:00
Colin Walters
3a310fd242 Don't include machine-dependent integral types in the typelib
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
2010-07-09 14:15:52 -04:00
Johan Dahlin
1eca3abe67 [docs] Add struct hierarchy to each section 2010-06-11 20:16:00 -03:00
Johan Dahlin
6e11316e28 [gifieldinfo] Document g_field_info_get_flags 2010-06-06 22:47:50 -03:00
Johan Dahlin
94d52d910c [gifieldinfo] Document, indent and check params
Document the remaining functions, indent to match coding style
and check so that all info params are set and of the right type.
2010-06-06 13:35:14 -03:00
Johan Dahlin
e6733fd92e [gfield] Move over field set/get impl.
Move over the GIFieldInfo set/get value implementation
over to gifieldinfo.c
2010-06-06 13:27:12 -03:00
Johan Dahlin
8d2ae7fa90 [girepository] Move GIFieldInfo out of ginfo.ch 2010-06-06 13:11:23 -03:00