summaryrefslogtreecommitdiff
path: root/ext/dba/libcdb/cdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dba/libcdb/cdb.c')
-rw-r--r--ext/dba/libcdb/cdb.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/ext/dba/libcdb/cdb.c b/ext/dba/libcdb/cdb.c
index c8caf8b8f2..d6578d017d 100644
--- a/ext/dba/libcdb/cdb.c
+++ b/ext/dba/libcdb/cdb.c
@@ -43,7 +43,7 @@
#endif
/* {{{ cdb_match */
-static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos TSRMLS_DC)
+static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos)
{
char buf[32];
unsigned int n;
@@ -52,7 +52,7 @@ static int cdb_match(struct cdb *c, char *key, unsigned int len, uint32 pos TSRM
n = sizeof(buf);
if (n > len)
n = len;
- if (cdb_read(c, buf, n, pos TSRMLS_CC) == -1)
+ if (cdb_read(c, buf, n, pos) == -1)
return -1;
if (memcmp(buf, key, n))
return 0;
@@ -79,29 +79,29 @@ uint32 cdb_hash(char *buf, unsigned int len)
/* }}} */
/* {{{ cdb_free */
-void cdb_free(struct cdb *c TSRMLS_DC)
+void cdb_free(struct cdb *c)
{
}
/* }}} */
/* {{{ cdb_findstart */
-void cdb_findstart(struct cdb *c TSRMLS_DC)
+void cdb_findstart(struct cdb *c)
{
c->loop = 0;
}
/* }}} */
/* {{{ cdb_init */
-void cdb_init(struct cdb *c, php_stream *fp TSRMLS_DC)
+void cdb_init(struct cdb *c, php_stream *fp)
{
- cdb_free(c TSRMLS_CC);
- cdb_findstart(c TSRMLS_CC);
+ cdb_free(c);
+ cdb_findstart(c);
c->fp = fp;
}
/* }}} */
/* {{{ cdb_read */
-int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos TSRMLS_DC)
+int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos)
{
if (php_stream_seek(c->fp, pos, SEEK_SET) == -1) {
errno = EPROTO;
@@ -126,7 +126,7 @@ int cdb_read(struct cdb *c, char *buf, unsigned int len, uint32 pos TSRMLS_DC)
/* }}} */
/* {{{ cdb_findnext */
-int cdb_findnext(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
+int cdb_findnext(struct cdb *c, char *key, unsigned int len)
{
char buf[8];
uint32 pos;
@@ -134,7 +134,7 @@ int cdb_findnext(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
if (!c->loop) {
u = cdb_hash(key, len);
- if (cdb_read(c, buf, 8, (u << 3) & 2047 TSRMLS_CC) == -1)
+ if (cdb_read(c, buf, 8, (u << 3) & 2047) == -1)
return -1;
uint32_unpack(buf + 4,&c->hslots);
if (!c->hslots)
@@ -148,7 +148,7 @@ int cdb_findnext(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
}
while (c->loop < c->hslots) {
- if (cdb_read(c, buf, 8, c->kpos TSRMLS_CC) == -1)
+ if (cdb_read(c, buf, 8, c->kpos) == -1)
return -1;
uint32_unpack(buf + 4, &pos);
if (!pos)
@@ -159,11 +159,11 @@ int cdb_findnext(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
c->kpos = c->hpos;
uint32_unpack(buf, &u);
if (u == c->khash) {
- if (cdb_read(c, buf, 8, pos TSRMLS_CC) == -1)
+ if (cdb_read(c, buf, 8, pos) == -1)
return -1;
uint32_unpack(buf, &u);
if (u == len)
- switch(cdb_match(c, key, len, pos + 8 TSRMLS_CC)) {
+ switch(cdb_match(c, key, len, pos + 8)) {
case -1:
return -1;
case 1:
@@ -179,10 +179,10 @@ int cdb_findnext(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
/* }}} */
/* {{{ cdb_find */
-int cdb_find(struct cdb *c, char *key, unsigned int len TSRMLS_DC)
+int cdb_find(struct cdb *c, char *key, unsigned int len)
{
- cdb_findstart(c TSRMLS_CC);
- return cdb_findnext(c, key, len TSRMLS_CC);
+ cdb_findstart(c);
+ return cdb_findnext(c, key, len);
}
/* }}} */