diff --git a/vm/io.c b/vm/io.c index 55787e1ab1..0e54336085 100644 --- a/vm/io.c +++ b/vm/io.c @@ -35,8 +35,8 @@ void primitive_fopen(void) char *path, *mode; FILE* file; maybe_gc(0); - mode = pop_char_string(); - path = pop_char_string(); + mode = unbox_char_string(); + path = unbox_char_string(); file = fopen(path,mode); if(file == NULL) io_error(); diff --git a/vm/os-unix.c b/vm/os-unix.c index d87204e702..d4faec93ed 100644 --- a/vm/os-unix.c +++ b/vm/os-unix.c @@ -131,7 +131,7 @@ void primitive_cwd(void) void primitive_cd(void) { maybe_gc(0); - chdir(pop_char_string()); + chdir(unbox_char_string()); } BOUNDED_BLOCK *alloc_bounded_block(CELL size) diff --git a/vm/os-windows.c b/vm/os-windows.c index c5202f679c..80c9b3195b 100644 --- a/vm/os-windows.c +++ b/vm/os-windows.c @@ -163,7 +163,7 @@ void primitive_cwd(void) void primitive_cd(void) { maybe_gc(0); - SetCurrentDirectory(pop_char_string()); + SetCurrentDirectory(unbox_char_string()); } BOUNDED_BLOCK *alloc_bounded_block(CELL size) diff --git a/vm/run.c b/vm/run.c index 8365502dd1..8aeeb349fa 100644 --- a/vm/run.c +++ b/vm/run.c @@ -170,7 +170,7 @@ void primitive_os_env(void) maybe_gc(0); - name = pop_char_string(); + name = unbox_char_string(); value = getenv(name); if(value == NULL) dpush(F); diff --git a/vm/types.c b/vm/types.c index 89c8963079..a3766ab912 100644 --- a/vm/types.c +++ b/vm/types.c @@ -356,16 +356,9 @@ F_ARRAY *allot_c_string(CELL capacity, CELL size) else \ return (type*)(string_to_##type##_alien(s,check) + 1); \ } \ - type *pop_##type##_string(void) \ - { \ - return to_##type##_string(untag_string(dpop()),true); \ - } \ type *unbox_##type##_string(void) \ { \ - if(type_of(dpeek()) == STRING_TYPE) \ - return pop_##type##_string(); \ - else \ - return unbox_alien(); \ + return to_##type##_string(untag_string(dpop()),true); \ } \ void primitive_string_to_##type##_alien(void) \ { \ diff --git a/vm/types.h b/vm/types.h index 00211e611d..6be2d9cbd1 100644 --- a/vm/types.h +++ b/vm/types.h @@ -110,7 +110,6 @@ void char_string_to_memory(F_STRING *s, char *string); void primitive_char_string_to_memory(void); F_ARRAY *string_to_char_alien(F_STRING *s, bool check); char* to_char_string(F_STRING *s, bool check); -char *pop_char_string(void); DLLEXPORT char *unbox_char_string(void); void primitive_string_to_char_alien(void); @@ -118,7 +117,6 @@ void u16_string_to_memory(F_STRING *s, u16 *string); void primitive_u16_string_to_memory(void); F_ARRAY *string_to_u16_alien(F_STRING *s, bool check); u16* to_u16_string(F_STRING *s, bool check); -u16 *pop_u16_string(void); DLLEXPORT u16 *unbox_u16_string(void); void primitive_string_to_u16_alien(void);