Skip to content

Commit e43d72b

Browse files
See also rust-lang/rust#10579 - `std::ptr::read_ptr` shouldn't take `*mut`
1 parent e1358d8 commit e43d72b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pcre/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ impl Pcre {
341341

342342
let mut i = 0u;
343343
while i < name_count {
344-
let n: uint = (ptr::read_ptr(tabptr as *mut c_uchar) as uint << 8) | (ptr::read_ptr(ptr::offset(tabptr, 1) as *mut c_uchar) as uint);
344+
let n: uint = (ptr::read_ptr(tabptr) as uint << 8) | (ptr::read_ptr(ptr::offset(tabptr, 1)) as uint);
345345
let name_cstring = c_str::CString::new(ptr::offset(tabptr, 2) as *c_char, false);
346346
let name: ~str = name_cstring.as_str().unwrap().to_owned();
347347
// TODO Avoid the double lookup.

0 commit comments

Comments
 (0)