[librsvg: 2/10] Clarify the comment in rsvg_g_warning()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/10] Clarify the comment in rsvg_g_warning()
- Date: Tue, 23 Jul 2019 21:25:46 +0000 (UTC)
commit e07a99bb6b06b1d800af87b407e86b74cd2be8fe
Author: Federico Mena Quintero <federico gnome org>
Date: Tue Jul 23 14:25:42 2019 -0500
Clarify the comment in rsvg_g_warning()
rsvg_internals/src/util.rs | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/util.rs b/rsvg_internals/src/util.rs
index e10d301b..0bb4a9bf 100644
--- a/rsvg_internals/src/util.rs
+++ b/rsvg_internals/src/util.rs
@@ -50,10 +50,14 @@ pub fn rsvg_g_warning(msg: &str) {
#[cfg(not(feature = "c-library"))]
pub fn rsvg_g_warning(_msg: &str) {
- // The only callers of this are in handle.rs. When those functions
- // are called from the Rust API, they are able to return a
- // meaningful error code, but the C API isn't - so they issues a
- // g_warning() instead.
+ // This, and rsvg_g_critical() below, are intended to be called
+ // from Rust code which is directly called from the C API. When
+ // this crate is being built as part of the c-library, the purpose
+ // of the functions is to call the corresponding glib macros to
+ // print a warning or a critical error message. When this crate
+ // is being built as part of the standalone Rust crate, they do
+ // nothing, since the Rust code is able to propagate an error code
+ // all the way to the crate's public API.
}
#[cfg(feature = "c-library")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]