This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
two small patches from Peter Prymmer <pvhp@forte.com>
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index 476c941..e9d6893 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -153,6 +153,8 @@ struct io {
 
 /* Some private flags. */
 
+#define SVpad_OUR      0x80000000      /* pad name is "our" instead of "my" */
+
 #define SVf_IVisUV     0x80000000      /* use XPVUV instead of XPVIV */
 
 #define SVpfm_COMPILED 0x80000000      /* FORMLINE is compiled */
@@ -255,7 +257,7 @@ struct xpvbm {
     U8         xbm_rare;       /* rarest character in string */
 };
 
-/* This structure much match XPVCV */
+/* This structure much match XPVCV in cv.h */
 
 typedef U16 cv_flags_t;
 
@@ -274,8 +276,8 @@ struct xpvfm {
     void      (*xcv_xsub)(pTHXo_ CV*);
     ANY                xcv_xsubany;
     GV *       xcv_gv;
-    GV *       xcv_filegv;
-    long       xcv_depth;              /* >= 2 indicates recursive call */
+    char *     xcv_file;
+    long       xcv_depth;      /* >= 2 indicates recursive call */
     AV *       xcv_padlist;
     CV *       xcv_outside;
 #ifdef USE_THREADS
@@ -314,12 +316,13 @@ struct xpvio {
     char       xio_flags;
 };
 
-#define IOf_ARGV 1     /* this fp iterates over ARGV */
-#define IOf_START 2    /* check for null ARGV and substitute '-' */
-#define IOf_FLUSH 4    /* this fp wants a flush after write op */
-#define IOf_DIDTOP 8   /* just did top of form */
-#define IOf_UNTAINT 16  /* consider this fp (and its data) "safe" */
-#define IOf_NOLINE  32 /* slurped a pseudo-line from empty file */
+#define IOf_ARGV       1       /* this fp iterates over ARGV */
+#define IOf_START      2       /* check for null ARGV and substitute '-' */
+#define IOf_FLUSH      4       /* this fp wants a flush after write op */
+#define IOf_DIDTOP     8       /* just did top of form */
+#define IOf_UNTAINT    16      /* consider this fp (and its data) "safe" */
+#define IOf_NOLINE     32      /* slurped a pseudo-line from empty file */
+#define IOf_FAKE_DIRP  64      /* xio_dirp is fake (source filters kludge) */
 
 /* The following macros define implementation-independent predicates on SVs. */
 
@@ -692,12 +695,5 @@ struct xpvio {
 
 #define isGV(sv) (SvTYPE(sv) == SVt_PVGV)
 
-#if !defined(DOSISH) || defined(WIN32) || defined(OS2)
-#  define SvGROW(sv,len) (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv))
-#  define Sv_Grow sv_grow
-#else
-    /* extra parentheses intentionally NOT placed around "len"! */
-#  define SvGROW(sv,len) ((SvLEN(sv) < (unsigned long)len) \
-               ? sv_grow(sv,(unsigned long)len) : SvPVX(sv))
-#  define Sv_Grow(sv,len) sv_grow(sv,(unsigned long)(len))
-#endif /* DOSISH */
+#define SvGROW(sv,len) (SvLEN(sv) < (len) ? sv_grow(sv,len) : SvPVX(sv))
+#define Sv_Grow sv_grow