Skip to content

Commit

Permalink
Bug 1532645 - Update cubeb-backend to workaround a Rust bug. r=froydnj
Browse files Browse the repository at this point in the history
rust-lang/rust#58881 doesn't repro with cubeb-backend
v5.0.1, so use that so that other Rust nightly users don't get their builds
busted.

Differential Revision: https://phabricator.services.mozilla.com/D22092

UltraBlame original commit: 9286348b9c33218e956417ce8675851ddbccaeaa
  • Loading branch information
marco-c committed Oct 4, 2019
1 parent 244b210 commit 46f2fc2
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 105 deletions.
28 changes: 23 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions third_party/rust/cubeb-backend/.cargo-checksum.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ toml
"
:
"
4bae03732c4f490b3c7dbc07d2eabccf5d0f6b5ab2c1c74d592cc7609c9d8d8e
5009330f8a03fc0cf4b10540514496db0281bb92541f9850217c5de7d12dc8b7
"
"
LICENSE
Expand Down Expand Up @@ -51,7 +51,7 @@ rs
"
:
"
af1d787754706e34d6b8f4ac88aa89078ae9a16970b168ad8dc17cc4180688c2
704faeb31934dad6bc6d02e01caa85118754209bd559d30d03fcfa5cb8c1603c
"
"
src
Expand Down Expand Up @@ -92,6 +92,6 @@ package
"
:
"
fdcac95519416d9ec814db2dc40e6293e7da25b906023d93f48b87f0587ab138
0432a0d08c3f9a778a2b0b6214c87ec2eb17e8639eb68baf0686bdafc4fd11f1
"
}
2 changes: 1 addition & 1 deletion third_party/rust/cubeb-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ version
.
5
.
0
1
"
authors
=
Expand Down
185 changes: 89 additions & 96 deletions third_party/rust/cubeb-backend/src/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,81 +42,16 @@ into
(
)
{
if
let
Some
(
log_callback
)
=
crate
:
:
ffi
:
:
g_cubeb_log_callback
{
let
cstr
=
:
:
std
:
:
ffi
:
:
CString
:
:
new
(
concat
cubeb_log_internal
!
(
"
%
s
:
%
d
:
"
__INTERNAL__
msg
"
\
n
"
)
)
.
unwrap
(
)
;
log_callback
(
cstr
.
as_ptr
(
)
file
!
(
)
line
!
(
)
)
;
}
}
}
}
;
(
level
Expand All @@ -128,7 +63,7 @@ expr
(
arg
:
tt
expr
)
+
)
Expand Down Expand Up @@ -160,6 +95,34 @@ into
(
)
{
cubeb_log_internal
!
(
__INTERNAL__
format
!
(
fmt
(
arg
)
*
)
)
;
}
}
}
;
(
__INTERNAL__
msg
:
expr
)
=
>
{
if
let
Some
Expand Down Expand Up @@ -191,22 +154,30 @@ CString
:
new
(
concat
format
!
(
"
%
s
{
}
:
%
d
{
}
:
"
fmt
"
{
}
\
n
"
file
!
(
)
line
!
(
)
msg
)
)
.
Expand All @@ -221,25 +192,11 @@ cstr
as_ptr
(
)
file
!
(
)
line
!
(
)
(
arg
)
+
)
;
}
}
}
}
}
#
[
macro_export
Expand Down Expand Up @@ -277,7 +234,7 @@ expr
(
arg
:
tt
expr
)
+
)
Expand Down Expand Up @@ -340,7 +297,7 @@ expr
(
arg
:
tt
expr
)
+
)
Expand Down Expand Up @@ -402,14 +359,32 @@ cubeb_log
!
(
"
{
}
Formatted
log
%
d
"
1
)
;
cubeb_log
!
(
"
{
}
Formatted
{
}
log
{
}
"
1
2
3
)
;
}
#
[
Expand Down Expand Up @@ -438,13 +413,31 @@ cubeb_logv
!
(
"
{
}
Formatted
log
%
d
"
1
)
;
cubeb_logv
!
(
"
{
}
Formatted
{
}
log
{
}
"
1
2
3
)
;
}
}

0 comments on commit 46f2fc2

Please sign in to comment.