Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 33f81a3

Browse files
committedFeb 17, 2025
to_c_string -> to_c_char
1 parent 20c045d commit 33f81a3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎src/stdlib_system_subprocess.F90

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
submodule (stdlib_system) stdlib_system_subprocess
22
use iso_c_binding
33
use iso_fortran_env, only: int64, real64
4-
use stdlib_strings, only: to_c_string, join
4+
use stdlib_strings, only: to_c_char, join
55
use stdlib_linalg_state, only: linalg_state_type, LINALG_ERROR, linalg_error_handling
66
implicit none(type, external)
77

@@ -284,11 +284,11 @@ subroutine launch_asynchronous(process, args, stdin)
284284
character(c_char), dimension(:), allocatable, target :: c_cmd,c_stdin,c_stdin_file,c_stdout_file,c_stderr_file
285285

286286
! Assemble C strings
287-
c_cmd = to_c_string(join(args))
288-
if (present(stdin)) c_stdin = to_c_string(stdin)
289-
if (allocated(process%stdin_file)) c_stdin_file = to_c_string(process%stdin_file)
290-
if (allocated(process%stdout_file)) c_stdout_file = to_c_string(process%stdout_file)
291-
if (allocated(process%stderr_file)) c_stderr_file = to_c_string(process%stderr_file)
287+
c_cmd = to_c_char(join(args))
288+
if (present(stdin)) c_stdin = to_c_char(stdin)
289+
if (allocated(process%stdin_file)) c_stdin_file = to_c_char(process%stdin_file)
290+
if (allocated(process%stdout_file)) c_stdout_file = to_c_char(process%stdout_file)
291+
if (allocated(process%stderr_file)) c_stderr_file = to_c_char(process%stderr_file)
292292

293293
! On Windows, this 1) creates 2) launches an external process from C.
294294
! On unix, this 1) forks an external process

0 commit comments

Comments
 (0)
Please sign in to comment.