Changeset: 34119ad3e24c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=34119ad3e24c
Modified Files:
        gdk/gdk.h
        gdk/gdk_private.h
        gdk/gdk_qsort.c
        gdk/gdk_ssort.c
        gdk/gdk_ssort_impl.h
Branch: default
Log Message:

Some more const declarations.


diffs (82 lines):

diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1683,8 +1683,8 @@ gdk_export int BATordered_rev(BAT *b);
 gdk_export BAT *BATssort(BAT *b);
 gdk_export BAT *BATssort_rev(BAT *b);
 
-gdk_export void GDKqsort(void *h, void *t, void *base, size_t n, int hs, int 
ts, int tpe);
-gdk_export void GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, 
int ts, int tpe);
+gdk_export void GDKqsort(void *h, void *t, const void *base, size_t n, int hs, 
int ts, int tpe);
+gdk_export void GDKqsort_rev(void *h, void *t, const void *base, size_t n, int 
hs, int ts, int tpe);
 
 #define BAThordered(b) ((b)->htype == TYPE_void || (b)->hsorted)
 #define BATtordered(b) ((b)->ttype == TYPE_void || (b)->tsorted)
diff --git a/gdk/gdk_private.h b/gdk/gdk_private.h
--- a/gdk/gdk_private.h
+++ b/gdk/gdk_private.h
@@ -69,8 +69,8 @@ int GDKmunmap(void *addr, size_t len);
 void *GDKreallocmax(void *pold, size_t size, size_t *maxsize, int emergency);
 int GDKremovedir(const char *nme);
 int GDKsave(const char *nme, const char *ext, void *buf, size_t size, 
storage_t mode);
-int GDKssort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int 
tpe);
-int GDKssort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe);
+int GDKssort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, 
int tpe);
+int GDKssort(void *h, void *t, const void *base, size_t n, int hs, int ts, int 
tpe);
 int GDKunlink(const char *dir, const char *nme, const char *extension);
 int HASHgonebad(BAT *b, const void *v);
 BUN HASHmask(BUN cnt);
diff --git a/gdk/gdk_qsort.c b/gdk/gdk_qsort.c
--- a/gdk/gdk_qsort.c
+++ b/gdk/gdk_qsort.c
@@ -25,7 +25,7 @@ struct qsort_t {
        unsigned int hs;
        unsigned int ts;
        int (*cmp)(const void *, const void *);
-       char *base;
+       const char *base;
 };
 
 /* return index of middle value at indexes a, b, and c */
@@ -293,7 +293,7 @@ struct qsort_t {
 
 /* the interface functions */
 void
-GDKqsort(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe)
+GDKqsort(void *h, void *t, const void *base, size_t n, int hs, int ts, int tpe)
 {
        struct qsort_t buf;
 
@@ -340,7 +340,7 @@ GDKqsort(void *h, void *t, void *base, s
 }
 
 void
-GDKqsort_rev(void *h, void *t, void *base, size_t n, int hs, int ts, int tpe)
+GDKqsort_rev(void *h, void *t, const void *base, size_t n, int hs, int ts, int 
tpe)
 {
        struct qsort_t buf;
 
diff --git a/gdk/gdk_ssort.c b/gdk/gdk_ssort.c
--- a/gdk/gdk_ssort.c
+++ b/gdk/gdk_ssort.c
@@ -49,7 +49,7 @@ struct slice {
 typedef struct {
        /* The comparison function. */
        int (*compare) (const void *, const void *);
-       char *heap;
+       const char *heap;
        int hs;
        int ts;
        void *bh;
diff --git a/gdk/gdk_ssort_impl.h b/gdk/gdk_ssort_impl.h
--- a/gdk/gdk_ssort_impl.h
+++ b/gdk/gdk_ssort_impl.h
@@ -806,7 +806,7 @@ do_ssort(MergeState *ms, ssize_t nremain
  * the actual key is found at that offset (MonetDB var-sized
  * atoms). */
 int
-GDKssortimpl(void *h, void *t, void *heap, size_t nitems,
+GDKssortimpl(void *h, void *t, const void *heap, size_t nitems,
             int hs, int ts, int tpe)
 {
        char temp;
_______________________________________________
Checkin-list mailing list
Checkin-list@monetdb.org
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to