randyk 2004/06/22 15:34:10
Modified: src/modules/perl modperl_common_includes.h
modperl_common_util.c modperl_common_util.h
modperl_types.h modperl_util.c modperl_util.h
Added: src/modules/perl modperl_common_types.h
Log:
Reviewed by: stas
move modperl_perl_sv_setref_uv and modperl_uri_new from
modperl_util.c to modperl_common_util.c, so that APR::OS
and APR::URI can be built without linking to mod_perl.so.
Revision Changes Path
1.2 +1 -0 modperl-2.0/src/modules/perl/modperl_common_includes.h
Index: modperl_common_includes.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_common_includes.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- modperl_common_includes.h 16 Jun 2004 03:55:47 -0000 1.1
+++ modperl_common_includes.h 22 Jun 2004 22:34:10 -0000 1.2
@@ -20,5 +20,6 @@
#include "modperl_apr_includes.h"
#include "modperl_perl_includes.h"
+#include "modperl_common_types.h"
#endif /* MODPERL_COMMON_INCLUDES_H */
1.2 +15 -0 modperl-2.0/src/modules/perl/modperl_common_util.c
Index: modperl_common_util.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_common_util.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- modperl_common_util.c 16 Jun 2004 03:55:47 -0000 1.1
+++ modperl_common_util.c 22 Jun 2004 22:34:10 -0000 1.2
@@ -79,3 +79,18 @@
GvNAME(gv), GvNAMELEN(gv), G_DISCARD);
return rv;
}
+
+/* XXX: sv_setref_uv does not exist in 5.6.x */
+MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
+ const char *classname, UV uv)
+{
+ sv_setuv(newSVrv(rv, classname), uv);
+ return rv;
+}
+
+MP_INLINE modperl_uri_t *modperl_uri_new(apr_pool_t *p)
+{
+ modperl_uri_t *uri = (modperl_uri_t *)apr_pcalloc(p, sizeof(*uri));
+ uri->pool = p;
+ return uri;
+}
1.2 +5 -0 modperl-2.0/src/modules/perl/modperl_common_util.h
Index: modperl_common_util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_common_util.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- modperl_common_util.h 16 Jun 2004 03:55:47 -0000 1.1
+++ modperl_common_util.h 22 Jun 2004 22:34:10 -0000 1.2
@@ -78,6 +78,11 @@
MP_INLINE void *modperl_hash_tied_object(pTHX_ const char *classname,
SV *tsv);
+MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
+ const char *classname, UV uv);
+
+MP_INLINE modperl_uri_t *modperl_uri_new(apr_pool_t *p);
+
SV *modperl_perl_gensym(pTHX_ char *pack);
#endif /* MODPERL_COMMON_UTIL_H */
1.75 +0 -7 modperl-2.0/src/modules/perl/modperl_types.h
Index: modperl_types.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- modperl_types.h 4 Mar 2004 06:01:07 -0000 1.74
+++ modperl_types.h 22 Jun 2004 22:34:10 -0000 1.75
@@ -260,13 +260,6 @@
void *data;
} modperl_cleanup_data_t;
-/* subclass apr_uri_t */
-typedef struct {
- apr_uri_t uri;
- apr_pool_t *pool;
- char *path_info;
-} modperl_uri_t;
-
typedef struct {
module *modp;
const char *cmd_data;
1.71 +0 -15 modperl-2.0/src/modules/perl/modperl_util.c
Index: modperl_util.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.c,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -r1.70 -r1.71
--- modperl_util.c 16 Jun 2004 03:55:47 -0000 1.70
+++ modperl_util.c 22 Jun 2004 22:34:10 -0000 1.71
@@ -179,14 +179,6 @@
return sv;
}
-/* XXX: sv_setref_uv does not exist in 5.6.x */
-MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
- const char *classname, UV uv)
-{
- sv_setuv(newSVrv(rv, classname), uv);
- return rv;
-}
-
static apr_pool_t *modperl_sv2pool(pTHX_ SV *obj, CV *method)
{
apr_pool_t *p = NULL;
@@ -373,13 +365,6 @@
cdata->pool = p;
cdata->data = data;
return cdata;
-}
-
-MP_INLINE modperl_uri_t *modperl_uri_new(apr_pool_t *p)
-{
- modperl_uri_t *uri = (modperl_uri_t *)apr_pcalloc(p, sizeof(*uri));
- uri->pool = p;
- return uri;
}
MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src)
1.63 +0 -5 modperl-2.0/src/modules/perl/modperl_util.h
Index: modperl_util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- modperl_util.h 16 Jun 2004 03:55:47 -0000 1.62
+++ modperl_util.h 22 Jun 2004 22:34:10 -0000 1.63
@@ -45,9 +45,6 @@
MP_INLINE SV *modperl_ptr2obj(pTHX_ char *classname, void *ptr);
-MP_INLINE SV *modperl_perl_sv_setref_uv(pTHX_ SV *rv,
- const char *classname, UV uv);
-
int modperl_errsv(pTHX_ int status, request_rec *r, server_rec *s);
int modperl_require_module(pTHX_ const char *pv, int logfailure);
@@ -60,8 +57,6 @@
void modperl_xs_dl_handles_close(void **handles);
modperl_cleanup_data_t *modperl_cleanup_data_new(apr_pool_t *p, void *data);
-
-MP_INLINE modperl_uri_t *modperl_uri_new(apr_pool_t *p);
MP_INLINE void modperl_perl_av_push_elts_ref(pTHX_ AV *dst, AV *src);
1.1 modperl-2.0/src/modules/perl/modperl_common_types.h
Index: modperl_common_types.h
===================================================================
/* Copyright 2000-2004 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef MODPERL_COMMON_TYPES_H
#define MODPERL_COMMON_TYPES_H
/* subclass apr_uri_t */
typedef struct {
apr_uri_t uri;
apr_pool_t *pool;
char *path_info;
} modperl_uri_t;
#endif /* MODPERL_COMMON_TYPES_H */