blob: cdcaf04a8f35a302f18c85b8a7c81da35794ab15 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/* inline.h
*
* Copyright (C) 2012 by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
*
* This file is a home for static inline functions that cannot go in other
* headers files, because they depend on proto.h (included after most other
* headers) or struct definitions.
*
* Each section names the header file that the functions "belong" to.
*/
/* ------------------------------- sv.h ------------------------------- */
PERL_STATIC_INLINE SV *
S_SvREFCNT_inc(SV *sv)
{
if (sv)
SvREFCNT(sv)++;
return sv;
}
PERL_STATIC_INLINE SV *
S_SvREFCNT_inc_NN(SV *sv)
{
SvREFCNT(sv)++;
return sv;
}
PERL_STATIC_INLINE void
S_SvREFCNT_inc_void(SV *sv)
{
if (sv)
SvREFCNT(sv)++;
}
|