From: Slava Pestov Date: Fri, 6 Feb 2009 11:10:41 +0000 (-0600) Subject: Fix conflict in libc X-Git-Tag: 0.94~2191^2~337 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=dd9cf39467c4a9f30d64a3d9f63a349f68fbcdcf Fix conflict in libc --- dd9cf39467c4a9f30d64a3d9f63a349f68fbcdcf diff --cc basis/libc/libc.factor index 45365d4296,1e751833a2..623d2f23af --- a/basis/libc/libc.factor +++ b/basis/libc/libc.factor @@@ -67,18 -67,22 +67,19 @@@ M: realloc-error summar PRIVATE> : malloc ( size -- alien ) - (malloc) check-ptr - dup add-malloc ; + (malloc) check-ptr add-malloc ; : calloc ( count size -- alien ) - (calloc) check-ptr - dup add-malloc ; + (calloc) check-ptr add-malloc ; : realloc ( alien size -- newalien ) + [ >c-ptr ] dip over malloc-exists? [ realloc-error ] unless - dupd (realloc) check-ptr - swap delete-malloc - dup add-malloc ; + [ drop ] [ (realloc) check-ptr ] 2bi + [ delete-malloc ] [ add-malloc ] bi* ; : free ( alien -- ) - [ delete-malloc ] [ (free) ] bi ; + >c-ptr [ delete-malloc ] [ (free) ] bi ; : memcpy ( dst src size -- ) "void" "libc" "memcpy" { "void*" "void*" "ulong" } alien-invoke ; diff --cc basis/opengl/opengl.factor index 620834c7d4,6d9ac95965..7dea8a0cdc --- a/basis/opengl/opengl.factor +++ b/basis/opengl/opengl.factor @@@ -174,10 -177,10 +174,10 @@@ MACRO: all-enabled-client-state ( seq q glActiveTexture swap glBindTexture gl-error ; : (set-draw-buffers) ( buffers -- ) - [ length ] [ >uint-array underlying>> ] bi glDrawBuffers ; + [ length ] [ >uint-array ] bi glDrawBuffers ; MACRO: set-draw-buffers ( buffers -- ) - words>values [ (set-draw-buffers) ] curry ; + words>values '[ _ (set-draw-buffers) ] ; : do-attribs ( bits quot -- ) swap glPushAttrib call glPopAttrib ; inline