stas 2004/02/16 12:35:55
Modified: . CHANGES
glue/perl/xsbuilder apreq_xs_postperl.h
Added: glue/perl/xsbuilder apreq_xs_preperl.h
Log:
Add a proper support for ithreads
Revision Changes Path
1.25 +4 -0 httpd-apreq-2/CHANGES
Index: CHANGES
===================================================================
RCS file: /home/cvs/httpd-apreq-2/CHANGES,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -u -r1.24 -r1.25
--- CHANGES 31 Dec 2003 16:05:00 -0000 1.24
+++ CHANGES 16 Feb 2004 20:35:55 -0000 1.25
@@ -4,6 +4,10 @@
@section v2_03_dev Changes with libapreq2-2.03-dev
+- February 16, 2004 - Perl API [stas]
+
+Add a proper support for ithreads
+
- December 31, 2003 - C API [Swen Schillig, joes]
Fixed bug in calculation of Netscape cookie expiration dates.
1.21 +8 -7 httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h
Index: apreq_xs_postperl.h
===================================================================
RCS file: /home/cvs/httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_postperl.h,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -u -r1.20 -r1.21
--- apreq_xs_postperl.h 9 Feb 2004 21:58:37 -0000 1.20
+++ apreq_xs_postperl.h 16 Feb 2004 20:35:55 -0000 1.21
@@ -74,7 +74,7 @@
* @return The object, if found; otherwise NULL.
*/
APR_INLINE
-static SV *apreq_xs_find_obj(SV *in, const char *key)
+static SV *apreq_xs_find_obj(pTHX_ SV *in, const char *key)
{
const char altkey[] = { '_', key[0] };
@@ -112,9 +112,9 @@
* and produces a pointer to the object's C analog.
*/
APR_INLINE
-static void *apreq_xs_perl2c(SV* in, const char *name)
+static void *apreq_xs_perl2c(pTHX_ SV* in, const char *name)
{
- SV *sv = apreq_xs_find_obj(in, name);
+ SV *sv = apreq_xs_find_obj(aTHX_ in, name);
if (sv == NULL)
return NULL;
else
@@ -126,7 +126,7 @@
* and produces a pointer to the underlying C environment.
*/
APR_INLINE
-static void *apreq_xs_perl2env(SV *sv)
+static void *apreq_xs_perl2env(pTHX_ SV *sv)
{
MAGIC *mg;
if (sv != NULL && (mg = mg_find(sv, PERL_MAGIC_ext)))
@@ -174,8 +174,9 @@
#define apreq_xs_2sv(t,class) apreq_xs_c2perl(aTHX_ t, env, class)
-#define apreq_xs_sv2(type,sv)((apreq_##type##_t *)apreq_xs_perl2c(sv, #type))
-#define apreq_xs_sv2env(sv) apreq_xs_perl2env(sv)
+#define apreq_xs_sv2(type,sv)((apreq_##type##_t *)apreq_xs_perl2c(aTHX_ sv, \
+ #type))
+#define apreq_xs_sv2env(sv) apreq_xs_perl2env(aTHX_ sv)
/** Converts apreq_env to a Perl package, which forms the
* base class for Apache::Request and Apache::Cookie::Jar objects.
@@ -199,7 +200,7 @@
XSRETURN(0); \
\
if (SvROK(ST(0))) { \
- SV *sv = apreq_xs_find_obj(ST(0), #type); \
+ SV *sv = apreq_xs_find_obj(aTHX_ ST(0), #type); \
void *env = apreq_xs_sv2env(sv); \
\
if (env) \
1.1 httpd-apreq-2/glue/perl/xsbuilder/apreq_xs_preperl.h
Index: apreq_xs_preperl.h
===================================================================
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2003 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
#ifndef APREQ_XS_PREPERL_H
#define APREQ_XS_PREPERL_H
#define PERL_NO_GET_CONTEXT /* we want efficiency under ithreads */
/**
* @file apreq_xs_preperl.h
* @brief XS include file for making Cookie.so and Request.so, for things
* that has to be included before EXTERN.h/perl.h/XSUB.h headers
*
*/
/**
* @defgroup XS Perl
* @ingroup GLUE
* @{
*/
/** @} */
#endif /* APREQ_XS_PREPERL_H */