Skip to content

Commit 7060d45

Browse files
committed
Add rules for stdin
1 parent 6a23148 commit 7060d45

4 files changed

Lines changed: 30 additions & 0 deletions

File tree

rules/stdio/ir_refcount.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,17 @@
202202
"is_refcount_pointer": true
203203
}
204204
},
205+
"f10": {
206+
"body": [
207+
{
208+
"text": "libcc2rs::cin()"
209+
}
210+
],
211+
"return_type": {
212+
"type": "Ptr<::std::fs::File>",
213+
"is_refcount_pointer": true
214+
}
215+
},
205216
"f2": {
206217
"body": [
207218
{

rules/stdio/ir_unsafe.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,17 @@
253253
"is_unsafe_pointer": true
254254
}
255255
},
256+
"f10": {
257+
"body": [
258+
{
259+
"text": "libcc2rs::cin_unsafe()"
260+
}
261+
],
262+
"return_type": {
263+
"type": "*mut ::std::fs::File",
264+
"is_unsafe_pointer": true
265+
}
266+
},
256267
"f2": {
257268
"body": [
258269
{

rules/stdio/tgt_refcount.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,3 +125,7 @@ fn f8() -> Ptr<::std::fs::File> {
125125
fn f9() -> Ptr<::std::fs::File> {
126126
libcc2rs::cerr()
127127
}
128+
129+
fn f10() -> Ptr<::std::fs::File> {
130+
libcc2rs::cin()
131+
}

rules/stdio/tgt_unsafe.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,3 +130,7 @@ unsafe fn f8() -> *mut ::std::fs::File {
130130
unsafe fn f9() -> *mut ::std::fs::File {
131131
libcc2rs::cerr_unsafe()
132132
}
133+
134+
unsafe fn f10() -> *mut ::std::fs::File {
135+
libcc2rs::cin_unsafe()
136+
}

0 commit comments

Comments
 (0)