Marc-André Lureau
034a4dcdc0
gio: replace _g_uri_from_authority() with g_uri_join()
...
_g_uri_from_authority() is doing the same work as g_uri_join(): taking
URI components and merging them in a legit URI string, with encoding.
It turns out g_uri_from_authority was unnecessarily complex, since no
caller used the userinfo field.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 16:12:37 +04:00
Marc-André Lureau
82ad7853ba
uri: change g_uri_is_valid() to check absolute URI
...
g_uri_is_valid() should check the given URI is valid following RFC-3986,
and reject relative references.
Fixes: https://gitlab.gnome.org/GNOME/glib/-/issues/2169
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 15:44:43 +04:00
Marc-André Lureau
44d4640c47
uri: rename absolute & relative uri_string to uri_ref
...
Let's reserve the term URI for absolute URIs, following rfc3986
terminology.
See:
https://gitlab.gnome.org/GNOME/glib/-/issues/2169
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 15:07:08 +04:00
Marc-André Lureau
d625a29b28
uri: add a comment about temporary GUri construction
...
As pointed out in the discussion of:
https://gitlab.gnome.org/GNOME/glib/-/issues/2169
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 14:54:55 +04:00
Marc-André Lureau
19c0db3185
uri: improve some documentation about absolute URIs
...
As pointed out in the discussion
https://gitlab.gnome.org/GNOME/glib/-/issues/2169 .
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 14:54:55 +04:00
Marc-André Lureau
3521763532
uri: add some note about the API scope
...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-07-28 14:54:42 +04:00
Matthias Clasen
df7f35e81a
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:49:05 +00:00
Matthias Clasen
b5fc5d6423
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:50 +00:00
Matthias Clasen
c10a0a390a
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:41 +00:00
Matthias Clasen
65263ced54
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:36 +00:00
Matthias Clasen
2301d75a94
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:31 +00:00
Matthias Clasen
c213000e25
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:26 +00:00
Matthias Clasen
d9757ab033
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:21 +00:00
Matthias Clasen
921e2ee6e3
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:15 +00:00
Matthias Clasen
bad7efc0ea
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:11 +00:00
Matthias Clasen
98deeff312
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:08 +00:00
Matthias Clasen
e09594f500
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:04 +00:00
Matthias Clasen
10eb9744df
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:48:00 +00:00
Matthias Clasen
d09bd8e5fb
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:47:51 +00:00
Matthias Clasen
75000b036d
Apply 1 suggestion(s) to 1 file(s)
2020-07-27 19:47:47 +00:00
Sebastian Dröge
9577616622
Merge branch '272-thread-pool-docs' into 'master'
...
gthreadpool: Mention g_get_num_processors() in the thread pool docs
Closes #272
See merge request GNOME/glib!1588
2020-07-27 19:04:11 +00:00
Philip Withnall
1203e80f5f
Merge branch '250-testcase-docs' into 'master'
...
gtestutils: Clarify the docs for g_test_create_case()
Closes #250
See merge request GNOME/glib!1587
2020-07-27 17:01:16 +00:00
Philip Withnall
b3c0c4804b
gthreadpool: Mention g_get_num_processors() in the thread pool docs
...
Just to make it a little more obvious that a thread pool can be
initialised with one thread per logical CPU.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #272
2020-07-27 17:28:43 +01:00
Philip Withnall
07278e73d4
gtestutils: Clarify the docs for g_test_create_case()
...
Improve formatting, and clarify that the same *type* of test fixture can
be reused, not the same specific instance of a test fixture.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #250
2020-07-27 17:26:56 +01:00
Sebastian Dröge
63809867bd
GFile: Document that G_FILE_CREATE_REPLACE_DESTINATION can only be used with g_file_replace() and variants
...
Passing it to e.g. g_file_create() for an already existing file will
still cause a "file exists" error.
2020-07-27 18:35:38 +03:00
Philip Withnall
5f25d2569d
ci: Add scheduled Coverity Scan builds
...
This should run Coverity Scan on GLib on the current schedule (once a
week).
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 15:47:27 +01:00
Philip Withnall
c77c5e5b56
ci: Support building a CI image for Coverity Scan builds
...
This will be used in an upcoming scheduled CI job.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 15:41:09 +01:00
Philip Withnall
648986a290
glib: Avoid redefining GLIB_DISABLE_DEPRECATION_WARNINGS
...
It may be defined by the environment (we document that as being allowed)
— if so, individual files should not try to redefine it, as that causes
a preprocessor warning.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 15:41:09 +01:00
Sebastian Dröge
5ba5f5b686
Merge branch '137-gfileinfo-display-name-docs' into 'master'
...
gfileinfo: Clarify docs to say that name and display-name are set
Closes #137
See merge request GNOME/glib!1585
2020-07-27 13:12:44 +00:00
Philip Withnall
5b429344b5
Merge branch '1869-ios-cocoa' into 'master'
...
gosxutils: Include Foundation rather than Cocoa
Closes #1869
See merge request GNOME/glib!1589
2020-07-27 12:41:27 +00:00
Philip Withnall
9c6c546236
gosxutils: Include Foundation rather than Cocoa
...
Apparently, the function calls added in 11729cdc
use Foundation, not
Cocoa. Cocoa is a massive superset of Foundation, and is not available
on iOS.
Patch contributed by Jay Freeman, but without providing an e-mail
address. So the git commit cannot be attributed to him.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #1869
2020-07-27 13:21:20 +01:00
Sebastian Dröge
4bd74ac582
Merge branch 'wip/pwithnall/bsd-nofollow' into 'master'
...
gfileutils: Fix O_NOFOLLOW handling on BSD systems
See merge request GNOME/glib!1591
2020-07-27 12:01:19 +00:00
Sebastian Dröge
62a54a90b2
Merge branch '4-strescape-utf8' into 'master'
...
Add some g_strescape() tests
Closes #4
See merge request GNOME/glib!1584
2020-07-27 11:49:44 +00:00
Sebastian Dröge
6a87f7ed6f
Merge branch 'bandwidth' into 'master'
...
Reduce CI bandwidth requirements
See merge request GNOME/glib!1570
2020-07-27 11:31:38 +00:00
Sebastian Dröge
79aeba33c7
Merge branch 'ci-schedules' into 'master'
...
Use CI schedules and DAGs
See merge request GNOME/glib!1590
2020-07-27 11:30:33 +00:00
Philip Withnall
b4aa9d7858
gfileutils: Fix O_NOFOLLOW handling on BSD systems
...
Various different BSD systems use a different errno from `E_LOOP` (as
defined by POSIX and used on Linux) to indicate that a file is a symlink
when you try to `open()` it with `O_NOFOLLOW`.
Fix the code which detects this. This is a follow-up to #1302 .
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 12:24:20 +01:00
Philip Withnall
410ee530b5
ci: Add DAG attributes
...
Add some basic DAG attributes so that some jobs in the pipeline can
run out of stage order to speed things up a little.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 12:10:54 +01:00
Philip Withnall
feab973662
ci: Move some CI jobs from branches to schedules
...
These jobs (`scan-build` and `valgrind`) take ages to run and rarely
indicate failures, so move them to a weekly schedule, rather than
running them on each branch/MR.
The current schedule is once weekly:
https://gitlab.gnome.org/GNOME/glib/-/pipeline_schedules .
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 12:10:41 +01:00
Sebastian Dröge
87bc87ae69
Merge branch '1022-g-object-new-zeros-docs' into 'master'
...
gobject: Document that g_object_new() zeros out private data
Closes #1022
See merge request GNOME/glib!1586
2020-07-27 08:09:07 +00:00
Philip Withnall
b79747eee1
Merge branch 'remove-broken-xp-code' into 'master'
...
gio: Remove broken support for XP
See merge request GNOME/glib!1583
2020-07-27 02:07:43 +00:00
Philip Withnall
41937c3631
gobject: Document that g_object_new() zeros out private data
...
It’s already mentioned at
https://developer.gnome.org/gobject/stable/chapter-gobject.html#gobject-instantiation ,
but is important enough that mentioning it in the documentation for
`g_object_new()` seems helpful.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #1022
2020-07-27 01:57:57 +01:00
Philip Withnall
0544fdff5f
gfileinfo: Clarify docs to say that name and display-name are set
...
They are always available, for all files.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #137
2020-07-27 00:45:31 +01:00
Philip Withnall
1ef6e84012
tests: Add some tests for expanding invalid escapes with g_strcompress()
...
This brings the branch coverage of `g_strcompress()` up to 100%. Yay.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 23:22:06 +01:00
Philip Withnall
59eb3c5bdb
tests: Add missing cast to URI tests
...
This fixes a compiler warning.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 23:05:31 +01:00
Philip Withnall
437526675a
tests: Test that UTF-8 is escaped correctly by g_strescape()
...
`g_strescape()` is documented as escaping UTF-8 characters, so test that
it does.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Fixes : #4
2020-07-26 23:04:37 +01:00
Philip Withnall
a84f241dd7
Merge branch '1302-file-set-contents-fsync' into 'master'
...
gfileutils: Add g_file_set_contents_full() and GFileSetContentsFlags
Closes #1203 and #1302
See merge request GNOME/glib!369
2020-07-26 21:35:35 +00:00
Philip Withnall
5bf3849099
tests: Add tests for g_file_set_contents_full()
...
These exercise all the code paths I can manage without adding a load of
machinery to inject faults into `write()`.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Helps: #1302
2020-07-26 21:38:17 +01:00
Philip Withnall
f35f9e918a
tests: Use G_TEST_OPTION_ISOLATE_DIRS for fileutils tests
...
They all still pass.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 21:38:17 +01:00
Philip Withnall
cd02eac2d4
gstdio: Add macOS support to g_fsync()
...
Apparently, `fsync()` doesn’t actually sync to the spinning disk on
macOS. You need an `fcntl()` for that.
See: https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
Spotted by Christoph Reiter in a comment on !369 .
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 21:38:17 +01:00
Philip Withnall
926dfe5925
gstdio: Handle EINTR in g_fsync()
...
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-26 21:38:17 +01:00