Permalink
Browse files

Fixed passing NULL arguments to PERL_SYS_INIT. Perl 5.8 accepts them;…

… 5.10 doesn't.

Man, those Clang diagnostics rule.
  • Loading branch information...
1 parent 0a6a693 commit c7d2d782812673b49afe5c8a7a29373d5fde1bd4 @nriley committed Jun 21, 2011
Showing with 3 additions and 10 deletions.
  1. +3 −10 Source/ParseDate.m
View
@@ -130,19 +130,12 @@ void init_date_parser(void) {
parser_OK = YES;
}
-// Perl breaks backwards compatibility between 5.8.8 and 5.8.9.
-// (libperl.dylib does not contain Perl_sys_init or Perl_sys_term.)
-// Use the 5.8.8 definitions, which still seems to work fine with 5.8.9.
-// This allows ParseDate to be compiled on 10.6 for 10.5.
-#undef PERL_SYS_INIT
-#define PERL_SYS_INIT(c,v) MALLOC_CHECK_TAINT2(*c,*v) PERL_FPU_INIT MALLOC_INIT
-#undef PERL_SYS_TERM
-#define PERL_SYS_TERM() OP_REFCNT_TERM; MALLOC_TERM
-
static void init_perl(void) {
const char *argv[] = {"", "-CSD", "-I", "", "-MDate::Manip", "-e", "0"};
argv[3] = [[[NSBundle mainBundle] resourcePath] fileSystemRepresentation];
- PERL_SYS_INIT(0, NULL);
+ int no_argc = 0;
+ char **no_argv = 0;
+ PERL_SYS_INIT(&no_argc, &no_argv);
my_perl = perl_alloc();
if (my_perl == NULL) return;

0 comments on commit c7d2d78

Please sign in to comment.