diff options
author | Robin Barker <RMBarker@cpan.org> | 2007-12-22 00:39:47 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-12-22 16:17:01 +0000 |
commit | d3f5e39945c1adca90422be3853d860ba9478c11 (patch) | |
tree | 3c862227ab85f5337dad461b490e91a47018452d /ext/SDBM_File | |
parent | 3376de987afecc3e3aea14b3dea087f4b50fd3f4 (diff) | |
download | perl-d3f5e39945c1adca90422be3853d860ba9478c11.tar.gz |
ext/ consting
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399D@exchsvr2.npl.ad.local>
Date: Sat, 22 Dec 2007 00:39:47 -0000
p4raw-id: //depot/perl@32703
Diffstat (limited to 'ext/SDBM_File')
-rw-r--r-- | ext/SDBM_File/sdbm/hash.c | 2 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm/pair.c | 4 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm/sdbm.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/ext/SDBM_File/sdbm/hash.c b/ext/SDBM_File/sdbm/hash.c index 9b27648599..7dd1c99e35 100644 --- a/ext/SDBM_File/sdbm/hash.c +++ b/ext/SDBM_File/sdbm/hash.c @@ -18,7 +18,7 @@ * 65587 even better. */ long -sdbm_hash(register char *str, register int len) +sdbm_hash(register const char *str, register int len) { register unsigned long n = 0; diff --git a/ext/SDBM_File/sdbm/pair.c b/ext/SDBM_File/sdbm/pair.c index 4f0fde2302..42b130db19 100644 --- a/ext/SDBM_File/sdbm/pair.c +++ b/ext/SDBM_File/sdbm/pair.c @@ -22,7 +22,7 @@ /* * forward */ -static int seepair proto((char *, int, char *, int)); +static int seepair proto((char *, int, const char *, int)); /* * page format: @@ -218,7 +218,7 @@ delpair(char *pag, datum key) * return 0 if not found. */ static int -seepair(char *pag, register int n, register char *key, register int siz) +seepair(char *pag, register int n, register const char *key, register int siz) { register int i; register int off = PBLKSIZ; diff --git a/ext/SDBM_File/sdbm/sdbm.h b/ext/SDBM_File/sdbm/sdbm.h index 88e4b66b39..53fc366801 100644 --- a/ext/SDBM_File/sdbm/sdbm.h +++ b/ext/SDBM_File/sdbm/sdbm.h @@ -47,7 +47,7 @@ typedef struct { #define sdbm_pagfno(db) ((db)->pagf) typedef struct { - char *dptr; + const char *dptr; int dsize; } datum; @@ -85,7 +85,7 @@ extern int sdbm_exists proto((DBM *, datum)); * other */ extern DBM *sdbm_prep proto((char *, char *, int, int)); -extern long sdbm_hash proto((char *, int)); +extern long sdbm_hash proto((const char *, int)); #ifndef SDBM_ONLY #define dbm_open sdbm_open |