This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove full stop in the 'try' feature heading
[perl5.git] / pad.h
1 /*    pad.h
2  *
3  *    Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008,
4  *    2009, 2010, 2011 by Larry Wall and others
5  *
6  *    You may distribute under the terms of either the GNU General Public
7  *    License or the Artistic License, as specified in the README file.
8  *
9  * This file defines the types and macros associated with the API for
10  * manipulating scratchpads, which are used by perl to store lexical
11  * variables, op targets and constants.
12  */
13
14 /* offsets within a pad */
15
16 typedef SSize_t PADOFFSET; /* signed so that -1 is a valid value */
17 #define NOT_IN_PAD ((PADOFFSET) -1)
18
19 /* B.xs expects the first members of these two structs to line up
20    (xpadl_max with xpadnl_fill).
21  */
22
23 struct padlist {
24     SSize_t     xpadl_max;      /* max index for which array has space */
25     union {
26         PAD **  xpadlarr_alloc; /* Pointer to beginning of array of AVs.
27                                    Note that a 'padnamelist *' is stored
28                                    in the 0 index of the AV. */
29         struct {
30             PADNAMELIST * padnl;
31             PAD * pad_1;        /* this slice of PAD * array always alloced */
32             PAD * pad_2;        /* maybe unalloced */
33         } * xpadlarr_dbg;       /* for use with a C debugger only */
34     } xpadl_arr;
35     U32         xpadl_id;       /* Semi-unique ID, shared between clones */
36     U32         xpadl_outid;    /* ID of outer pad */
37 };
38
39 struct padnamelist {
40     SSize_t     xpadnl_fill;    /* max index in use */
41     PADNAME **  xpadnl_alloc;   /* pointer to beginning of array */
42     SSize_t     xpadnl_max;     /* max index for which array has space */
43     PADOFFSET   xpadnl_max_named; /* highest index with len > 0 */
44     U32         xpadnl_refcnt;
45 };
46
47 /* PERL_PADNAME_MINIMAL uses less memory, but on some platforms
48    PERL_PADNAME_ALIGNED may be faster, so platform-specific hints can
49    define one or the other.  */
50 #if defined(PERL_PADNAME_MINIMAL) && defined (PERL_PADNAME_ALIGNED)
51 #  error PERL_PADNAME_MINIMAL and PERL_PADNAME_ALIGNED are exclusive
52 #endif
53
54 #if !defined(PERL_PADNAME_MINIMAL) && !defined(PERL_PADNAME_ALIGNED)
55 #  define PERL_PADNAME_MINIMAL
56 #endif
57
58 #define _PADNAME_BASE \
59     char *      xpadn_pv;               \
60     HV *        xpadn_ourstash;         \
61     union {                             \
62         HV *    xpadn_typestash;        \
63         CV *    xpadn_protocv;          \
64     } xpadn_type_u;                     \
65     U32         xpadn_low;              \
66     U32         xpadn_high;             \
67     U32         xpadn_refcnt;           \
68     int         xpadn_gen;              \
69     U8          xpadn_len;              \
70     U8          xpadn_flags
71
72 struct padname {
73     _PADNAME_BASE;
74 };
75
76 struct padname_with_str {
77 #ifdef PERL_PADNAME_MINIMAL
78     _PADNAME_BASE;
79 #else
80     struct padname      xpadn_padname;
81 #endif
82     char                xpadn_str[1];
83 };
84
85 #undef _PADNAME_BASE
86
87 #define PADNAME_FROM_PV(s) \
88     ((PADNAME *)((s) - STRUCT_OFFSET(struct padname_with_str, xpadn_str)))
89
90
91 /* a value that PL_cop_seqmax is guaranteed never to be,
92  * flagging that a lexical is being introduced, or has not yet left scope
93  */
94 #define PERL_PADSEQ_INTRO  U32_MAX
95 #define COP_SEQMAX_INC \
96         (PL_cop_seqmax++, \
97          (void)(PL_cop_seqmax == PERL_PADSEQ_INTRO && PL_cop_seqmax++))
98
99
100 /* B.xs needs these for the benefit of B::Deparse */
101 /* Low range end is exclusive (valid from the cop seq after this one) */
102 /* High range end is inclusive (valid up to this cop seq) */
103
104 #define COP_SEQ_RANGE_LOW(pn)           (pn)->xpadn_low
105 #define COP_SEQ_RANGE_HIGH(pn)          (pn)->xpadn_high
106 #define PARENT_PAD_INDEX(pn)            (pn)->xpadn_low
107 #define PARENT_FAKELEX_FLAGS(pn)        (pn)->xpadn_high
108
109 /* Flags set in the SvIVX field of FAKE namesvs */
110
111 #define PAD_FAKELEX_ANON   1 /* the lex is declared in an ANON, or ... */
112 #define PAD_FAKELEX_MULTI  2 /* the lex can be instantiated multiple times */
113
114 /* flags for the pad_new() function */
115
116 #define padnew_CLONE    1       /* this pad is for a cloned CV */
117 #define padnew_SAVE     2       /* save old globals */
118 #define padnew_SAVESUB  4       /* also save extra stuff for start of sub */
119
120 /* values for the pad_tidy() function */
121
122 typedef enum {
123         padtidy_SUB,            /* tidy up a pad for a sub, */
124         padtidy_SUBCLONE,       /* a cloned sub, */
125         padtidy_FORMAT          /* or a format */
126 } padtidy_type;
127
128 /* flags for pad_add_name_pvn. */
129
130 #define padadd_OUR              0x01       /* our declaration. */
131 #define padadd_STATE            0x02       /* state declaration. */
132 #define padadd_NO_DUP_CHECK     0x04       /* skip warning on dups. */
133 #define padadd_STALEOK          0x08       /* allow stale lexical in active
134                                             * sub, but only one level up */
135
136 /* ASSERT_CURPAD_LEGAL and ASSERT_CURPAD_ACTIVE respectively determine
137  * whether PL_comppad and PL_curpad are consistent and whether they have
138  * active values */
139
140 #  define pad_peg(label)
141
142 #ifdef DEBUGGING
143 #  define ASSERT_CURPAD_LEGAL(label) \
144     pad_peg(label); \
145     if (PL_comppad ? (AvARRAY(PL_comppad) != PL_curpad) : (PL_curpad != 0))  \
146         Perl_croak(aTHX_ "panic: illegal pad in %s: 0x%" UVxf "[0x%" UVxf "]",\
147             label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));
148
149
150 #  define ASSERT_CURPAD_ACTIVE(label) \
151     pad_peg(label); \
152     if (!PL_comppad || (AvARRAY(PL_comppad) != PL_curpad))                \
153         Perl_croak(aTHX_ "panic: invalid pad in %s: 0x%" UVxf "[0x%" UVxf "]",\
154             label, PTR2UV(PL_comppad), PTR2UV(PL_curpad));
155 #else
156 #  define ASSERT_CURPAD_LEGAL(label)
157 #  define ASSERT_CURPAD_ACTIVE(label)
158 #endif
159
160
161
162 /* Note: the following three macros are actually defined in scope.h, but
163  * they are documented here for completeness, since they directly or
164  * indirectly affect pads.
165
166 =for apidoc m|void|SAVEPADSV    |PADOFFSET po
167 Save a pad slot (used to restore after an iteration)
168
169 =cut
170
171 XXX DAPM it would make more sense to make the arg a PADOFFSET
172
173 =for apidoc m|void|SAVECLEARSV  |SV **svp
174 Clear the pointed to pad value on scope exit.  (i.e. the runtime action of
175 C<my>)
176
177 =for apidoc m|void|SAVECOMPPAD
178 save C<PL_comppad> and C<PL_curpad>
179
180
181 =for apidoc Amx|PAD **|PadlistARRAY|PADLIST * padlist
182 The C array of a padlist, containing the pads.  Only subscript it with
183 numbers >= 1, as the 0th entry is not guaranteed to remain usable.
184
185 =for apidoc Amx|SSize_t|PadlistMAX|PADLIST * padlist
186 The index of the last allocated space in the padlist.  Note that the last
187 pad may be in an earlier slot.  Any entries following it will be C<NULL> in
188 that case.
189
190 =for apidoc Amx|PADNAMELIST *|PadlistNAMES|PADLIST * padlist
191 The names associated with pad entries.
192
193 =for apidoc Amx|PADNAME **|PadlistNAMESARRAY|PADLIST * padlist
194 The C array of pad names.
195
196 =for apidoc Amx|SSize_t|PadlistNAMESMAX|PADLIST * padlist
197 The index of the last pad name.
198
199 =for apidoc Amx|U32|PadlistREFCNT|PADLIST * padlist
200 The reference count of the padlist.  Currently this is always 1.
201
202 =for apidoc Amx|PADNAME **|PadnamelistARRAY|PADNAMELIST * pnl
203 The C array of pad names.
204
205 =for apidoc Amx|SSize_t|PadnamelistMAX|PADNAMELIST * pnl
206 The index of the last pad name.
207
208 =for apidoc Amx|SSize_t|PadnamelistREFCNT|PADNAMELIST * pnl
209 The reference count of the pad name list.
210
211 =for apidoc Amx|void|PadnamelistREFCNT_dec|PADNAMELIST * pnl
212 Lowers the reference count of the pad name list.
213
214 =for apidoc Amx|SV **|PadARRAY|PAD * pad
215 The C array of pad entries.
216
217 =for apidoc Amx|SSize_t|PadMAX|PAD * pad
218 The index of the last pad entry.
219
220 =for apidoc Amx|char *|PadnamePV|PADNAME * pn
221 The name stored in the pad name struct.  This returns C<NULL> for a target
222 slot.
223
224 =for apidoc Amx|STRLEN|PadnameLEN|PADNAME * pn
225 The length of the name.
226
227 =for apidoc Amx|bool|PadnameUTF8|PADNAME * pn
228 Whether PadnamePV is in UTF-8.  Currently, this is always true.
229
230 =for apidoc Amx|SV *|PadnameSV|PADNAME * pn
231 Returns the pad name as a mortal SV.
232
233 =for apidoc m|bool|PadnameIsOUR|PADNAME * pn
234 Whether this is an "our" variable.
235
236 =for apidoc m|HV *|PadnameOURSTASH|PADNAME * pn
237 The stash in which this "our" variable was declared.
238
239 =for apidoc m|bool|PadnameOUTER|PADNAME * pn
240 Whether this entry belongs to an outer pad.  Entries for which this is true
241 are often referred to as 'fake'.
242
243 =for apidoc m|bool|PadnameIsSTATE|PADNAME * pn
244 Whether this is a "state" variable.
245
246 =for apidoc m|HV *|PadnameTYPE|PADNAME * pn
247 The stash associated with a typed lexical.  This returns the C<%Foo::> hash
248 for C<my Foo $bar>.
249
250 =for apidoc Amx|SSize_t|PadnameREFCNT|PADNAME * pn
251 The reference count of the pad name.
252
253 =for apidoc Amx|PADNAME *|PadnameREFCNT_inc|PADNAME * pn
254 Increases the reference count of the pad name.  Returns the pad name itself.
255
256 =for apidoc Amx|void|PadnameREFCNT_dec|PADNAME * pn
257 Lowers the reference count of the pad name.
258
259
260 =for apidoc m|SV *|PAD_SETSV    |PADOFFSET po|SV* sv
261 Set the slot at offset C<po> in the current pad to C<sv>
262
263 =for apidoc m|SV *|PAD_SV       |PADOFFSET po
264 Get the value at offset C<po> in the current pad
265
266 =for apidoc m|SV *|PAD_SVl      |PADOFFSET po
267 Lightweight and lvalue version of C<PAD_SV>.
268 Get or set the value at offset C<po> in the current pad.
269 Unlike C<PAD_SV>, does not print diagnostics with -DX.
270 For internal use only.
271
272 =for apidoc m|SV *|PAD_BASE_SV  |PADLIST padlist|PADOFFSET po
273 Get the value from slot C<po> in the base (DEPTH=1) pad of a padlist
274
275 =for apidoc m|void|PAD_SET_CUR  |PADLIST padlist|I32 n
276 Set the current pad to be pad C<n> in the padlist, saving
277 the previous current pad.  NB currently this macro expands to a string too
278 long for some compilers, so it's best to replace it with
279
280     SAVECOMPPAD();
281     PAD_SET_CUR_NOSAVE(padlist,n);
282
283
284 =for apidoc m|void|PAD_SET_CUR_NOSAVE   |PADLIST padlist|I32 n
285 like PAD_SET_CUR, but without the save
286
287 =for apidoc m|void|PAD_SAVE_SETNULLPAD
288 Save the current pad then set it to null.
289
290 =for apidoc m|void|PAD_SAVE_LOCAL|PAD *opad|PAD *npad
291 Save the current pad to the local variable C<opad>, then make the
292 current pad equal to C<npad>
293
294 =for apidoc m|void|PAD_RESTORE_LOCAL|PAD *opad
295 Restore the old pad saved into the local variable C<opad> by C<PAD_SAVE_LOCAL()>
296
297 =cut
298 */
299
300 #define PadlistARRAY(pl)        (pl)->xpadl_arr.xpadlarr_alloc
301 #define PadlistMAX(pl)          (pl)->xpadl_max
302 #define PadlistNAMES(pl)        *((PADNAMELIST **)PadlistARRAY(pl))
303 #define PadlistNAMESARRAY(pl)   PadnamelistARRAY(PadlistNAMES(pl))
304 #define PadlistNAMESMAX(pl)     PadnamelistMAX(PadlistNAMES(pl))
305 #define PadlistREFCNT(pl)       1       /* reserved for future use */
306
307 #define PadnamelistARRAY(pnl)           (pnl)->xpadnl_alloc
308 #define PadnamelistMAX(pnl)             (pnl)->xpadnl_fill
309 #define PadnamelistMAXNAMED(pnl)        (pnl)->xpadnl_max_named
310 #define PadnamelistREFCNT(pnl)          (pnl)->xpadnl_refcnt
311 #define PadnamelistREFCNT_dec(pnl)      Perl_padnamelist_free(aTHX_ pnl)
312
313 #define PadARRAY(pad)           AvARRAY(pad)
314 #define PadMAX(pad)             AvFILLp(pad)
315
316 #define PadnamePV(pn)           (pn)->xpadn_pv
317 #define PadnameLEN(pn)          (pn)->xpadn_len
318 #define PadnameUTF8(pn)         1
319 #define PadnameSV(pn) \
320         newSVpvn_flags(PadnamePV(pn), PadnameLEN(pn), SVs_TEMP|SVf_UTF8)
321 #define PadnameFLAGS(pn)        (pn)->xpadn_flags
322 #define PadnameIsOUR(pn)        cBOOL((pn)->xpadn_ourstash)
323 #define PadnameOURSTASH(pn)     (pn)->xpadn_ourstash
324 #define PadnameTYPE(pn)         (pn)->xpadn_type_u.xpadn_typestash
325 #define PadnameHasTYPE(pn)      cBOOL(PadnameTYPE(pn))
326 #define PadnamePROTOCV(pn)      (pn)->xpadn_type_u.xpadn_protocv
327 #define PadnameREFCNT(pn)       (pn)->xpadn_refcnt
328 #define PadnameREFCNT_inc(pn)   Perl_padname_refcnt_inc(pn)
329 #define PadnameREFCNT_dec(pn)   Perl_padname_free(aTHX_ pn)
330 #define PadnameOURSTASH_set(pn,s) (PadnameOURSTASH(pn) = (s))
331 #define PadnameTYPE_set(pn,s)     (PadnameTYPE(pn) = (s))
332 #define PadnameOUTER(pn)        (PadnameFLAGS(pn) & PADNAMEf_OUTER)
333 #define PadnameIsSTATE(pn)      (PadnameFLAGS(pn) & PADNAMEf_STATE)
334 #define PadnameLVALUE(pn)       (PadnameFLAGS(pn) & PADNAMEf_LVALUE)
335
336 #define PadnameLVALUE_on(pn)    (PadnameFLAGS(pn) |= PADNAMEf_LVALUE)
337 #define PadnameIsSTATE_on(pn)   (PadnameFLAGS(pn) |= PADNAMEf_STATE)
338
339 #define PADNAMEf_OUTER  0x01    /* outer lexical var */
340 #define PADNAMEf_STATE  0x02    /* state var */
341 #define PADNAMEf_LVALUE 0x04    /* used as lvalue */
342 #define PADNAMEf_TYPED  0x08    /* for B; unused by core */
343 #define PADNAMEf_OUR    0x10    /* for B; unused by core */
344
345 /* backward compatibility */
346 #ifndef PERL_CORE
347 #  define SvPAD_STATE           PadnameIsSTATE
348 #  define SvPAD_TYPED           PadnameHasTYPE
349 #  define SvPAD_OUR(pn)         cBOOL(PadnameOURSTASH(pn))
350 #  define SvPAD_STATE_on        PadnameIsSTATE_on
351 #  define SvPAD_TYPED_on(pn)    (PadnameFLAGS(pn) |= PADNAMEf_TYPED)
352 #  define SvPAD_OUR_on(pn)      (PadnameFLAGS(pn) |= PADNAMEf_OUR)
353 #  define SvOURSTASH            PadnameOURSTASH
354 #  define SvOURSTASH_set        PadnameOURSTASH_set
355 #  define SVpad_STATE           PADNAMEf_STATE
356 #  define SVpad_TYPED           PADNAMEf_TYPED
357 #  define SVpad_OUR             PADNAMEf_OUR
358 #  define PADNAMEt_OUTER        PADNAMEf_OUTER
359 #  define PADNAMEt_STATE        PADNAMEf_STATE
360 #  define PADNAMEt_LVALUE       PADNAMEf_LVALUE
361 #  define PADNAMEt_TYPED        PADNAMEf_TYPED
362 #  define PADNAMEt_OUR          PADNAMEf_OUR
363 #endif
364
365 #ifdef DEBUGGING
366 #  define PAD_SV(po)       pad_sv(po)
367 #  define PAD_SETSV(po,sv) pad_setsv(po,sv)
368 #else
369 #  define PAD_SV(po)       (PL_curpad[po])
370 #  define PAD_SETSV(po,sv) PL_curpad[po] = (sv)
371 #endif
372
373 #define PAD_SVl(po)       (PL_curpad[po])
374
375 #define PAD_BASE_SV(padlist, po) \
376         (PadlistARRAY(padlist)[1])                                      \
377             ? AvARRAY(MUTABLE_AV((PadlistARRAY(padlist)[1])))[po] \
378             : NULL;
379
380
381 #define PAD_SET_CUR_NOSAVE(padlist,nth) \
382         PL_comppad = (PAD*) (PadlistARRAY(padlist)[nth]);       \
383         PL_curpad = AvARRAY(PL_comppad);                        \
384         DEBUG_Xv(PerlIO_printf(Perl_debug_log,                  \
385               "Pad 0x%" UVxf "[0x%" UVxf "] set_cur    depth=%d\n",     \
386               PTR2UV(PL_comppad), PTR2UV(PL_curpad), (int)(nth)));
387
388
389 #define PAD_SET_CUR(padlist,nth) \
390         SAVECOMPPAD();                                          \
391         PAD_SET_CUR_NOSAVE(padlist,nth);
392
393
394 #define PAD_SAVE_SETNULLPAD()   SAVECOMPPAD(); \
395         PL_comppad = NULL; PL_curpad = NULL;    \
396         DEBUG_Xv(PerlIO_printf(Perl_debug_log, "Pad set_null\n"));
397
398 #define PAD_SAVE_LOCAL(opad,npad) \
399         opad = PL_comppad;                                      \
400         PL_comppad = (npad);                                    \
401         PL_curpad =  PL_comppad ? AvARRAY(PL_comppad) : NULL;   \
402         DEBUG_Xv(PerlIO_printf(Perl_debug_log,                  \
403               "Pad 0x%" UVxf "[0x%" UVxf "] save_local\n",              \
404               PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
405
406 #define PAD_RESTORE_LOCAL(opad) \
407         assert(!opad || !SvIS_FREED(opad));                                     \
408         PL_comppad = opad;                                              \
409         PL_curpad =  PL_comppad ? AvARRAY(PL_comppad) : NULL;   \
410         DEBUG_Xv(PerlIO_printf(Perl_debug_log,                  \
411               "Pad 0x%" UVxf "[0x%" UVxf "] restore_local\n",   \
412               PTR2UV(PL_comppad), PTR2UV(PL_curpad)));
413
414
415 /*
416 =for apidoc m|void|CX_CURPAD_SAVE|struct context
417 Save the current pad in the given context block structure.
418
419 =for apidoc m|SV *|CX_CURPAD_SV|struct context|PADOFFSET po
420 Access the SV at offset C<po> in the saved current pad in the given
421 context block structure (can be used as an lvalue).
422
423 =cut
424 */
425
426 #define CX_CURPAD_SAVE(block)  (block).oldcomppad = PL_comppad
427 #define CX_CURPAD_SV(block,po) (AvARRAY(MUTABLE_AV(((block).oldcomppad)))[po])
428
429
430 /*
431 =for apidoc m|U32|PAD_COMPNAME_FLAGS|PADOFFSET po
432 Return the flags for the current compiling pad name
433 at offset C<po>.  Assumes a valid slot entry.
434
435 =for apidoc m|char *|PAD_COMPNAME_PV|PADOFFSET po
436 Return the name of the current compiling pad name
437 at offset C<po>.  Assumes a valid slot entry.
438
439 =for apidoc m|HV *|PAD_COMPNAME_TYPE|PADOFFSET po
440 Return the type (stash) of the current compiling pad name at offset
441 C<po>.  Must be a valid name.  Returns null if not typed.
442
443 =for apidoc m|HV *|PAD_COMPNAME_OURSTASH|PADOFFSET po
444 Return the stash associated with an C<our> variable.
445 Assumes the slot entry is a valid C<our> lexical.
446
447 =for apidoc m|STRLEN|PAD_COMPNAME_GEN|PADOFFSET po
448 The generation number of the name at offset C<po> in the current
449 compiling pad (lvalue).
450
451 =for apidoc m|STRLEN|PAD_COMPNAME_GEN_set|PADOFFSET po|int gen
452 Sets the generation number of the name at offset C<po> in the current
453 ling pad (lvalue) to C<gen>.
454 =cut
455
456 */
457
458 #define PAD_COMPNAME(po)        PAD_COMPNAME_SV(po)
459 #define PAD_COMPNAME_SV(po)     (PadnamelistARRAY(PL_comppad_name)[(po)])
460 #define PAD_COMPNAME_FLAGS(po)  PadnameFLAGS(PAD_COMPNAME(po))
461 #define PAD_COMPNAME_FLAGS_isOUR(po) PadnameIsOUR(PAD_COMPNAME_SV(po))
462 #define PAD_COMPNAME_PV(po)     PadnamePV(PAD_COMPNAME(po))
463
464 #define PAD_COMPNAME_TYPE(po)   PadnameTYPE(PAD_COMPNAME(po))
465
466 #define PAD_COMPNAME_OURSTASH(po)  (PadnameOURSTASH(PAD_COMPNAME_SV(po)))
467
468 #define PAD_COMPNAME_GEN(po) \
469     ((STRLEN)PadnamelistARRAY(PL_comppad_name)[po]->xpadn_gen)
470
471 #define PAD_COMPNAME_GEN_set(po, gen) \
472     (PadnamelistARRAY(PL_comppad_name)[po]->xpadn_gen = (gen))
473
474
475 /*
476 =for apidoc m|void|PAD_CLONE_VARS|PerlInterpreter *proto_perl|CLONE_PARAMS* param
477 Clone the state variables associated with running and compiling pads.
478
479 =cut
480 */
481
482 /* NB - we set PL_comppad to null unless it points at a value that
483  * has already been dup'ed, ie it points to part of an active padlist.
484  * Otherwise PL_comppad ends up being a leaked scalar in code like
485  * the following:
486  *     threads->create(sub { threads->create(sub {...} ) } );
487  * where the second thread dups the outer sub's comppad but not the
488  * sub's CV or padlist. */
489
490 #define PAD_CLONE_VARS(proto_perl, param)                               \
491     PL_comppad                  = av_dup(proto_perl->Icomppad, param);  \
492     PL_curpad = PL_comppad ?  AvARRAY(PL_comppad) : NULL;               \
493     PL_comppad_name             =                                       \
494                   padnamelist_dup(proto_perl->Icomppad_name, param);    \
495     PL_comppad_name_fill        = proto_perl->Icomppad_name_fill;       \
496     PL_comppad_name_floor       = proto_perl->Icomppad_name_floor;      \
497     PL_min_intro_pending        = proto_perl->Imin_intro_pending;       \
498     PL_max_intro_pending        = proto_perl->Imax_intro_pending;       \
499     PL_padix                    = proto_perl->Ipadix;                   \
500     PL_padix_floor              = proto_perl->Ipadix_floor;             \
501     PL_pad_reset_pending        = proto_perl->Ipad_reset_pending;       \
502     PL_cop_seqmax               = proto_perl->Icop_seqmax;
503
504 /*
505 =for apidoc Am|PADOFFSET|pad_add_name_pvs|"name"|U32 flags|HV *typestash|HV *ourstash
506
507 Exactly like L</pad_add_name_pvn>, but takes a literal string
508 instead of a string/length pair.
509
510 =cut
511 */
512
513 #define pad_add_name_pvs(name,flags,typestash,ourstash) \
514     Perl_pad_add_name_pvn(aTHX_ STR_WITH_LEN(name), flags, typestash, ourstash)
515
516 /*
517 =for apidoc Am|PADOFFSET|pad_findmy_pvs|"name"|U32 flags
518
519 Exactly like L</pad_findmy_pvn>, but takes a literal string
520 instead of a string/length pair.
521
522 =cut
523 */
524
525 #define pad_findmy_pvs(name,flags) \
526     Perl_pad_findmy_pvn(aTHX_ STR_WITH_LEN(name), flags)
527
528 /*
529  * ex: set ts=8 sts=4 sw=4 et:
530  */