line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
################################################################################ |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Copyright (c) 2002-2020 Marcus Holland-Moritz. All rights reserved. |
4
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify |
5
|
|
|
|
|
|
|
# it under the same terms as Perl itself. |
6
|
|
|
|
|
|
|
# |
7
|
|
|
|
|
|
|
################################################################################ |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
################################################################################ |
11
|
|
|
|
|
|
|
# |
12
|
|
|
|
|
|
|
# METHOD: sizeof |
13
|
|
|
|
|
|
|
# |
14
|
|
|
|
|
|
|
# WRITTEN BY: Marcus Holland-Moritz ON: Jan 2002 |
15
|
|
|
|
|
|
|
# CHANGED BY: ON: |
16
|
|
|
|
|
|
|
# |
17
|
|
|
|
|
|
|
################################################################################ |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
SV * |
20
|
|
|
|
|
|
|
CBC::sizeof(type) |
21
|
|
|
|
|
|
|
const char *type |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
PREINIT: |
24
|
148360
|
|
|
|
|
|
CBC_METHOD(sizeof); |
25
|
|
|
|
|
|
|
MemberInfo mi; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
CODE: |
28
|
|
|
|
|
|
|
CT_DEBUG_METHOD1("'%s'", type); |
29
|
|
|
|
|
|
|
|
30
|
148360
|
100
|
|
|
|
|
CHECK_VOID_CONTEXT; |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
148348
|
100
|
|
|
|
|
NEED_PARSE_DATA; |
|
|
100
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
148348
|
100
|
|
|
|
|
if (!get_member_info(aTHX_ THIS, type, &mi, 0)) |
35
|
18
|
|
|
|
|
|
Perl_croak(aTHX_ "Cannot find '%s'", type); |
36
|
|
|
|
|
|
|
|
37
|
148180
|
100
|
|
|
|
|
if (mi.pDecl && mi.pDecl->bitfield_flag) |
|
|
100
|
|
|
|
|
|
38
|
6
|
|
|
|
|
|
Perl_croak(aTHX_ "Cannot use %s on bitfields", method); |
39
|
|
|
|
|
|
|
|
40
|
148174
|
100
|
|
|
|
|
if (mi.flags) |
41
|
89435
|
100
|
|
|
|
|
WARN_FLAGS(type, mi.flags); |
|
|
100
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
148174
|
|
|
|
|
|
RETVAL = newSVuv(mi.size); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
OUTPUT: |
46
|
|
|
|
|
|
|
RETVAL |
47
|
|
|
|
|
|
|
|