[commit: packages/primitive] ghc-head: Rename primitive operations (a123980)

git at git.haskell.org git at git.haskell.org
Thu Sep 26 11:44:58 CEST 2013


Repository : ssh://git@git.haskell.org/primitive

On branch  : ghc-head
Link       : http://git.haskell.org/packages/primitive.git/commitdiff/a123980ff2b5973049ab1b6bec27f7803072ec2c

>---------------------------------------------------------------

commit a123980ff2b5973049ab1b6bec27f7803072ec2c
Author: Roman Leshchinskiy <rl at cse.unsw.edu.au>
Date:   Fri Jan 27 19:17:30 2012 -0700

    Rename primitive operations


>---------------------------------------------------------------

a123980ff2b5973049ab1b6bec27f7803072ec2c
 Data/Primitive/ByteArray.hs |    6 +++---
 cbits/primitive-memops.c    |    4 ++--
 cbits/primitive-memops.h    |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/Data/Primitive/ByteArray.hs b/Data/Primitive/ByteArray.hs
index 4c93788..634d70d 100644
--- a/Data/Primitive/ByteArray.hs
+++ b/Data/Primitive/ByteArray.hs
@@ -236,17 +236,17 @@ fillByteArray = setByteArray
 
 
 
-foreign import ccall unsafe "primitive-memops.h memcpy_off"
+foreign import ccall unsafe "primitive-memops.h hsprimitive_memcpy"
   memcpy_mba :: MutableByteArray# s -> CInt
              -> MutableByteArray# s -> CInt
              -> CSize -> IO ()
 
-foreign import ccall unsafe "primitive-memops.h memcpy_off"
+foreign import ccall unsafe "primitive-memops.h hsprimitive_memcpy"
   memcpy_ba :: MutableByteArray# s -> CInt
             -> ByteArray# -> CInt
             -> CSize -> IO ()
 
-foreign import ccall unsafe "primitive-memops.h memmove_off"
+foreign import ccall unsafe "primitive-memops.h hsprimitive_memmove"
   memmove_mba :: MutableByteArray# s -> CInt
               -> MutableByteArray# s -> CInt
               -> CSize -> IO ()
diff --git a/cbits/primitive-memops.c b/cbits/primitive-memops.c
index 1a0d590..646ecaf 100644
--- a/cbits/primitive-memops.c
+++ b/cbits/primitive-memops.c
@@ -1,12 +1,12 @@
 #include <string.h>
 #include "primitive-memops.h"
 
-void memcpy_off( void *dst, int doff, void *src, int soff, size_t len )
+void hsprimitive_memcpy( void *dst, int doff, void *src, int soff, size_t len )
 {
   memcpy( (char *)dst + doff, (char *)src + soff, len );
 }
 
-void memmove_off( void *dst, int doff, void *src, int soff, size_t len )
+void hsprimitive_memmove( void *dst, int doff, void *src, int soff, size_t len )
 {
   memmove( (char *)dst + doff, (char *)src + soff, len );
 }
diff --git a/cbits/primitive-memops.h b/cbits/primitive-memops.h
index 5874738..d0342c4 100644
--- a/cbits/primitive-memops.h
+++ b/cbits/primitive-memops.h
@@ -4,8 +4,8 @@
 #include <stdlib.h>
 #include <HsFFI.h>
 
-void memcpy_off( void *dst, int doff, void *src, int soff, size_t len );
-void memmove_off( void *dst, int doff, void *src, int soff, size_t len );
+void hsprimitive_memcpy( void *dst, int doff, void *src, int soff, size_t len );
+void hsprimitive_memmove( void *dst, int doff, void *src, int soff, size_t len );
 
 void hsprimitive_memset_Word8 (HsWord8 *, int, int, HsWord);
 void hsprimitive_memset_Word16 (HsWord16 *, int, int, HsWord);




More information about the ghc-commits mailing list