Coverage Report

Created: 2025-06-10 07:27

/src/ghostpdl/pdf/pdf_obj.h
Line
Count
Source (jump to first uncovered line)
1
/* Copyright (C) 2020-2024 Artifex Software, Inc.
2
   All Rights Reserved.
3
4
   This software is provided AS-IS with no warranty, either express or
5
   implied.
6
7
   This software is distributed under license and may not be copied,
8
   modified or distributed except as expressly authorized under the terms
9
   of the license contained in the file LICENSE in this distribution.
10
11
   Refer to licensing information at http://www.artifex.com or contact
12
   Artifex Software, Inc.,  39 Mesa Street, Suite 108A, San Francisco,
13
   CA 94129, USA, for further information.
14
*/
15
16
#ifndef PDF_OBJECTS
17
#define PDF_OBJECTS
18
19
int pdfi_object_alloc(pdf_context *ctx, pdf_obj_type type, unsigned int size, pdf_obj **obj);
20
void pdfi_free_object(pdf_obj *o);
21
int pdfi_obj_to_string(pdf_context *ctx, pdf_obj *obj, byte **data, int *len);
22
int pdfi_obj_dict_to_stream(pdf_context *ctx, pdf_dict *dict, pdf_stream **stream, bool do_convert);
23
int pdfi_get_stream_dict(pdf_context *ctx, pdf_stream *stream, pdf_dict **dict);
24
int pdfi_obj_charstr_to_string(pdf_context *ctx, const char *charstr, pdf_string **string);
25
int pdfi_obj_charstr_to_name(pdf_context *ctx, const char *charstr, pdf_name **name);
26
int pdfi_obj_get_label(pdf_context *ctx, pdf_obj *obj, char **label);
27
int pdfi_num_alloc(pdf_context *ctx, double d, pdf_num **num);
28
29
static inline int
30
pdfi_obj_to_real(pdf_context *ctx, pdf_obj *obj, double *d)
31
170M
{
32
170M
    pdf_num *num = (pdf_num *)obj;
33
34
170M
    switch (pdfi_type_of(num)) {
35
66.5M
        case PDF_INT:
36
66.5M
            *d = (double)num->value.i;
37
66.5M
            break;
38
103M
        case PDF_REAL:
39
103M
            *d = num->value.d;
40
103M
            break;
41
240k
        default:
42
240k
            return_error(gs_error_typecheck);
43
170M
    }
44
45
170M
    return 0;
46
170M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
281k
{
32
281k
    pdf_num *num = (pdf_num *)obj;
33
34
281k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
281k
        case PDF_REAL:
39
281k
            *d = num->value.d;
40
281k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
281k
    }
44
45
281k
    return 0;
46
281k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
2.19M
{
32
2.19M
    pdf_num *num = (pdf_num *)obj;
33
34
2.19M
    switch (pdfi_type_of(num)) {
35
1.76M
        case PDF_INT:
36
1.76M
            *d = (double)num->value.i;
37
1.76M
            break;
38
425k
        case PDF_REAL:
39
425k
            *d = num->value.d;
40
425k
            break;
41
101
        default:
42
101
            return_error(gs_error_typecheck);
43
2.19M
    }
44
45
2.19M
    return 0;
46
2.19M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
21.5M
{
32
21.5M
    pdf_num *num = (pdf_num *)obj;
33
34
21.5M
    switch (pdfi_type_of(num)) {
35
17.3M
        case PDF_INT:
36
17.3M
            *d = (double)num->value.i;
37
17.3M
            break;
38
4.23M
        case PDF_REAL:
39
4.23M
            *d = num->value.d;
40
4.23M
            break;
41
1.02k
        default:
42
1.02k
            return_error(gs_error_typecheck);
43
21.5M
    }
44
45
21.5M
    return 0;
46
21.5M
}
Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_int.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_file.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_path.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_colour.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_real
pdf_stack.c:pdfi_obj_to_real
Line
Count
Source
31
128M
{
32
128M
    pdf_num *num = (pdf_num *)obj;
33
34
128M
    switch (pdfi_type_of(num)) {
35
35.6M
        case PDF_INT:
36
35.6M
            *d = (double)num->value.i;
37
35.6M
            break;
38
93.0M
        case PDF_REAL:
39
93.0M
            *d = num->value.d;
40
93.0M
            break;
41
236k
        default:
42
236k
            return_error(gs_error_typecheck);
43
128M
    }
44
45
128M
    return 0;
46
128M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
654k
{
32
654k
    pdf_num *num = (pdf_num *)obj;
33
34
654k
    switch (pdfi_type_of(num)) {
35
375k
        case PDF_INT:
36
375k
            *d = (double)num->value.i;
37
375k
            break;
38
279k
        case PDF_REAL:
39
279k
            *d = num->value.d;
40
279k
            break;
41
202
        default:
42
202
            return_error(gs_error_typecheck);
43
654k
    }
44
45
654k
    return 0;
46
654k
}
Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_real
pdf_font.c:pdfi_obj_to_real
Line
Count
Source
31
2.00M
{
32
2.00M
    pdf_num *num = (pdf_num *)obj;
33
34
2.00M
    switch (pdfi_type_of(num)) {
35
1.17M
        case PDF_INT:
36
1.17M
            *d = (double)num->value.i;
37
1.17M
            break;
38
821k
        case PDF_REAL:
39
821k
            *d = num->value.d;
40
821k
            break;
41
2.66k
        default:
42
2.66k
            return_error(gs_error_typecheck);
43
2.00M
    }
44
45
1.99M
    return 0;
46
2.00M
}
Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_real
pdf_text.c:pdfi_obj_to_real
Line
Count
Source
31
15.1M
{
32
15.1M
    pdf_num *num = (pdf_num *)obj;
33
34
15.1M
    switch (pdfi_type_of(num)) {
35
10.2M
        case PDF_INT:
36
10.2M
            *d = (double)num->value.i;
37
10.2M
            break;
38
4.93M
        case PDF_REAL:
39
4.93M
            *d = num->value.d;
40
4.93M
            break;
41
139
        default:
42
139
            return_error(gs_error_typecheck);
43
15.1M
    }
44
45
15.1M
    return 0;
46
15.1M
}
Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_func.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_device.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_check.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_real
Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_real
47
48
static inline int
49
pdfi_obj_to_float(pdf_context *ctx, pdf_obj *obj, float *f)
50
13.7M
{
51
13.7M
    pdf_num *num = (pdf_num *)obj;
52
53
13.7M
    switch (pdfi_type_of(num)) {
54
6.25M
        case PDF_INT:
55
6.25M
            *f = (float)num->value.i;
56
6.25M
            break;
57
7.46M
        case PDF_REAL:
58
7.46M
            *f = (float)num->value.d;
59
7.46M
            break;
60
17.9k
        default:
61
17.9k
            return_error(gs_error_typecheck);
62
13.7M
    }
63
64
13.7M
    return 0;
65
13.7M
}
Unexecuted instantiation: zpdfops.c:pdfi_obj_to_float
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_dict.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_array.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_int.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_file.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_path.c:pdfi_obj_to_float
pdf_colour.c:pdfi_obj_to_float
Line
Count
Source
50
922k
{
51
922k
    pdf_num *num = (pdf_num *)obj;
52
53
922k
    switch (pdfi_type_of(num)) {
54
344k
        case PDF_INT:
55
344k
            *f = (float)num->value.i;
56
344k
            break;
57
565k
        case PDF_REAL:
58
565k
            *f = (float)num->value.d;
59
565k
            break;
60
11.5k
        default:
61
11.5k
            return_error(gs_error_typecheck);
62
922k
    }
63
64
910k
    return 0;
65
922k
}
Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_float
pdf_stack.c:pdfi_obj_to_float
Line
Count
Source
50
12.8M
{
51
12.8M
    pdf_num *num = (pdf_num *)obj;
52
53
12.8M
    switch (pdfi_type_of(num)) {
54
5.91M
        case PDF_INT:
55
5.91M
            *f = (float)num->value.i;
56
5.91M
            break;
57
6.90M
        case PDF_REAL:
58
6.90M
            *f = (float)num->value.d;
59
6.90M
            break;
60
6.32k
        default:
61
6.32k
            return_error(gs_error_typecheck);
62
12.8M
    }
63
64
12.8M
    return 0;
65
12.8M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_page.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_text.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_func.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_device.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_check.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_float
Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_float
66
67
static inline int
68
pdfi_obj_to_int(pdf_context *ctx, pdf_obj *obj, int64_t *i)
69
9.08M
{
70
9.08M
    pdf_num *num = (pdf_num *)obj;
71
9.08M
    int64_t tmp;
72
73
9.08M
    switch (pdfi_type_of(num)) {
74
9.04M
        case PDF_INT:
75
9.04M
            *i = num->value.i;
76
9.04M
            break;
77
24.9k
        case PDF_REAL:
78
            /* We shouldn't be given a real here. We will grudgingly accept
79
             * (with a warning) an int given as a real, but will error out
80
             * otherwise. If we find a case where we need to accept reals
81
             * as ints, we'll do a new version of this function called something
82
             * like pdfi_obj_real_as_int what will just cast it down. */
83
24.9k
            tmp = (int64_t)num->value.d;
84
24.9k
            if ((double)tmp != num->value.d) {
85
14.9k
                return_error(gs_error_typecheck);
86
14.9k
            }
87
10.0k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
10.0k
            *i = tmp;
89
10.0k
            break;
90
21.5k
        default:
91
21.5k
            return_error(gs_error_typecheck);
92
9.08M
    }
93
94
9.05M
    return 0;
95
9.08M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
528k
{
70
528k
    pdf_num *num = (pdf_num *)obj;
71
528k
    int64_t tmp;
72
73
528k
    switch (pdfi_type_of(num)) {
74
528k
        case PDF_INT:
75
528k
            *i = num->value.i;
76
528k
            break;
77
0
        case PDF_REAL:
78
            /* We shouldn't be given a real here. We will grudgingly accept
79
             * (with a warning) an int given as a real, but will error out
80
             * otherwise. If we find a case where we need to accept reals
81
             * as ints, we'll do a new version of this function called something
82
             * like pdfi_obj_real_as_int what will just cast it down. */
83
0
            tmp = (int64_t)num->value.d;
84
0
            if ((double)tmp != num->value.d) {
85
0
                return_error(gs_error_typecheck);
86
0
            }
87
0
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
0
            *i = tmp;
89
0
            break;
90
0
        default:
91
0
            return_error(gs_error_typecheck);
92
528k
    }
93
94
528k
    return 0;
95
528k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.63M
{
70
5.63M
    pdf_num *num = (pdf_num *)obj;
71
5.63M
    int64_t tmp;
72
73
5.63M
    switch (pdfi_type_of(num)) {
74
5.62M
        case PDF_INT:
75
5.62M
            *i = num->value.i;
76
5.62M
            break;
77
2.15k
        case PDF_REAL:
78
            /* We shouldn't be given a real here. We will grudgingly accept
79
             * (with a warning) an int given as a real, but will error out
80
             * otherwise. If we find a case where we need to accept reals
81
             * as ints, we'll do a new version of this function called something
82
             * like pdfi_obj_real_as_int what will just cast it down. */
83
2.15k
            tmp = (int64_t)num->value.d;
84
2.15k
            if ((double)tmp != num->value.d) {
85
18
                return_error(gs_error_typecheck);
86
18
            }
87
2.14k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.14k
            *i = tmp;
89
2.14k
            break;
90
677
        default:
91
677
            return_error(gs_error_typecheck);
92
5.63M
    }
93
94
5.63M
    return 0;
95
5.63M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
74.9k
{
70
74.9k
    pdf_num *num = (pdf_num *)obj;
71
74.9k
    int64_t tmp;
72
73
74.9k
    switch (pdfi_type_of(num)) {
74
74.8k
        case PDF_INT:
75
74.8k
            *i = num->value.i;
76
74.8k
            break;
77
0
        case PDF_REAL:
78
            /* We shouldn't be given a real here. We will grudgingly accept
79
             * (with a warning) an int given as a real, but will error out
80
             * otherwise. If we find a case where we need to accept reals
81
             * as ints, we'll do a new version of this function called something
82
             * like pdfi_obj_real_as_int what will just cast it down. */
83
0
            tmp = (int64_t)num->value.d;
84
0
            if ((double)tmp != num->value.d) {
85
0
                return_error(gs_error_typecheck);
86
0
            }
87
0
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
0
            *i = tmp;
89
0
            break;
90
63
        default:
91
63
            return_error(gs_error_typecheck);
92
74.9k
    }
93
94
74.8k
    return 0;
95
74.9k
}
Unexecuted instantiation: pdf_xref.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_int.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_file.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_path.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_colour.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_pattern.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_gstate.c:pdfi_obj_to_int
pdf_stack.c:pdfi_obj_to_int
Line
Count
Source
69
2.85M
{
70
2.85M
    pdf_num *num = (pdf_num *)obj;
71
2.85M
    int64_t tmp;
72
73
2.85M
    switch (pdfi_type_of(num)) {
74
2.80M
        case PDF_INT:
75
2.80M
            *i = num->value.i;
76
2.80M
            break;
77
22.8k
        case PDF_REAL:
78
            /* We shouldn't be given a real here. We will grudgingly accept
79
             * (with a warning) an int given as a real, but will error out
80
             * otherwise. If we find a case where we need to accept reals
81
             * as ints, we'll do a new version of this function called something
82
             * like pdfi_obj_real_as_int what will just cast it down. */
83
22.8k
            tmp = (int64_t)num->value.d;
84
22.8k
            if ((double)tmp != num->value.d) {
85
14.9k
                return_error(gs_error_typecheck);
86
14.9k
            }
87
7.86k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
7.86k
            *i = tmp;
89
7.86k
            break;
90
20.8k
        default:
91
20.8k
            return_error(gs_error_typecheck);
92
2.85M
    }
93
94
2.81M
    return 0;
95
2.85M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_page.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_annot.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_mark.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font0.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font1.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font1C.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_fontps.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font3.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_fontTT.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_font11.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_cmap.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_fmap.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_text.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_shading.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_func.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_trans.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_device.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_misc.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_optcontent.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_check.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_sec.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_utf8.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_deref.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_repair.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_obj.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_doc.c:pdfi_obj_to_int
Unexecuted instantiation: pdf_fapi.c:pdfi_obj_to_int
96
97
/* NOTE: the buffer object takes ownership of "data" */
98
static inline int
99
pdfi_buffer_set_data(pdf_obj *o, byte *data, int32_t length)
100
41.3k
{
101
41.3k
    pdf_buffer *b = (pdf_buffer *)o;
102
41.3k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
41.3k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
41.3k
    b->data = data;
110
41.3k
    b->length = length;
111
41.3k
    return 0;
112
41.3k
}
Unexecuted instantiation: zpdfops.c:pdfi_buffer_set_data
Unexecuted instantiation: ghostpdf.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_dict.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_array.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_xref.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_int.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_file.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_path.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_colour.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_pattern.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_gstate.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_stack.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_image.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_page.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_annot.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_mark.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_font.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_font0.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_font1.c:pdfi_buffer_set_data
pdf_font1C.c:pdfi_buffer_set_data
Line
Count
Source
100
18
{
101
18
    pdf_buffer *b = (pdf_buffer *)o;
102
18
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
18
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
18
    b->data = data;
110
18
    b->length = length;
111
18
    return 0;
112
18
}
Unexecuted instantiation: pdf_fontps.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_font3.c:pdfi_buffer_set_data
pdf_fontTT.c:pdfi_buffer_set_data
Line
Count
Source
100
23.3k
{
101
23.3k
    pdf_buffer *b = (pdf_buffer *)o;
102
23.3k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
23.3k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
23.3k
    b->data = data;
110
23.3k
    b->length = length;
111
23.3k
    return 0;
112
23.3k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
17.9k
{
101
17.9k
    pdf_buffer *b = (pdf_buffer *)o;
102
17.9k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
17.9k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
17.9k
    b->data = data;
110
17.9k
    b->length = length;
111
17.9k
    return 0;
112
17.9k
}
Unexecuted instantiation: pdf_cmap.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_fmap.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_text.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_shading.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_func.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_trans.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_device.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_misc.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_optcontent.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_check.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_sec.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_utf8.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_deref.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_repair.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_obj.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_doc.c:pdfi_buffer_set_data
Unexecuted instantiation: pdf_fapi.c:pdfi_buffer_set_data
113
114
115
#endif