From 5ad567b5c709d4bd9f8baaee08e3301199297fc9 Mon Sep 17 00:00:00 2001 From: goulart-paul Date: Sun, 3 Mar 2024 10:38:05 +0000 Subject: [PATCH] intern! flush --- src/stdio.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/stdio.rs b/src/stdio.rs index 724d854ce3f..3a7c3641aab 100644 --- a/src/stdio.rs +++ b/src/stdio.rs @@ -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; @@ -70,7 +71,7 @@ impl Write for PyStdioRaw { 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(()) })