summaryrefslogtreecommitdiff
path: root/perl.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-05-01 22:12:15 +0100
committerNicholas Clark <nick@ccl4.org>2011-06-12 16:15:22 +0200
commit724cf8d623675450a9b7be794b6b3917972e83f8 (patch)
tree11ea73b19174ec36c2b07b09d87cc4de49b2cea0 /perl.h
parent9e08d3a49aaebdf17eb8671b022395f689827205 (diff)
downloadperl-724cf8d623675450a9b7be794b6b3917972e83f8.tar.gz
Move PL_global_struct_size, PL_interp_size{,_5_16_0} to perl.h
Make them const U16 - they should have been const from the start.
Diffstat (limited to 'perl.h')
-rw-r--r--perl.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl.h b/perl.h
index 0383428a05..fa86c7f854 100644
--- a/perl.h
+++ b/perl.h
@@ -4916,6 +4916,20 @@ struct interpreter {
# include "intrpvar.h"
};
+EXTCONST U16 PL_interp_size
+ INIT(sizeof(struct interpreter));
+
+# define PERL_INTERPRETER_SIZE_UPTO_MEMBER(member) \
+ STRUCT_OFFSET(struct interpreter, member) + \
+ sizeof(((struct interpreter*)0)->member)
+
+/* This will be useful for subsequent releases, because this has to be the
+ same in your libperl as in main(), else you have a mismatch and must abort.
+*/
+EXTCONST U16 PL_interp_size_5_16_0
+ INIT(PERL_INTERPRETER_SIZE_UPTO_MEMBER(PERL_LAST_5_16_0_INTERP_MEMBER));
+
+
# ifdef PERL_GLOBAL_STRUCT
/* MULTIPLICITY is automatically defined when PERL_GLOBAL_STRUCT is defined,
hence it's safe and sane to nest this within #ifdef MULTIPLICITY */
@@ -4924,6 +4938,9 @@ struct perl_vars {
# include "perlvars.h"
};
+EXTCONST U16 PL_global_struct_size
+ INIT(sizeof(struct perl_vars));
+
# ifdef PERL_CORE
# ifndef PERL_GLOBAL_STRUCT_PRIVATE
EXT struct perl_vars PL_Vars;