… | |
… | |
84 | PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; |
84 | PUTBACK; count = perl_call_sv ((SV *)cb, G_SCALAR); SPAGAIN; |
85 | |
85 | |
86 | if (count != 1) |
86 | if (count != 1) |
87 | croak ("fnamefilter perl callback MUST return a single filename exactly"); |
87 | croak ("fnamefilter perl callback MUST return a single filename exactly"); |
88 | |
88 | |
89 | _FP_free (str); str = _FP_strdup (SvPV_nolen (TOPs)); |
89 | FP_free (str); str = FP_strdup (SvPV_nolen (TOPs)); |
90 | |
90 | |
91 | PUTBACK; FREETMPS; LEAVE; |
91 | PUTBACK; FREETMPS; LEAVE; |
92 | |
92 | |
93 | } TEMP_RELEASE; |
93 | } TEMP_RELEASE; |
94 | |
94 | |
… | |
… | |
145 | if (count > 1) |
145 | if (count > 1) |
146 | croak ("filenamecallback perl callback must return nothing or a single filename"); |
146 | croak ("filenamecallback perl callback must return nothing or a single filename"); |
147 | |
147 | |
148 | if (count) |
148 | if (count) |
149 | { |
149 | { |
150 | _FP_free (filename); |
150 | FP_free (filename); |
151 | |
151 | |
152 | filename = SvOK (TOPs) |
152 | filename = SvOK (TOPs) |
153 | ? _FP_strdup (SvPV_nolen (TOPs)) |
153 | ? FP_strdup (SvPV_nolen (TOPs)) |
154 | : 0; |
154 | : 0; |
155 | } |
155 | } |
156 | |
156 | |
157 | PUTBACK; FREETMPS; LEAVE; |
157 | PUTBACK; FREETMPS; LEAVE; |
158 | |
158 | |
… | |
… | |
508 | uulist *li |
508 | uulist *li |
509 | char * newfilename |
509 | char * newfilename |
510 | CODE: |
510 | CODE: |
511 | if (newfilename) |
511 | if (newfilename) |
512 | { |
512 | { |
513 | _FP_free (li->filename); |
513 | FP_free (li->filename); |
514 | li->filename = _FP_strdup (newfilename); |
514 | li->filename = FP_strdup (newfilename); |
515 | } |
515 | } |
516 | RETVAL = li->filename; |
516 | RETVAL = li->filename; |
517 | OUTPUT: |
517 | OUTPUT: |
518 | RETVAL |
518 | RETVAL |
519 | |
519 | |