Where Online Learning is simpler!
The C and C++ Include Header Files
/usr/include/apache2/modperl_interp.h
$ cat -n /usr/include/apache2/modperl_interp.h 1 /* Licensed to the Apache Software Foundation (ASF) under one or more 2 * contributor license agreements. See the NOTICE file distributed with 3 * this work for additional information regarding copyright ownership. 4 * The ASF licenses this file to You under the Apache License, Version 2.0 5 * (the "License"); you may not use this file except in compliance with 6 * the License. You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef MODPERL_INTERP_H 18 #define MODPERL_INTERP_H 19 20 void modperl_interp_init(server_rec *s, apr_pool_t *p, 21 PerlInterpreter *perl); 22 23 apr_status_t modperl_interp_cleanup(void *data); 24 25 #ifdef USE_ITHREADS 26 27 modperl_interp_t *modperl_thx_interp_get(PerlInterpreter *thx); 28 void modperl_thx_interp_set(PerlInterpreter *thx, modperl_interp_t *interp); 29 30 void modperl_interp_clone_init(modperl_interp_t *interp); 31 32 modperl_interp_t *modperl_interp_new(modperl_interp_pool_t *mip, 33 PerlInterpreter *perl); 34 35 void modperl_interp_destroy(modperl_interp_t *interp); 36 37 modperl_interp_t *modperl_interp_get(server_rec *s); 38 39 apr_status_t modperl_interp_unselect(void *data); 40 41 modperl_interp_t *modperl_interp_pool_get(apr_pool_t *p); 42 43 void modperl_interp_pool_set(apr_pool_t *p, 44 modperl_interp_t *interp); 45 46 modperl_interp_t *modperl_interp_pool_select(apr_pool_t *p, 47 server_rec *s); 48 49 modperl_interp_t *modperl_interp_select(request_rec *r, conn_rec *c, 50 server_rec *s); 51 52 #define MP_dINTERP pTHX; modperl_interp_t *interp = NULL 53 54 #define MP_INTERPa(r, c, s) \ 55 MP_TRACE_i(MP_FUNC, "selecting interp: r=%pp, c=%pp, s=%pp", \ 56 (r), (c), (s)); \ 57 interp = modperl_interp_select((r), (c), (s)); \ 58 if (interp) { \ 59 MP_TRACE_i(MP_FUNC, " --> got (0x%pp)->refcnt=%d, perl=%pp", \ 60 interp, interp->refcnt, interp->perl); \ 61 aTHX = interp->perl; \ 62 } \ 63 else { \ 64 aTHX = NULL; \ 65 MP_TRACE_i(MP_FUNC, " --> failed"); \ 66 } \ 67 NOOP 68 69 #define MP_dINTERPa(r, c, s) \ 70 MP_dINTERP; \ 71 MP_INTERPa((r), (c), (s)) 72 73 #define MP_INTERP_POOLa(p, s) \ 74 MP_TRACE_i(MP_FUNC, "selecting interp: p=%pp, s=%pp", (p), (s)); \ 75 interp = modperl_interp_pool_select((p), (s)); \ 76 if (interp) { \ 77 MP_TRACE_i(MP_FUNC, " --> got (0x%pp)->refcnt=%d", \ 78 interp, interp->refcnt); \ 79 aTHX = interp->perl; \ 80 } \ 81 else { \ 82 aTHX = NULL; \ 83 MP_TRACE_i(MP_FUNC, " --> failed"); \ 84 } \ 85 NOOP 86 87 #define MP_dINTERP_POOLa(p, s) \ 88 MP_dINTERP; \ 89 MP_INTERP_POOLa((p), (s)) 90 91 #ifdef MP_DEBUG 92 #define MP_INTERP_PUTBACK(interp, thx) \ 93 MP_TRACE_i(MP_FUNC, "unselecting interp: (0x%pp)->refcnt=%ld", \ 94 (interp), (interp)->refcnt); \ 95 modperl_interp_unselect(interp); \ 96 interp = NULL; \ 97 if( thx ) thx = NULL 98 #else /* MP_DEBUG */ 99 #define MP_INTERP_PUTBACK(interp, thx) \ 100 modperl_interp_unselect(interp) 101 #endif 102 103 #define MP_INTERP_REFCNT_inc(interp) (interp)->refcnt++ 104 105 #define MP_INTERP_REFCNT_dec(interp) MP_INTERP_PUTBACK(interp, NULL) 106 107 #define MP_HAS_INTERP(interp) (interp != NULL) 108 109 #define MP_aTHX aTHX 110 111 apr_status_t modperl_interp_pool_destroy(void *data); 112 113 typedef apr_status_t (*modperl_interp_mip_walker_t)(pTHX_ 114 modperl_interp_pool_t *mip, 115 void *data); 116 117 void modperl_interp_mip_walk(PerlInterpreter *current_perl, 118 PerlInterpreter *parent_perl, 119 modperl_interp_pool_t *mip, 120 modperl_interp_mip_walker_t walker, 121 void *data); 122 123 void modperl_interp_mip_walk_servers(PerlInterpreter *current_perl, 124 server_rec *base_server, 125 modperl_interp_mip_walker_t walker, 126 void *data); 127 #else 128 129 #define MP_dINTERP dNOOP 130 131 #define MP_INTERPa(r, c, s) NOOP 132 133 #define MP_dINTERPa(r, c, s) NOOP 134 135 #define MP_INTERP_POOLa(p, s) NOOP 136 137 #define MP_dINTERP_POOLa(p, s) NOOP 138 139 #define MP_INTERP_PUTBACK(interp, thx) NOOP 140 141 #define MP_INTERP_REFCNT_inc(interp) NOOP 142 143 #define MP_INTERP_REFCNT_dec(interp) NOOP 144 145 #define MP_HAS_INTERP(interp) (1) 146 147 #define MP_aTHX 0 148 149 #endif /* USE_ITHREADS */ 150 151 #endif /* MODPERL_INTERP_H */ 152 153 /* 154 * Local Variables: 155 * c-basic-offset: 4 156 * indent-tabs-mode: nil 157 * End: 158 */
Contact us
|
About us
|
Term of use
|
Copyright © 2000-2025 MyWebUniversity.com ™