You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl-cvs@perl.apache.org by do...@hyperreal.org on 1999/06/07 23:01:26 UTC
cvs commit: modperl/src/modules/perl Table.xs mod_perl.h
dougm 99/06/07 14:01:25
Modified: . ToDo
src/modules/perl Table.xs mod_perl.h
Log:
more g++ trippage
Revision Changes Path
1.184 +2 -0 modperl/ToDo
Index: ToDo
===================================================================
RCS file: /export/home/cvs/modperl/ToDo,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- ToDo 1999/06/04 17:50:45 1.183
+++ ToDo 1999/06/07 21:01:20 1.184
@@ -3,6 +3,8 @@
(well, close to it anyhow)
---------------------------------------------------------------------------
+- remove DIR_MAGIC_TYPE from mod_perl's handler table, if possible (Salvador)
+
- change Apache::File->tmpfile flags
- should Apache::Registry use -M or (stat _)[9]?
1.8 +21 -21 modperl/src/modules/perl/Table.xs
Index: Table.xs
===================================================================
RCS file: /export/home/cvs/modperl/src/modules/perl/Table.xs,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Table.xs 1999/06/04 17:50:47 1.7
+++ Table.xs 1999/06/07 21:01:23 1.8
@@ -41,27 +41,27 @@
dTHR;
const char *val;
- if(!self->table) return;
+ if(!self->utable) return;
if(SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVAV)) {
I32 i;
AV *av = (AV*)SvRV(sv);
for(i=0; i<=AvFILL(av); i++) {
val = (const char *)SvPV(*av_fetch(av, i, FALSE),na);
- (*tabfunc)(self->table, key, val);
+ (*tabfunc)(self->utable, key, val);
}
}
else {
val = (const char *)SvPV(sv,na);
- (*tabfunc)(self->table, key, val);
+ (*tabfunc)(self->utable, key, val);
}
}
-static Apache__Table ApacheTable_new(table *table)
+static Apache__Table ApacheTable_new(table *utable)
{
Apache__Table RETVAL = (Apache__Table)safemalloc(sizeof(TiedTable));
- RETVAL->table = table;
+ RETVAL->utable = utable;
RETVAL->ix = 0;
RETVAL->elts = NULL;
RETVAL->arr = NULL;
@@ -119,15 +119,15 @@
PPCODE:
ix = ix; /*avoid warning*/
- if(!self->table) XSRETURN_UNDEF;
+ if(!self->utable) XSRETURN_UNDEF;
if(GIMME == G_SCALAR) {
- const char *val = table_get(self->table, key);
+ const char *val = table_get(self->utable, key);
if (val) XPUSHs(sv_2mortal(newSVpv((char*)val,0)));
else XSRETURN_UNDEF;
}
else {
int i;
- array_header *arr = table_elts(self->table);
+ array_header *arr = table_elts(self->utable);
table_entry *elts = (table_entry *)arr->elts;
for (i = 0; i < arr->nelts; ++i) {
if (!elts[i].key || strcasecmp(elts[i].key, key)) continue;
@@ -141,8 +141,8 @@
const char *key
CODE:
- if(!self->table) XSRETURN_UNDEF;
- RETVAL = table_get(self->table, key) ? TRUE : FALSE;
+ if(!self->utable) XSRETURN_UNDEF;
+ RETVAL = table_get(self->utable, key) ? TRUE : FALSE;
OUTPUT:
RETVAL
@@ -160,11 +160,11 @@
CODE:
ix = ix;
- if(!self->table) XSRETURN_UNDEF;
+ if(!self->utable) XSRETURN_UNDEF;
RETVAL = NULL;
if(gimme != G_VOID)
- RETVAL = table_get(self->table, key);
- table_unset(self->table, key);
+ RETVAL = table_get(self->utable, key);
+ table_unset(self->utable, key);
if(!RETVAL) XSRETURN_UNDEF;
OUTPUT:
@@ -181,8 +181,8 @@
CODE:
ix = ix; /*avoid warning*/
- if(!self->table) XSRETURN_UNDEF;
- table_set(self->table, key, val);
+ if(!self->utable) XSRETURN_UNDEF;
+ table_set(self->utable, key, val);
void
CLEAR(self)
@@ -193,8 +193,8 @@
CODE:
ix = ix; /*avoid warning*/
- if(!self->table) XSRETURN_UNDEF;
- clear_table(self->table);
+ if(!self->utable) XSRETURN_UNDEF;
+ clear_table(self->utable);
const char *
NEXTKEY(self, lastkey=Nullsv)
@@ -213,8 +213,8 @@
Apache::Table self
CODE:
- if(!self->table) XSRETURN_UNDEF;
- self->arr = table_elts(self->table);
+ if(!self->utable) XSRETURN_UNDEF;
+ self->arr = table_elts(self->utable);
if(!self->arr->nelts) XSRETURN_UNDEF;
self->elts = (table_entry *)self->arr->elts;
self->ix = 0;
@@ -254,7 +254,7 @@
if(items > 2) {
int i;
STRLEN len;
- td.only = make_table(table_pool(self->table), items-2);
+ td.only = make_table(table_pool(self->utable), items-2);
for(i=2; ; i++) {
char *key = SvPV(ST(i),len);
table_set(td.only, key, "1");
@@ -264,4 +264,4 @@
td.cv = cv;
table_do((int (*) (void *, const char *, const char *)) Apache_table_do,
- (void *) &td, self->table, NULL);
+ (void *) &td, self->utable, NULL);
1.79 +2 -3 modperl/src/modules/perl/mod_perl.h
Index: mod_perl.h
===================================================================
RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.h,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- mod_perl.h 1999/06/04 17:50:47 1.78
+++ mod_perl.h 1999/06/07 21:01:23 1.79
@@ -189,7 +189,7 @@
#endif
typedef struct {
- table *table;
+ table *utable;
array_header *arr;
table_entry *elts;
int ix;
@@ -565,12 +565,11 @@
extern void *mod_perl_dummy_mutex;
#ifndef MULTITHREAD_H
-typedef void mutex;
#define MULTI_OK (0)
#undef create_mutex
#undef acquire_mutex
#undef release_mutex
-#define create_mutex(name) ((mutex *)mod_perl_dummy_mutex)
+#define create_mutex(name) ((void *)mod_perl_dummy_mutex)
#define acquire_mutex(mutex_id) ((int)MULTI_OK)
#define release_mutex(mutex_id) ((int)MULTI_OK)
#endif /* MULTITHREAD_H */