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

Comparing Convert-Scalar/Scalar.xs (file contents):
Revision 1.1 by root, Thu Sep 27 18:32:22 2001 UTC vs.
Revision 1.2 by root, Sun Jan 20 04:23:59 2002 UTC

140 PPCODE: 140 PPCODE:
141 sv_grow (scalar, newlen); 141 sv_grow (scalar, newlen);
142 if (GIMME_V != G_VOID) 142 if (GIMME_V != G_VOID)
143 XPUSHs (sv_2mortal (SvREFCNT_inc (scalar))); 143 XPUSHs (sv_2mortal (SvREFCNT_inc (scalar)));
144 144
145int
146refcnt(scalar,newrefcnt=0)
147 SV * scalar
148 int newrefcnt
149 PROTOTYPE: $;$
150 ALIAS:
151 refcnt_rv = 1
152 CODE:
153 if (ix)
154 {
155 if (!SvROK (scalar)) croak ("refcnt_rv requires a reference as it's first argument");
156 scalar = SvRV (scalar);
157 }
158 RETVAL = SvREFCNT (scalar);
159 if (items > 1)
160 SvREFCNT (scalar) = newrefcnt;
161 OUTPUT:
162 RETVAL
163
164void
165refcnt_inc(scalar)
166 SV * scalar
167 ALIAS:
168 refcnt_inc_rv = 1
169 PROTOTYPE: $
170 CODE:
171 if (ix)
172 {
173 if (!SvROK (scalar)) croak ("refcnt_inc_rv requires a reference as it's first argument");
174 scalar = SvRV (scalar);
175 }
176 SvREFCNT_inc (scalar);
177
178void
179refcnt_dec(scalar)
180 SV * scalar
181 ALIAS:
182 refcnt_dec_rv = 1
183 PROTOTYPE: $
184 CODE:
185 if (ix)
186 {
187 if (!SvROK (scalar)) croak ("refcnt_dec_rv requires a reference as it's first argument");
188 scalar = SvRV (scalar);
189 }
190 SvREFCNT_dec (scalar);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines