summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-08-17 14:21:37 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-08-21 16:51:16 -0700
commit35e035ccb58e33947405288b1177fb0b9c1da197 (patch)
treefec171998002fc9523f006c88610f31e252d5d5f /perl.h
parentdb4cf31d1d6c1d09bce93986aa993818ea7b17cf (diff)
downloadperl-35e035ccb58e33947405288b1177fb0b9c1da197.tar.gz
More PAD APIs
If we are making padlists their own type, and no longer AVs, it makes sense to add APIs for pads, too, so that CPAN code that needs to change now will only have to change once if we ever stop pads them- selves from being AVs. There is no reason pad names have to be SVs, so I am adding sep- arate APIs for pad names, too. The AV containing pad names is now officially a PADNAMELIST, which is accessed, not via *PADLIST_ARRAY(padlist), but via PADLIST_NAMES(padlist). Future optimisations may even merge the padlist with its name list so I have also added macros to access the parts of the name list directly from the padlist.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/perl.h b/perl.h
index 1154c40ca8..36eec0d03d 100644
--- a/perl.h
+++ b/perl.h
@@ -2442,10 +2442,12 @@ typedef struct ptr_tbl_ent PTR_TBL_ENT_t;
typedef struct ptr_tbl PTR_TBL_t;
typedef struct clone_params CLONE_PARAMS;
-/* a pad is currently just an AV; but that might change,
+/* a pad or name pad is currently just an AV; but that might change,
* so hide the type. */
typedef struct padlist PADLIST;
typedef AV PAD;
+typedef AV PADNAMELIST;
+typedef SV PADNAME;
#include "handy.h"