ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Proc-FastSpawn/FastSpawn.xs
(Generate patch)

Comparing Proc-FastSpawn/FastSpawn.xs (file contents):
Revision 1.6 by root, Sun Apr 28 01:10:44 2013 UTC vs.
Revision 1.7 by root, Mon Jun 10 03:02:33 2013 UTC

46 if (!SvROK (sv) || SvTYPE (SvRV (sv)) != SVt_PVAV) 46 if (!SvROK (sv) || SvTYPE (SvRV (sv)) != SVt_PVAV)
47 croak ("expected a reference to an array of argument/environment strings"); 47 croak ("expected a reference to an array of argument/environment strings");
48 48
49 av = (AV *)SvRV (sv); 49 av = (AV *)SvRV (sv);
50 n = av_len (av) + 1; 50 n = av_len (av) + 1;
51 cvec = (char **)SvPVX (sv_2mortal (NEWSV (0, sizeof (char *) * n + 1))); 51 cvec = (char **)SvPVX (sv_2mortal (NEWSV (0, sizeof (char *) * (n + 1))));
52 52
53 for (i = 0; i < n; ++i) 53 for (i = 0; i < n; ++i)
54 cvec [i] = SvPVbyte_nolen (*av_fetch (av, i, 11)); 54 cvec [i] = SvPVbyte_nolen (*av_fetch (av, i, 1));
55 55
56 cvec [n] = 0; 56 cvec [n] = 0;
57 57
58 return cvec; 58 return cvec;
59} 59}
102 if (pid == -1) 102 if (pid == -1)
103 XSRETURN_UNDEF; 103 XSRETURN_UNDEF;
104 104
105 /* do it like perl, dadadoop dadadoop */ 105 /* do it like perl, dadadoop dadadoop */
106 w32_child_handles [w32_num_children] = (HANDLE)pid; 106 w32_child_handles [w32_num_children] = (HANDLE)pid;
107 pid = GetProcessId ((HANDLE)pid); /* get the real pid, unfortunately, requires wxp or newer */ 107 pid = GetProcessId ((HANDLE)pid); /* get the real pid, unfortunately, requires wxp or newer */
108 w32_child_pids [w32_num_children] = pid; 108 w32_child_pids [w32_num_children] = pid;
109 ++w32_num_children; 109 ++w32_num_children;
110#elif USE_SPAWN 110#elif USE_SPAWN
111 { 111 {
112 pid_t xpid; 112 pid_t xpid;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines