By grabbing the length, we can use sv_setpvn here.
[p5sagit/p5-mst-13.2.git] / embed.pl
index c917dfb..778090f 100755 (executable)
--- a/embed.pl
+++ b/embed.pl
@@ -195,6 +195,7 @@ sub write_protos {
            for my $arg ( @args ) {
                ++$n;
                push( @nonnull, $n ) if ( $arg =~ s/\s*\bNN\b\s+// );
+               $arg =~ s/\s*\bNULLOK\b\s+//; # strip NULLOK with no effect
            }
            $ret .= join ", ", @args;
        }
@@ -794,10 +795,27 @@ EXTCONST void * const PL_force_link_funcs[] = {
 #define PERLVARIC(v,t,i) PERLVAR(v,t)
 #define PERLVARISC(v,i) PERLVAR(v,char)
 
+/* In Tru64 (__DEC && __osf__) the cc option -std1 causes that one
+ * cannot cast between void pointers and function pointers without
+ * info level warnings.  The PL_force_link_funcs[] would cause a few
+ * hundred of those warnings.  In code one can circumnavigate this by using
+ * unions that overlay the different pointers, but in declarations one
+ * cannot use this trick.  Therefore we just disable the warning here
+ * for the duration of the PL_force_link_funcs[] declaration. */
+
+#if defined(__DECC) && defined(__osf__)
+#pragma message save
+#pragma message disable (nonstandcast)
+#endif
+
 #include "thrdvar.h"
 #include "intrpvar.h"
 #include "perlvars.h"
 
+#if defined(__DECC) && defined(__osf__)
+#pragma message restore
+#endif
+
 #undef PERLVAR
 #undef PERLVARA
 #undef PERLVARI
@@ -936,3 +954,5 @@ my %vfuncs = qw(
     Perl_dump_indent           Perl_dump_vindent
     Perl_default_protect       Perl_vdefault_protect
 );
+
+# ex: set ts=8 sts=4 sw=4 noet: