dougm 00/12/29 09:10:09
Modified: . Changes
src/modules/perl Apache.xs
Log:
allow $r->finfo to be modified
Revision Changes Path
1.565 +2 -0 modperl/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl/Changes,v
retrieving revision 1.564
retrieving revision 1.565
diff -u -r1.564 -r1.565
--- Changes 2000/12/23 02:23:07 1.564
+++ Changes 2000/12/29 17:10:06 1.565
@@ -10,6 +10,8 @@
=item 1.24_02-dev
+allow $r->finfo to be modified
+
if Perl is linked with -lpthread, then httpd needs to be linked with
-lpthread, make sure that happens with USE_DSO=1, warn if USE_APXS=1
1.119 +17 -1 modperl/src/modules/perl/Apache.xs
Index: Apache.xs
===================================================================
RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
retrieving revision 1.118
retrieving revision 1.119
diff -u -r1.118 -r1.119
--- Apache.xs 2000/12/22 20:56:24 1.118
+++ Apache.xs 2000/12/29 17:10:08 1.119
@@ -1906,10 +1906,26 @@
# struct stat finfo; /* ST_MODE set to zero if no such file */
SV *
-finfo(r)
+finfo(r, sv_statbuf=Nullsv)
Apache r
+ SV *sv_statbuf
CODE:
+ if (sv_statbuf) {
+ if (SvROK(sv_statbuf) && SvOBJECT(SvRV(sv_statbuf))) {
+ STRLEN sz;
+ char *buf = SvPV((SV*)SvRV(sv_statbuf), sz);
+ if (sz != sizeof(r->finfo)) {
+ croak("statbuf size mismatch, got %d, wanted %d",
+ sz, sizeof(r->finfo));
+ }
+ memcpy(&r->finfo, buf, sz);
+ }
+ else {
+ croak("statbuf is not an object");
+ }
+ }
+
statcache = r->finfo;
if (r->finfo.st_mode) {
laststatval = 0;