freebsd-ports/www/p5-HTML-Template-JIT/files/5.005-JIT-Compiler.pm
Mathieu Arnold 88fa065a3a Add p5-HTML-Template-JIT 0.04, perl module to compile HTML Templates
with Inline::C.

PR:		ports/66351
Submitted by:	alex@kapranoff.ru
2004-05-07 11:12:38 +00:00

21 lines
582 B
Perl

--- JIT/Compiler.pm~ Fri May 7 12:58:37 2004
+++ JIT/Compiler.pm Fri May 7 12:58:39 2004
@@ -87,6 +87,18 @@
use Inline C => Config => OPTIMIZE => "$optimize", DIRECTORY => "$self->{package_dir}" $inline_debug;
use Inline C => <<'CODE_END';
+#ifndef SvPV_nolen
+# define SvPV_nolen(sv) ((SvFLAGS(sv) & (SVf_POK)) == SVf_POK ? SvPVX(sv) : sv_2pv_nolen(sv))
+ static char *
+ sv_2pv_nolen(register SV *sv)
+ {
+ STRLEN n_a;
+ return sv_2pv(sv, &n_a);
+ }
+#endif
+
+#define get_hv(name,create) perl_get_hv(name,create)
+
END
# print out code