perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl Constants.xs File.xs Log.xs Table.xs mod_perl.c mod_perl.h perl_config.c perl_util.c
Date Fri, 04 Jun 1999 17:50:52 GMT
dougm       99/06/04 10:50:51

  Modified:    .        Changes ToDo
               src/modules/perl Constants.xs File.xs Log.xs Table.xs
                        mod_perl.c mod_perl.h perl_config.c perl_util.c
  Log:
  s/class/pclass/g so we can compile w/ c++
  
  Revision  Changes    Path
  1.300     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /export/home/cvs/modperl/Changes,v
  retrieving revision 1.299
  retrieving revision 1.300
  diff -u -r1.299 -r1.300
  --- Changes	1999/06/01 06:33:04	1.299
  +++ Changes	1999/06/04 17:50:44	1.300
  @@ -8,6 +8,8 @@
   
   =item 1.19_01-dev
   
  +s/class/pclass/g so we can compile w/ c++
  +
   mod_perl will now save/restore SIGALRM
   
   fix Apache::Status bug prototype check of 'use constant' subs, thanks to
  
  
  
  1.183     +2 -0      modperl/ToDo
  
  Index: ToDo
  ===================================================================
  RCS file: /export/home/cvs/modperl/ToDo,v
  retrieving revision 1.182
  retrieving revision 1.183
  diff -u -r1.182 -r1.183
  --- ToDo	1999/06/01 06:33:05	1.182
  +++ ToDo	1999/06/04 17:50:45	1.183
  @@ -3,6 +3,8 @@
                    (well, close to it anyhow)
   ---------------------------------------------------------------------------
   
  +- change Apache::File->tmpfile flags
  +
   - should Apache::Registry use -M or (stat _)[9]?
   
   - restart troubles: Apache::DBI, @INC
  
  
  
  1.16      +9 -9      modperl/src/modules/perl/Constants.xs
  
  Index: Constants.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Constants.xs,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Constants.xs	1999/05/18 00:46:47	1.15
  +++ Constants.xs	1999/06/04 17:50:46	1.16
  @@ -12,19 +12,19 @@
   #ifdef XS_IMPORT
   #include "Exports.c"
   
  -static void export_cv(SV *class, SV *caller, char *sub)
  +static void export_cv(SV *pclass, SV *caller, char *sub)
   {
       GV *gv;
   #if 0
       fprintf(stderr, "*%s::%s = \\&%s::%s\n",
  -	    SvPVX(caller), sub, SvPVX(class), sub);
  +	    SvPVX(caller), sub, SvPVX(pclass), sub);
   #endif
       gv = gv_fetchpv(form("%_::%s", caller, sub), TRUE, SVt_PVCV);
  -    GvCV(gv) = perl_get_cv(form("%_::%s", class, sub), TRUE);
  +    GvCV(gv) = perl_get_cv(form("%_::%s", pclass, sub), TRUE);
       GvIMPORTED_CV_on(gv);
   }
   
  -static void my_import(SV *class, SV *caller, SV *sv)
  +static void my_import(SV *pclass, SV *caller, SV *sv)
   {
       char *sym = SvPV(sv,na), **tags;
       int i;
  @@ -34,7 +34,7 @@
   	++sym;
   	tags = export_tags(sym);
   	for(i=0; tags[i]; i++) {
  -	    export_cv(class, caller, tags[i]);
  +	    export_cv(pclass, caller, tags[i]);
   	}
   	break;
       case '$':
  @@ -46,7 +46,7 @@
   	++sym;
       default:
   	if(isALPHA(sym[0])) {
  -	    export_cv(class, caller, sym);
  +	    export_cv(pclass, caller, sym);
   	    break;
   	}
   	else {
  @@ -905,8 +905,8 @@
   #ifdef XS_IMPORT
   
   void
  -import(class, ...)
  -    SV *class
  +import(pclass, ...)
  +    SV *pclass
   
       PREINIT:
       I32 i = 0;
  @@ -914,7 +914,7 @@
   
       CODE:
       for(i=1; i<items; i++) {
  -	my_import(class, caller, ST(i));
  +	my_import(pclass, caller, ST(i));
       }
   
   #endif
  
  
  
  1.9       +7 -7      modperl/src/modules/perl/File.xs
  
  Index: File.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/File.xs,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- File.xs	1999/05/26 01:41:29	1.8
  +++ File.xs	1999/06/04 17:50:46	1.9
  @@ -22,10 +22,10 @@
       return do_open(gv, filename, len, FALSE, 0, 0, IOp); 
   }
   
  -static SV *ApacheFile_new(char *class)
  +static SV *ApacheFile_new(char *pclass)
   {
       SV *RETVAL = sv_newmortal();
  -    GV *gv = newGVgen(class);
  +    GV *gv = newGVgen(pclass);
       HV *stash = GvSTASH(gv);
   
       sv_setsv(RETVAL, sv_bless(sv_2mortal(newRV((SV*)gv)), stash));
  @@ -89,15 +89,15 @@
       items = items; /*avoid warning*/ 
   
   void
  -ApacheFile_new(class, filename=Nullsv)
  -    char *class
  +ApacheFile_new(pclass, filename=Nullsv)
  +    char *pclass
       SV *filename
   
       PREINIT:
       SV *RETVAL;
   
       PPCODE:
  -    RETVAL = ApacheFile_new(class);
  +    RETVAL = ApacheFile_new(pclass);
       if(filename) {
   	if(!ApacheFile_open(RETVAL, filename))
   	    XSRETURN_UNDEF;
  @@ -117,8 +117,8 @@
   
       PREINIT:
       PerlIO *fp = PerlIO_tmpfile();
  -    char *class = SvROK(self) ? SvCLASS(self) : SvPV(self,na);
  -    SV *RETVAL = ApacheFile_new(class);
  +    char *pclass = SvROK(self) ? SvCLASS(self) : SvPV(self,na);
  +    SV *RETVAL = ApacheFile_new(pclass);
   
       PPCODE:
       if(!do_open((GV*)SvRV(RETVAL), "+>&", 3, FALSE, 0, 0, fp))
  
  
  
  1.10      +3 -3      modperl/src/modules/perl/Log.xs
  
  Index: Log.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Log.xs,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- Log.xs	1999/01/18 02:46:35	1.9
  +++ Log.xs	1999/06/04 17:50:46	1.10
  @@ -138,7 +138,7 @@
   
       PREINIT:
       void *retval;
  -    char *class = "Apache::Log::Request";
  +    char *pclass = "Apache::Log::Request";
   
       CODE:
       if(!SvROK(sv))
  @@ -148,7 +148,7 @@
   	retval = (void*)sv2request_rec(sv, "Apache", cv);
       }
       else if(sv_derived_from(sv, "Apache::Server")) {
  -	class = "Apache::Log::Server";
  +	pclass = "Apache::Log::Server";
   	retval = (void *) SvIV((SV*)SvRV(sv));
       }
       else {
  @@ -156,7 +156,7 @@
       }
   
       ST(0) = sv_newmortal();
  -    sv_setref_pv(ST(0), class, (void*)retval);
  +    sv_setref_pv(ST(0), pclass, (void*)retval);
   
   void
   Apache_log_emerg(s, ...)
  
  
  
  1.7       +6 -6      modperl/src/modules/perl/Table.xs
  
  Index: Table.xs
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/Table.xs,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Table.xs	1999/05/18 02:26:30	1.6
  +++ Table.xs	1999/06/04 17:50:47	1.7
  @@ -76,25 +76,25 @@
       items = items; /*avoid warning*/ 
   
   Apache::Table
  -TIEHASH(class, table)
  -    SV *class
  +TIEHASH(pclass, table)
  +    SV *pclass
       Apache::table table
   
       CODE:
  -    if(!class) XSRETURN_UNDEF;
  +    if(!pclass) XSRETURN_UNDEF;
       RETVAL = ApacheTable_new(table);
   
       OUTPUT:
       RETVAL
   
   void
  -new(class, r, nalloc=10)
  -    SV *class
  +new(pclass, r, nalloc=10)
  +    SV *pclass
       Apache r
       int nalloc
   
       CODE:
  -    if(!class) XSRETURN_UNDEF;
  +    if(!pclass) XSRETURN_UNDEF;
       ST(0) = mod_perl_tie_table(make_table(r->pool, nalloc));
   
   void
  
  
  
  1.89      +25 -25    modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.88
  retrieving revision 1.89
  diff -u -r1.88 -r1.89
  --- mod_perl.c	1999/06/02 01:08:30	1.88
  +++ mod_perl.c	1999/06/04 17:50:47	1.89
  @@ -1089,7 +1089,7 @@
   }
   
   #ifdef PERL_METHOD_HANDLERS
  -int perl_handler_ismethod(HV *class, char *sub)
  +int perl_handler_ismethod(HV *pclass, char *sub)
   {
       CV *cv;
       HV *stash;
  @@ -1100,7 +1100,7 @@
       if(!sub) return 0;
       sv = newSVpv(sub,0);
       if(!(cv = sv_2cv(sv, &stash, &gv, FALSE))) {
  -	GV *gvp = gv_fetchmethod(class, sub);
  +	GV *gvp = gv_fetchmethod(pclass, sub);
   	if (gvp) cv = GvCV(gvp);
       }
   
  @@ -1327,7 +1327,7 @@
       dSP;
       perl_dir_config *cld = NULL;
       HV *stash = Nullhv;
  -    SV *class = newSVsv(sv), *dispsv = Nullsv;
  +    SV *pclass = newSVsv(sv), *dispsv = Nullsv;
       CV *cv = Nullcv;
       char *method = "handler";
       int defined_sub = 0, anon = 0;
  @@ -1353,7 +1353,7 @@
   	perl_per_request_init(r);
   
       if(!dispatcher && (SvTYPE(sv) == SVt_PV)) {
  -	char *imp = pstrdup(r->pool, (char *)SvPV(class,na));
  +	char *imp = pstrdup(r->pool, (char *)SvPV(pclass,na));
   
   	if((anon = strnEQ(imp,"sub ",4))) {
   	    sv = perl_eval_pv(imp, FALSE);
  @@ -1365,37 +1365,37 @@
   
   #ifdef PERL_METHOD_HANDLERS
   	{
  -	    char *end_class = NULL;
  +	    char *end_pclass = NULL;
   
  -	    if ((end_class = strstr(imp, "->"))) {
  -		end_class[0] = '\0';
  -		if(class)
  -		    SvREFCNT_dec(class);
  -		class = newSVpv(imp, 0);
  -		end_class[0] = ':';
  -		end_class[1] = ':';
  -		method = &end_class[2];
  +	    if ((end_pclass = strstr(imp, "->"))) {
  +		end_pclass[0] = '\0';
  +		if(pclass)
  +		    SvREFCNT_dec(pclass);
  +		pclass = newSVpv(imp, 0);
  +		end_pclass[0] = ':';
  +		end_pclass[1] = ':';
  +		method = &end_pclass[2];
   		imp = method;
   		++is_method;
   	    }
   	}
   
  -	if(*SvPVX(class) == '$') {
  -	    SV *obj = perl_eval_pv(SvPVX(class), TRUE);
  +	if(*SvPVX(pclass) == '$') {
  +	    SV *obj = perl_eval_pv(SvPVX(pclass), TRUE);
   	    if(SvROK(obj) && sv_isobject(obj)) {
   		MP_TRACE_h(fprintf(stderr, "handler object %s isa %s\n",
  -				   SvPVX(class),  HvNAME(SvSTASH((SV*)SvRV(obj)))));
  -		SvREFCNT_dec(class);
  -		class = obj;
  -		++SvREFCNT(class); /* this will _dec later */
  -		stash = SvSTASH((SV*)SvRV(class));
  +				   SvPVX(pclass),  HvNAME(SvSTASH((SV*)SvRV(obj)))));
  +		SvREFCNT_dec(pclass);
  +		pclass = obj;
  +		++SvREFCNT(pclass); /* this will _dec later */
  +		stash = SvSTASH((SV*)SvRV(pclass));
   	    }
   	}
   
  -	if(class && !stash) stash = gv_stashpv(SvPV(class,na),FALSE);
  +	if(pclass && !stash) stash = gv_stashpv(SvPV(pclass,na),FALSE);
   	   
   #if 0
  -	MP_TRACE_h(fprintf(stderr, "perl_call: class=`%s'\n", SvPV(class,na)));
  +	MP_TRACE_h(fprintf(stderr, "perl_call: pclass=`%s'\n", SvPV(pclass,na)));
   	MP_TRACE_h(fprintf(stderr, "perl_call: imp=`%s'\n", imp));
   	MP_TRACE_h(fprintf(stderr, "perl_call: method=`%s'\n", method));
   	MP_TRACE_h(fprintf(stderr, "perl_call: stash=`%s'\n", 
  @@ -1472,11 +1472,11 @@
       PUSHMARK(sp);
   #ifdef PERL_METHOD_HANDLERS
       if(is_method)
  -	XPUSHs(sv_2mortal(class));
  +	XPUSHs(sv_2mortal(pclass));
       else
  -	SvREFCNT_dec(class);
  +	SvREFCNT_dec(pclass);
   #else
  -    SvREFCNT_dec(class);
  +    SvREFCNT_dec(pclass);
   #endif
   
       XPUSHs((SV*)perl_bless_request_rec(r)); 
  
  
  
  1.78      +5 -5      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.77
  retrieving revision 1.78
  diff -u -r1.77 -r1.78
  --- mod_perl.h	1999/06/01 06:33:06	1.77
  +++ mod_perl.h	1999/06/04 17:50:47	1.78
  @@ -1022,13 +1022,13 @@
       int is_method;
       int is_anon;
       int in_perl;
  -    SV *class;
  +    SV *pclass;
       char *method;
   } mod_perl_handler;
   
   typedef struct {
       SV *obj;
  -    char *class;
  +    char *pclass;
   } mod_perl_perl_dir_config;
   
   typedef struct {
  @@ -1050,7 +1050,7 @@
   /* mod_perl.c */
   
   /* generic handler stuff */ 
  -int perl_handler_ismethod(HV *class, char *sub);
  +int perl_handler_ismethod(HV *pclass, char *sub);
   int perl_call_handler(SV *sv, request_rec *r, AV *args);
   request_rec *mp_fake_request_rec(server_rec *s, pool *p, char *hook);
   
  @@ -1105,7 +1105,7 @@
   SV *mod_perl_slurp_filename(request_rec *r);
   SV *mod_perl_tie_table(table *t);
   SV *perl_hvrv_magic_obj(SV *rv);
  -void perl_tie_hash(HV *hv, char *class, SV *sv);
  +void perl_tie_hash(HV *hv, char *pclass, SV *sv);
   void perl_util_cleanup(void);
   void mod_perl_clear_rgy_endav(request_rec *r, SV *sv);
   void perl_stash_rgy_endav(char *s, SV *rgystash);
  @@ -1223,7 +1223,7 @@
   pool *perl_get_util_pool(void);
   pool *perl_get_startup_pool(void);
   server_rec *perl_get_startup_server(void);
  -request_rec *sv2request_rec(SV *in, char *class, CV *cv);
  +request_rec *sv2request_rec(SV *in, char *pclass, CV *cv);
   
   /* PerlRunXS.xs */
   #define ApachePerlRun_name_with_virtualhost() \
  
  
  
  1.73      +12 -12    modperl/src/modules/perl/perl_config.c
  
  Index: perl_config.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/perl_config.c,v
  retrieving revision 1.72
  retrieving revision 1.73
  diff -u -r1.72 -r1.73
  --- perl_config.c	1999/06/01 06:33:06	1.72
  +++ perl_config.c	1999/06/04 17:50:47	1.73
  @@ -807,7 +807,7 @@
   }
   
   static SV *
  -perl_perl_create_cfg(SV **sv, HV *class, cmd_parms *parms, char *type)
  +perl_perl_create_cfg(SV **sv, HV *pclass, cmd_parms *parms, char *type)
   {
       GV *gv;
   
  @@ -815,13 +815,13 @@
   	return *sv;
   
       /* return $class->type if $class->can(type) */
  -    if((gv = gv_fetchmethod_autoload(class, type, FALSE)) && isGV(gv)) {
  +    if((gv = gv_fetchmethod_autoload(pclass, type, FALSE)) && isGV(gv)) {
   	int count;
   	dSP;
   
   	ENTER;SAVETMPS;
   	PUSHMARK(sp);
  -	XPUSHs(sv_2mortal(newSVpv(HvNAME(class),0)));
  +	XPUSHs(sv_2mortal(newSVpv(HvNAME(pclass),0)));
   	if(parms)
   	    XPUSHs(perl_bless_cmd_parms(parms));
   	PUTBACK;
  @@ -840,21 +840,21 @@
   	/* return bless {}, $class */
   	if(!SvTRUE(*sv)) {
   	    *sv = newRV_noinc((SV*)newHV());
  -	    return sv_bless(*sv, class);
  +	    return sv_bless(*sv, pclass);
   	}
   	else
   	    return *sv;
       }
   }
   
  -static SV *perl_perl_create_dir_config(SV **sv, HV *class, cmd_parms *parms)
  +static SV *perl_perl_create_dir_config(SV **sv, HV *pclass, cmd_parms *parms)
   {
  -    return perl_perl_create_cfg(sv, class, parms, PERL_DIR_CREATE);
  +    return perl_perl_create_cfg(sv, pclass, parms, PERL_DIR_CREATE);
   }
   
  -static SV *perl_perl_create_srv_config(SV **sv, HV *class, cmd_parms *parms)
  +static SV *perl_perl_create_srv_config(SV **sv, HV *pclass, cmd_parms *parms)
   {
  -    return perl_perl_create_cfg(sv, class, parms, PERL_SERVER_CREATE);
  +    return perl_perl_create_cfg(sv, pclass, parms, PERL_SERVER_CREATE);
   }
   
   static void *perl_perl_merge_cfg(pool *p, void *basev, void *addv, char *meth)
  @@ -894,14 +894,14 @@
   	    sv = POPs;
   	    ++SvREFCNT(sv);
   	    new->obj = sv;
  -	    new->class = SvCLASS(sv);
  +	    new->pclass = SvCLASS(sv);
   	}
   	PUTBACK;
   	FREETMPS;LEAVE;
       }
       else {
   	new->obj = newSVsv(basesv);
  -	new->class = basevp->class;
  +	new->pclass = basevp->pclass;
       }
       return (void *)new;
   }
  @@ -923,7 +923,7 @@
       if(cld->obj) {
   	MP_TRACE_c(fprintf(stderr, 
   			   "cmd_cleanup: SvREFCNT($%s::$obj) == %d\n",
  -			   cld->class, (int)SvREFCNT(cld->obj)));
  +			   cld->pclass, (int)SvREFCNT(cld->obj)));
   	SvREFCNT_dec(cld->obj);
       }
   }
  @@ -938,7 +938,7 @@
       CV *cv = perl_get_cv(subname, TRUE);
       SV *obj;
       bool has_empty_proto = (SvPOK(cv) && (SvLEN(cv) == 1));
  -    module *xsmod = perl_get_module_ptr(data->class, strlen(data->class));
  +    module *xsmod = perl_get_module_ptr(data->pclass, strlen(data->pclass));
       mod_perl_perl_dir_config *sdata = NULL;
       obj = perl_perl_create_dir_config(&data->obj, CvSTASH(cv), cmd);
   
  
  
  
  1.30      +4 -4      modperl/src/modules/perl/perl_util.c
  
  Index: perl_util.c
  ===================================================================
  RCS file: /export/home/cvs/modperl/src/modules/perl/perl_util.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- perl_util.c	1999/05/19 01:04:13	1.29
  +++ perl_util.c	1999/06/04 17:50:47	1.30
  @@ -112,7 +112,7 @@
       return mg ? (request_rec *)mg->mg_ptr : NULL;
   }
   
  -request_rec *sv2request_rec(SV *in, char *class, CV *cv)
  +request_rec *sv2request_rec(SV *in, char *pclass, CV *cv)
   {
       request_rec *r = NULL;
       SV *sv = Nullsv;
  @@ -135,7 +135,7 @@
   
       if(!sv) sv = in;
       if(SvROK(sv) && (SvTYPE(SvRV(sv)) == SVt_PVMG)) {
  -	if(sv_derived_from(sv, class)) {
  +	if(sv_derived_from(sv, pclass)) {
   	    if((r = r_magic_get(SvRV(sv)))) {
   		/* ~ magic */
   	    }
  @@ -254,7 +254,7 @@
   }
   
   
  -void perl_tie_hash(HV *hv, char *class, SV *sv)
  +void perl_tie_hash(HV *hv, char *pclass, SV *sv)
   {
       dSP;
       SV *obj, *varsv = (SV*)hv;
  @@ -263,7 +263,7 @@
       ENTER;
       SAVETMPS;
       PUSHMARK(sp);
  -    XPUSHs(sv_2mortal(newSVpv(class,0)));
  +    XPUSHs(sv_2mortal(newSVpv(pclass,0)));
       if(sv) XPUSHs(sv);
       PUTBACK;
       perl_call_method(methname, G_EVAL | G_SCALAR);
  
  
  

Mime
View raw message