Skip to content

Commit 9a2c83d

Browse files
overdrivenpotatosajattack
authored andcommitted
Declare all extern blocks as extern "C"
1 parent 91beafe commit 9a2c83d

File tree

12 files changed

+16
-16
lines changed

12 files changed

+16
-16
lines changed

src/psp/atrac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct Atrac3BufferInfo {
1313
pub ui_read_position_second_buf: u32,
1414
}
1515

16-
extern {
16+
extern "C" {
1717
pub fn sceAtracGetAtracID(ui_codec_type: u32) -> i32;
1818
pub fn sceAtracSetDataAndGetID(
1919
buf: *mut c_void,

src/psp/codec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
extern {
1+
extern "C" {
22
pub fn sceVideocodecOpen(
33
buffer: *mut u32,
44
type_: i32,
@@ -25,7 +25,7 @@ pub enum AudioCodec {
2525
Aac = 0x00001003,
2626
}
2727

28-
extern {
28+
extern "C" {
2929
pub fn sceAudiocodecCheckNeedMem(
3030
buffer: *mut u32,
3131
type_: i32,

src/psp/hprm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub const VOL_UP: i32 = 0x10;
55
pub const VOL_DOWN: i32 = 0x20;
66
pub const HOLD: i32 = 0x80;
77

8-
extern {
8+
extern "C" {
99
pub fn sceHprmPeekCurrentKey(key: *mut i32) -> i32;
1010
pub fn sceHprmPeekLatch(latch: *mut [u32;4]) -> i32;
1111
pub fn sceHprmReadLatch(latch: *mut [u32;4]) -> i32;

src/psp/jpeg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::c_void;
2-
extern {
2+
extern "C" {
33
pub fn sceJpegInitMJpeg() -> i32;
44
pub fn sceJpegFinishMJpeg() -> i32;
55
pub fn sceJpegCreateMJpeg(width: i32, height: i32) -> i32;

src/psp/mp3.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct SceMp3InitArg {
1717
#[repr(transparent)]
1818
pub struct Handle(pub i32);
1919

20-
extern {
20+
extern "C" {
2121
pub fn sceMp3ReserveMp3Handle(args: *mut SceMp3InitArg) -> i32;
2222
pub fn sceMp3ReleaseMp3Handle(handle: Handle) -> i32;
2323
pub fn sceMp3InitResource() -> i32;

src/psp/nand.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use super::c_void;
2-
extern {
2+
extern "C" {
33
pub fn sceNandSetWriteProtect(protect_flag: i32) -> i32;
44
pub fn sceNandLock(write_flag: i32) -> i32;
55
pub fn sceNandUnlock();

src/psp/openpsid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ pub struct OpenPSID {
44
pub data: [u8; 16usize],
55
}
66

7-
extern {
7+
extern "C" {
88
pub fn sceOpenPSIDGetOpenPSID(openpsid: *mut OpenPSID) -> i32;
99
}

src/psp/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub enum KeyType {
2626
Bytes = 4,
2727
}
2828

29-
extern {
29+
extern "C" {
3030
pub fn sceRegOpenRegistry(
3131
reg: *mut Key,
3232
mode: i32,

src/psp/sircs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ pub struct SircsData {
66
pub dev: u16,
77
}
88

9-
extern {
9+
extern "C" {
1010
pub fn sceSircsSend(sd: *mut SircsData, count: i32) -> i32;
1111
}

src/psp/umd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub const UMD_INITING: i32 = 0x08;
2222
pub const UMD_INITED: i32 = 0x10;
2323
pub const UMD_READY: i32 = 0x20;
2424

25-
extern {
25+
extern "C" {
2626
pub fn sceUmdCheckMedium() -> i32;
2727
pub fn sceUmdGetDiscInfo(info: *mut UmdInfo) -> i32;
2828
pub fn sceUmdActivate(unit: i32, drive: *const u8) -> i32;

0 commit comments

Comments
 (0)