]> gitweb.factorcode.org Git - factor.git/commitdiff
turned errno() methods back into functions since they should already be thread safe
authorPhil Dawes <phil@phildawes.net>
Fri, 21 Aug 2009 19:44:06 +0000 (20:44 +0100)
committerPhil Dawes <phil@phildawes.net>
Wed, 16 Sep 2009 07:16:32 +0000 (08:16 +0100)
vm/io.cpp
vm/vm.hpp

index 47d964eaad9e72b5f7020623f63ad4dd43d9e197..650afb8f8aa5b042637e59bff1993a7489bfb457 100755 (executable)
--- a/vm/io.cpp
+++ b/vm/io.cpp
@@ -258,24 +258,13 @@ PRIMITIVE(fclose)
 /* This function is used by FFI I/O. Accessing the errno global directly is
 not portable, since on some libc's errno is not a global but a funky macro that
 reads thread-local storage. */
-int factorvm::err_no()
-{
-       return errno;
-}
-
 VM_C_API int err_no()
 {
-       return vm->err_no();
-}
-
-void factorvm::clear_err_no()
-{
-       errno = 0;
+       return errno;
 }
 
 VM_C_API void clear_err_no()
 {
-       return vm->clear_err_no();
+       errno = 0;
 }
-
 }
index 8372c3f0bab18ae46ae48a7fd5091ce2d6624d1b..1b0274e0b17d34d78127d680bf48169dad26ff79 100644 (file)
--- a/vm/vm.hpp
+++ b/vm/vm.hpp
@@ -448,8 +448,6 @@ struct factorvm {
        inline void vmprim_fseek();
        inline void vmprim_fflush();
        inline void vmprim_fclose();
-       int err_no();
-       void clear_err_no();
 
        //code_gc
        void clear_free_list(heap *heap);