Skip to content

Commit

Permalink
intern! flush
Browse files Browse the repository at this point in the history
  • Loading branch information
goulart-paul committed Mar 3, 2024
1 parent 0d5e21d commit 5ad567b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
//! ```
use crate::ffi::{PySys_WriteStderr, PySys_WriteStdout};
use crate::intern;
use crate::prelude::*;
use std::io::{LineWriter, Write};
use std::marker::PhantomData;
Expand Down Expand Up @@ -70,7 +71,7 @@ impl<T: PyStdioRawConfig> Write for PyStdioRaw<T> {
fn flush(&mut self) -> std::io::Result<()> {
Python::with_gil(|py| -> std::io::Result<()> {
self.pystream
.call_method0(py, "flush")
.call_method0(py, intern!(py, "flush"))
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))?;
Ok(())
})
Expand Down

0 comments on commit 5ad567b

Please sign in to comment.