stas 2004/01/22 15:25:54
Modified: t/conf modperl_extra.pl
xs/Apache/RequestUtil Apache__RequestUtil.h
xs/Apache/ServerUtil Apache__ServerUtil.h
xs/maps modperl_functions.map
xs/tables/current/ModPerl FunctionTable.pm
. Changes
Log:
($r|$s)->add_config() now die if failed (previously returned the error)
Revision Changes Path
1.39 +1 -2 modperl-2.0/t/conf/modperl_extra.pl
Index: modperl_extra.pl
===================================================================
RCS file: /home/cvs/modperl-2.0/t/conf/modperl_extra.pl,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -u -r1.38 -r1.39
--- modperl_extra.pl 20 Jan 2004 01:26:34 -0000 1.38
+++ modperl_extra.pl 22 Jan 2004 23:25:54 -0000 1.39
@@ -179,8 +179,7 @@
my $r = shift;
#test adding config at request time
- my $errmsg = $r->add_config(['require valid-user']);
- die $errmsg if $errmsg;
+ $r->add_config(['require valid-user']);
Apache::OK;
}
1.20 +10 -0 modperl-2.0/xs/Apache/RequestUtil/Apache__RequestUtil.h
Index: Apache__RequestUtil.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/Apache/RequestUtil/Apache__RequestUtil.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -u -r1.19 -r1.20
--- Apache__RequestUtil.h 10 Jan 2004 02:52:20 -0000 1.19
+++ Apache__RequestUtil.h 22 Jan 2004 23:25:54 -0000 1.20
@@ -255,3 +255,13 @@
return modperl_config_is_perl_option_enabled(aTHX_ r, r->server, name);
}
+static MP_INLINE
+void mpxs_Apache__RequestRec_add_config(pTHX_ request_rec *r, SV *lines, char
*path, int override)
+{
+ const char *errmsg = modperl_config_insert_request(aTHX_ r, lines,
+ path, override);
+ if (errmsg) {
+ Perl_croak(aTHX_ "\$r->add_config() has failed: %s", errmsg);
+ }
+}
+
1.15 +10 -0 modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h
Index: Apache__ServerUtil.h
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/Apache/ServerUtil/Apache__ServerUtil.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -u -r1.14 -r1.15
--- Apache__ServerUtil.h 19 Jan 2004 19:59:58 -0000 1.14
+++ Apache__ServerUtil.h 22 Jan 2004 23:25:54 -0000 1.15
@@ -52,6 +52,16 @@
return modperl_config_is_perl_option_enabled(aTHX_ NULL, s, name);
}
+
+static MP_INLINE
+void mpxs_Apache__Server_add_config(pTHX_ server_rec *s, SV *lines)
+{
+ const char *errmsg = modperl_config_insert_server(aTHX_ s, lines);
+ if (errmsg) {
+ Perl_croak(aTHX_ "\$s->add_config() has failed: %s", errmsg);
+ }
+}
+
static void mpxs_Apache__ServerUtil_BOOT(pTHX)
{
newCONSTSUB(PL_defstash, "Apache::Server::server_root",
1.68 +2 -3 modperl-2.0/xs/maps/modperl_functions.map
Index: modperl_functions.map
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/maps/modperl_functions.map,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -u -r1.67 -r1.68
--- modperl_functions.map 19 Jan 2004 19:59:58 -0000 1.67
+++ modperl_functions.map 22 Jan 2004 23:25:54 -0000 1.68
@@ -26,8 +26,7 @@
mpxs_Apache__RequestRec_location
mpxs_Apache__RequestRec_as_string
mpxs_Apache__RequestRec_pnotes | | r, key=Nullsv, val=Nullsv
- modperl_config_insert_request | | \
- r, lines, path=r->filename, override=OR_AUTHCFG | add_config
+ mpxs_Apache__RequestRec_add_config | | r, lines, path=r->filename,
override=OR_AUTHCFG
#protocol module helpers
mpxs_Apache__RequestRec_location_merge
@@ -70,7 +69,7 @@
mpxs_Apache__Server_set_handlers
mpxs_Apache__Server_get_handlers
mpxs_Apache__Server_is_perl_option_enabled
- modperl_config_insert_server | | | add_config
+ mpxs_Apache__Server_add_config
PACKAGE=Apache::Server
SV *:DEFINE_dir_config | | server_rec *:s, char *:key=NULL, SV *:sv_val=Nullsv
1.138 +20 -2 modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
Index: FunctionTable.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
retrieving revision 1.137
retrieving revision 1.138
diff -u -u -r1.137 -r1.138
--- FunctionTable.pm 21 Jan 2004 09:09:41 -0000 1.137
+++ FunctionTable.pm 22 Jan 2004 23:25:54 -0000 1.138
@@ -5506,9 +5506,9 @@
'name' => 'type'
}
]
- },
+ },
{
- 'return_type' => 'const char *',
+ 'return_type' => 'void',
'name' => 'mpxs_Apache__RequestRec_add_config',
'args' => [
{
@@ -5531,6 +5531,24 @@
'type' => 'int',
'name' => 'override'
}
+ ]
+ },
+ {
+ 'return_type' => 'void',
+ 'name' => 'mpxs_Apache__Server_add_config',
+ 'args' => [
+ {
+ 'type' => 'PerlInterpreter *',
+ 'name' => 'my_perl'
+ },
+ {
+ 'type' => 'server_rec *',
+ 'name' => 's'
+ },
+ {
+ 'type' => 'SV *',
+ 'name' => 'lines'
+ },
]
},
{
1.308 +3 -0 modperl-2.0/Changes
Index: Changes
===================================================================
RCS file: /home/cvs/modperl-2.0/Changes,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -u -r1.307 -r1.308
--- Changes 22 Jan 2004 21:55:50 -0000 1.307
+++ Changes 22 Jan 2004 23:25:54 -0000 1.308
@@ -12,6 +12,9 @@
=item 1.99_13-dev
+($r|$s)->add_config() now die if failed (previously returned the
+error) [Stas]
+
fix context problems in <perl> sections and
PerlModule/PerlLoadModule/PerlRequre under threaded mpms w/
PerlOptions +Parent/+Clone in Vhosts + TestVhost::config test. [Stas]