2008-02-22 Mark Doffman <mark.doffman@codethink.co.uk>
* tools/quote-file.sh
* tools/compiler.c
* tools/generate.c
Move to using the 'C' struct compiler code.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=135
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginfo.c
* tools/generate.c
Change the way that external references with no namespace
are dealt with. External references with no namespace
are placed into the XML as-if they are a local reference.
This is temporary, but helps with roundtrip tests.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=134
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginfo.c
* girepository/girepository.h
* tools/generate.c
Add a function to check if an enum is registered or not.
Previously anything testing this relied on the g-type
string offset having a value of 0.
* girepository/gmetadata.c
* girepository/gmetadata.h
* tools/generate.c
Remove unneccesary or erroneous checks. There were two
metadata validation checks which made sure that the blob
sizes were the same as some magic numbers compiled into the code.
This is wrong as it breaks any forwards compatibility that may
be possible.
Checks were also present that made sure that unregistered type
blobs had a value of 0 in the g-type offset field. This is
unneccessary. If a type blob is unregistered then any value
in its g-type field is simply invalid.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=132
2008-02-21 Mark Doffman <mark.doffman@codethink.co.uk>
* girepository/ginvoke.c
* girepository/girepository.h
* girepository/gmetadata.c
* girepository/gmetadata.h
* tools/generate.c
* tools/gidlparser.c
Modify TYPE_TAG_INTERFACE to TYPE_TAG_SYMBOL
to avoid confusion with the interface blob.
* tools/generate.c
* tools/gidlparser.c
Remove magic numbers and replace with type-tag
enumeration symbols.
* girepository/gmetadata.c
Add validate declaration.
WARNING: This commit does not compile. It is a partial change.
svn path=/trunk/; revision=129
* src/compiler.c, src/generate.c, src/gidlnode.c,
src/gidlparser.c, src/ginfo.c, src/girepository.c,
tests/invoke/invoke.c, test/invoke/testfns.c: Hush compiler
warnings about return values, signedness mismatches, unused
variables, and unhandles enum values in switch statements.
* tests/invoke/Makefile.am: Don't install the invoke test program.
Add -I ../../src to the cflags used for the test functions files.
2005-05-22 Matthias Clasen <mclasen@redhat.com>
* tests/*: Add struct offsets to field and vfunc
elements.
* src/generate.c (write_vfunc_info): Write offset
information for vfuncs.
* src/gidlnode.c (g_idl_node_build_metadata): Write
the struct offsets into the metadata.
* src/gidlparser.c: Parse the offset attributes of
field and vfunc elements.
* src/gidlnode.h: Add offset members to field and
vfunc nodes.
2005-05-13 Matthias Clasen <mclasen@redhat.com>
* tests/*: Update testcases.
* src/generate.c (write_callable_info): Don't forget to
write transfer and null-ok attributes for return types
and parameters.
* src/girepository.h:
* src/ginfo.c (g_callable_info_may_return_null):
New function to find out if a function may return NULL.
2005-05-09 Matthias Clasen <mclasen@redhat.com>
* gidl.dtd: Clean up handling of names. All elements
have a "name", only the elements corresponding to
actual callable functions (function, method, constructor),
have an additional "symbol" attribute holding the
dlsym()-able function name.
* src/generate.c: Adapt to generate xml matching the
new dtd.
* src/gidlparser.c:
* src/gidlnode.c: Adapt to parse the new dtd.
* tests/*.test: Adjust to the new dtd.
* metadata-format.txt:
* src/gmetadata.h: Remove the short_name field
from the ValueBlob.
* src/gmetadata.c: Shrink size of ValueBlob to 12.
* src/girepository.h:
* src/ginfo.c (g_value_info_get_short_name): Removed
Eventually, we want to move to using `GType` directly for everything,
since `GIBaseInfo` and its subclasses are all using `GTypeInstance`.
However, that requires quite a lot of changes and we’re about to hit the
API freeze.
So do the smallest set of changes possible to remove `GIInfoType` and
related functions from the public API, which gives us freedom to make
more changes later without breaking API.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
It’s actually a factory method rather than a constructor, since
`GIBaseInfo` is abstract, but despite that, changing the name so it sits
inside the `GIBaseInfo` class makes sense. There is no `GIInfo` type.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
Even if we get warnings from the first lint check, we probably want to
see the warnings from later lint checks too, to reduce the number of
round-trips.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This will make it easier and more obvious for developers to run them
locally: I'm sure I'm not the only developer who had assumed that
`.gitlab-ci/` is private to the CI environment and inappropriate (or
perhaps even destructive) to run on a developer/user system.
The lint checks are automatically skipped (with TAP SKIP syntax) if we
are not in a git checkout, or if git or the lint tool is missing. They
can also be disabled explicitly with `meson test --no-suite=lint`,
which downstream distributions will probably want to do.
By default, most lint checks are reported as an "expected failure"
(with TAP TODO syntax) rather than a hard failure, because they do not
indicate a functional problem with GLib and there is a tendency for
lint tools to introduce additional checks or become more strict over
time. Developers can override this by configuring with `-Dwerror=true`
(which also makes compiler warnings into fatal errors), or by running
the test suite like `LINT_WARNINGS_ARE_ERRORS=1 meson test --suite=lint`.
One exception to this is tests/check-missing-install-tag.py, which is
checking a functionally significant feature of our build system, and
seems like it is unlikely to have false positives: if that one fails,
it is reported as a hard failure.
run-style-check-diff.sh and run-check-todos.sh are not currently given
this treatment, because they require search-common-ancestor.sh, which
uses Gitlab-CI-specific information to find out which commits are in-scope
for checking.
Signed-off-by: Simon McVittie <smcv@collabora.com>
This is needed because `GITypelib` is exposed in the public
libgirepository API, so needs to be introspectable.
This should fix a couple of warnings about `gi_repository_require()` and
related APIs not being introspectable as they return an unintrospectable
type.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
Since `GITypelib` is exposed in the public libgirepository API, it needs
to be a boxed type. So we either need to add a `copy` method to mirror
the existing `free` method, or switch to refcounting. The latter option
seems better, since a `GITypelib` contains internal state about open
`GModule`s and the semantics for copying that would be potentially
complex.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
This makes them consistent with the other getter methods in
`GIRepository` which return lists/arrays. It’s useful to return the
length, as that means the caller doesn’t have to work it out by
iterating over the entire array.
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
Helps: #3155
Otherwise, `CFLAGS='-Wall -Werror' meson build` fails with:
...
Command line: `cc ./glib/build/meson-private/tmp7iwplrgi/testfile.c -o ./glib/build/meson-private/tmp7iwplrgi/output.obj -c -O3 -Werror -Wall -D_FILE_OFFSET_BITS=64 -O0 -std=gnu99` -> 1
stderr:
./glib/build/meson-private/tmp7iwplrgi/testfile.c: In function 'main':
./glib/build/meson-private/tmp7iwplrgi/testfile.c:83:21: error: unused variable 'y' [-Werror=unused-variable]
83 | long double y = frexpl (x, &exp);
| ^
cc1: all warnings being treated as errors
-----------
Checking if "frexpl prototype can be re-listed" compiles: NO
glib/gnulib/meson.build:316:2: ERROR: Problem encountered: frexpl() is missing or broken beyond repair, and we have nothing to replace it with