Use glib::function_name! instead of module_path! macro in more places

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-rs/-/merge_requests/1191>
This commit is contained in:
Sebastian Dröge 2023-01-16 11:10:21 +02:00
parent 3e2eb6e652
commit 64abf69987
4 changed files with 54 additions and 54 deletions

View file

@ -160,7 +160,7 @@ macro_rules! audio_decoder_error(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -172,7 +172,7 @@ macro_rules! audio_decoder_error(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -184,7 +184,7 @@ macro_rules! audio_decoder_error(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -196,7 +196,7 @@ macro_rules! audio_decoder_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -208,7 +208,7 @@ macro_rules! audio_decoder_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -220,7 +220,7 @@ macro_rules! audio_decoder_error(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};

View file

@ -361,7 +361,7 @@ macro_rules! video_decoder_error(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -373,7 +373,7 @@ macro_rules! video_decoder_error(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -385,7 +385,7 @@ macro_rules! video_decoder_error(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -397,7 +397,7 @@ macro_rules! video_decoder_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -409,7 +409,7 @@ macro_rules! video_decoder_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};
@ -421,7 +421,7 @@ macro_rules! video_decoder_error(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
) )
}}; }};

View file

@ -1011,7 +1011,7 @@ macro_rules! element_error(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1023,7 +1023,7 @@ macro_rules! element_error(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1035,7 +1035,7 @@ macro_rules! element_error(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1047,7 +1047,7 @@ macro_rules! element_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1059,7 +1059,7 @@ macro_rules! element_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1071,7 +1071,7 @@ macro_rules! element_error(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1084,7 +1084,7 @@ macro_rules! element_error(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1097,7 +1097,7 @@ macro_rules! element_error(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1110,7 +1110,7 @@ macro_rules! element_error(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1123,7 +1123,7 @@ macro_rules! element_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1136,7 +1136,7 @@ macro_rules! element_error(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1149,7 +1149,7 @@ macro_rules! element_error(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1168,7 +1168,7 @@ macro_rules! element_warning(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1180,7 +1180,7 @@ macro_rules! element_warning(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1192,7 +1192,7 @@ macro_rules! element_warning(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1204,7 +1204,7 @@ macro_rules! element_warning(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1216,7 +1216,7 @@ macro_rules! element_warning(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1228,7 +1228,7 @@ macro_rules! element_warning(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1241,7 +1241,7 @@ macro_rules! element_warning(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1254,7 +1254,7 @@ macro_rules! element_warning(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1267,7 +1267,7 @@ macro_rules! element_warning(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1280,7 +1280,7 @@ macro_rules! element_warning(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1293,7 +1293,7 @@ macro_rules! element_warning(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1306,7 +1306,7 @@ macro_rules! element_warning(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1325,7 +1325,7 @@ macro_rules! element_info(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1337,7 +1337,7 @@ macro_rules! element_info(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1349,7 +1349,7 @@ macro_rules! element_info(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1361,7 +1361,7 @@ macro_rules! element_info(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1373,7 +1373,7 @@ macro_rules! element_info(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1385,7 +1385,7 @@ macro_rules! element_info(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
); );
}}; }};
@ -1398,7 +1398,7 @@ macro_rules! element_info(
Some($msg), Some($msg),
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1411,7 +1411,7 @@ macro_rules! element_info(
Some($msg), Some($msg),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1424,7 +1424,7 @@ macro_rules! element_info(
None, None,
Some($debug), Some($debug),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1437,7 +1437,7 @@ macro_rules! element_info(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1450,7 +1450,7 @@ macro_rules! element_info(
Some(&format!($($msg)*)), Some(&format!($($msg)*)),
None, None,
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );
@ -1463,7 +1463,7 @@ macro_rules! element_info(
None, None,
Some(&format!($($debug)*)), Some(&format!($($debug)*)),
file!(), file!(),
module_path!(), $crate::glib::function_name!(),
line!(), line!(),
$details, $details,
); );

View file

@ -9,35 +9,35 @@ macro_rules! error_msg(
($err:expr, ($msg:expr), [$dbg:expr]) => { ($err:expr, ($msg:expr), [$dbg:expr]) => {
$crate::ErrorMessage::new(&$err, Some($msg), $crate::ErrorMessage::new(&$err, Some($msg),
Some($dbg), Some($dbg),
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}; };
($err:expr, ($msg:expr)) => { ($err:expr, ($msg:expr)) => {
$crate::ErrorMessage::new(&$err, Some($msg), $crate::ErrorMessage::new(&$err, Some($msg),
None, None,
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}; };
($err:expr, [$dbg:expr]) => { ($err:expr, [$dbg:expr]) => {
$crate::ErrorMessage::new(&$err, None, $crate::ErrorMessage::new(&$err, None,
Some($dbg), Some($dbg),
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}; };
// Format strings // Format strings
($err:expr, ($($msg:tt)*), [$($dbg:tt)*]) => { { ($err:expr, ($($msg:tt)*), [$($dbg:tt)*]) => { {
$crate::ErrorMessage::new(&$err, Some(format!($($msg)*).as_ref()), $crate::ErrorMessage::new(&$err, Some(format!($($msg)*).as_ref()),
Some(format!($($dbg)*).as_ref()), Some(format!($($dbg)*).as_ref()),
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}}; }};
($err:expr, ($($msg:tt)*)) => { { ($err:expr, ($($msg:tt)*)) => { {
$crate::ErrorMessage::new(&$err, Some(format!($($msg)*).as_ref()), $crate::ErrorMessage::new(&$err, Some(format!($($msg)*).as_ref()),
None, None,
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}}; }};
($err:expr, [$($dbg:tt)*]) => { { ($err:expr, [$($dbg:tt)*]) => { {
$crate::ErrorMessage::new(&$err, None, $crate::ErrorMessage::new(&$err, None,
Some(format!($($dbg)*).as_ref()), Some(format!($($dbg)*).as_ref()),
file!(), module_path!(), line!()) file!(), $crate::glib::function_name!(), line!())
}}; }};
); );