diff --git a/core/libc/libc-docs.factor b/core/libc/libc-docs.factor index 9596b98292..ba870560d6 100644 --- a/core/libc/libc-docs.factor +++ b/core/libc/libc-docs.factor @@ -26,8 +26,7 @@ HELP: memcpy HELP: check-ptr { $values { "c-ptr" "an alien address, byte array, or " { $link f } } { "checked" "an alien address or byte array with non-zero address" } } -{ $description "Throws an error if the input is " { $link f } ". Otherwise the object remains on the data stack. This word should be used to check the return values of " { $link malloc } " and " { $link realloc } " before use." } -{ $error-description "Callers of " { $link malloc } " and " { $link realloc } " should use " { $link check-ptr } " to throw an error in the case of a memory allocation failure." } ; +{ $description "Throws an error if the input is " { $link f } ". Otherwise the object remains on the data stack." } ; HELP: free { $values { "alien" c-ptr } } diff --git a/core/libc/libc.factor b/core/libc/libc.factor index 71b49e940a..88c5070d1f 100644 --- a/core/libc/libc.factor +++ b/core/libc/libc.factor @@ -84,4 +84,4 @@ PRIVATE> "void" "libc" "memcpy" { "void*" "void*" "ulong" } alien-invoke ; : with-malloc ( size quot -- ) - swap 1 calloc check-ptr swap keep free ; inline + swap 1 calloc swap keep free ; inline diff --git a/extra/io/buffers/buffers.factor b/extra/io/buffers/buffers.factor index e58cf3ead0..5d6eaebe6f 100644 --- a/extra/io/buffers/buffers.factor +++ b/extra/io/buffers/buffers.factor @@ -79,7 +79,7 @@ HINTS: search-buffer-until { fixnum fixnum simple-alien string } ; buffer-fill zero? ; : extend-buffer ( n buffer -- ) - 2dup buffer-ptr swap realloc check-ptr + 2dup buffer-ptr swap realloc over set-buffer-ptr set-buffer-size ; : check-overflow ( n buffer -- ) diff --git a/extra/io/unix/launcher/launcher.factor b/extra/io/unix/launcher/launcher.factor index 9804519fb6..61a6f706f6 100644 --- a/extra/io/unix/launcher/launcher.factor +++ b/extra/io/unix/launcher/launcher.factor @@ -31,7 +31,7 @@ USE: unix ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -: with-fork ( quot -- pid ) +: with-fork ( child parent -- pid ) fork [ zero? -rot if ] keep ; inline : prepare-execvp ( args -- cmd args ) diff --git a/extra/io/windows/nt/sockets/sockets.factor b/extra/io/windows/nt/sockets/sockets.factor index 74538ac06a..47ab7795b0 100755 --- a/extra/io/windows/nt/sockets/sockets.factor +++ b/extra/io/windows/nt/sockets/sockets.factor @@ -1,5 +1,5 @@ USING: alien alien.c-types byte-arrays continuations destructors -io.nonblocking io io.sockets io.sockets.impl +io.nonblocking io io.sockets io.sockets.impl namespaces io.streams.duplex io.windows io.windows.nt io.windows.nt.backend windows.winsock kernel libc math sequences threads tuples.lib ; IN: io.windows.nt.sockets