Coverage Report

Created: 2025-12-31 07:31

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/ghostpdl/pdf/pdf_obj.h
Line
Count
Source
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
267M
{
32
267M
    pdf_num *num = (pdf_num *)obj;
33
34
267M
    switch (pdfi_type_of(num)) {
35
93.1M
        case PDF_INT:
36
93.1M
            *d = (double)num->value.i;
37
93.1M
            break;
38
173M
        case PDF_REAL:
39
173M
            *d = num->value.d;
40
173M
            break;
41
375k
        default:
42
375k
            return_error(gs_error_typecheck);
43
267M
    }
44
45
266M
    return 0;
46
267M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
376k
{
32
376k
    pdf_num *num = (pdf_num *)obj;
33
34
376k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
376k
        case PDF_REAL:
39
376k
            *d = num->value.d;
40
376k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
376k
    }
44
45
376k
    return 0;
46
376k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
3.14M
{
32
3.14M
    pdf_num *num = (pdf_num *)obj;
33
34
3.14M
    switch (pdfi_type_of(num)) {
35
2.50M
        case PDF_INT:
36
2.50M
            *d = (double)num->value.i;
37
2.50M
            break;
38
636k
        case PDF_REAL:
39
636k
            *d = num->value.d;
40
636k
            break;
41
101
        default:
42
101
            return_error(gs_error_typecheck);
43
3.14M
    }
44
45
3.14M
    return 0;
46
3.14M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
30.5M
{
32
30.5M
    pdf_num *num = (pdf_num *)obj;
33
34
30.5M
    switch (pdfi_type_of(num)) {
35
24.4M
        case PDF_INT:
36
24.4M
            *d = (double)num->value.i;
37
24.4M
            break;
38
6.03M
        case PDF_REAL:
39
6.03M
            *d = num->value.d;
40
6.03M
            break;
41
1.49k
        default:
42
1.49k
            return_error(gs_error_typecheck);
43
30.5M
    }
44
45
30.5M
    return 0;
46
30.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
208M
{
32
208M
    pdf_num *num = (pdf_num *)obj;
33
34
208M
    switch (pdfi_type_of(num)) {
35
49.5M
        case PDF_INT:
36
49.5M
            *d = (double)num->value.i;
37
49.5M
            break;
38
158M
        case PDF_REAL:
39
158M
            *d = num->value.d;
40
158M
            break;
41
369k
        default:
42
369k
            return_error(gs_error_typecheck);
43
208M
    }
44
45
208M
    return 0;
46
208M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
882k
{
32
882k
    pdf_num *num = (pdf_num *)obj;
33
34
882k
    switch (pdfi_type_of(num)) {
35
509k
        case PDF_INT:
36
509k
            *d = (double)num->value.i;
37
509k
            break;
38
372k
        case PDF_REAL:
39
372k
            *d = num->value.d;
40
372k
            break;
41
254
        default:
42
254
            return_error(gs_error_typecheck);
43
882k
    }
44
45
882k
    return 0;
46
882k
}
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.50M
{
32
2.50M
    pdf_num *num = (pdf_num *)obj;
33
34
2.50M
    switch (pdfi_type_of(num)) {
35
1.44M
        case PDF_INT:
36
1.44M
            *d = (double)num->value.i;
37
1.44M
            break;
38
1.05M
        case PDF_REAL:
39
1.05M
            *d = num->value.d;
40
1.05M
            break;
41
3.78k
        default:
42
3.78k
            return_error(gs_error_typecheck);
43
2.50M
    }
44
45
2.50M
    return 0;
46
2.50M
}
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
21.0M
{
32
21.0M
    pdf_num *num = (pdf_num *)obj;
33
34
21.0M
    switch (pdfi_type_of(num)) {
35
14.6M
        case PDF_INT:
36
14.6M
            *d = (double)num->value.i;
37
14.6M
            break;
38
6.43M
        case PDF_REAL:
39
6.43M
            *d = num->value.d;
40
6.43M
            break;
41
163
        default:
42
163
            return_error(gs_error_typecheck);
43
21.0M
    }
44
45
21.0M
    return 0;
46
21.0M
}
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
18.1M
{
51
18.1M
    pdf_num *num = (pdf_num *)obj;
52
53
18.1M
    switch (pdfi_type_of(num)) {
54
8.30M
        case PDF_INT:
55
8.30M
            *f = (float)num->value.i;
56
8.30M
            break;
57
9.83M
        case PDF_REAL:
58
9.83M
            *f = (float)num->value.d;
59
9.83M
            break;
60
20.8k
        default:
61
20.8k
            return_error(gs_error_typecheck);
62
18.1M
    }
63
64
18.1M
    return 0;
65
18.1M
}
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
1.15M
{
51
1.15M
    pdf_num *num = (pdf_num *)obj;
52
53
1.15M
    switch (pdfi_type_of(num)) {
54
430k
        case PDF_INT:
55
430k
            *f = (float)num->value.i;
56
430k
            break;
57
711k
        case PDF_REAL:
58
711k
            *f = (float)num->value.d;
59
711k
            break;
60
12.8k
        default:
61
12.8k
            return_error(gs_error_typecheck);
62
1.15M
    }
63
64
1.14M
    return 0;
65
1.15M
}
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
16.9M
{
51
16.9M
    pdf_num *num = (pdf_num *)obj;
52
53
16.9M
    switch (pdfi_type_of(num)) {
54
7.87M
        case PDF_INT:
55
7.87M
            *f = (float)num->value.i;
56
7.87M
            break;
57
9.12M
        case PDF_REAL:
58
9.12M
            *f = (float)num->value.d;
59
9.12M
            break;
60
7.94k
        default:
61
7.94k
            return_error(gs_error_typecheck);
62
16.9M
    }
63
64
16.9M
    return 0;
65
16.9M
}
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
13.4M
{
70
13.4M
    pdf_num *num = (pdf_num *)obj;
71
13.4M
    int64_t tmp;
72
73
13.4M
    switch (pdfi_type_of(num)) {
74
13.4M
        case PDF_INT:
75
13.4M
            *i = num->value.i;
76
13.4M
            break;
77
38.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
38.9k
            tmp = (int64_t)num->value.d;
84
38.9k
            if ((double)tmp != num->value.d) {
85
23.0k
                return_error(gs_error_typecheck);
86
23.0k
            }
87
15.8k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
15.8k
            *i = tmp;
89
15.8k
            break;
90
30.7k
        default:
91
30.7k
            return_error(gs_error_typecheck);
92
13.4M
    }
93
94
13.4M
    return 0;
95
13.4M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
716k
{
70
716k
    pdf_num *num = (pdf_num *)obj;
71
716k
    int64_t tmp;
72
73
716k
    switch (pdfi_type_of(num)) {
74
716k
        case PDF_INT:
75
716k
            *i = num->value.i;
76
716k
            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
716k
    }
93
94
716k
    return 0;
95
716k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
8.73M
{
70
8.73M
    pdf_num *num = (pdf_num *)obj;
71
8.73M
    int64_t tmp;
72
73
8.73M
    switch (pdfi_type_of(num)) {
74
8.73M
        case PDF_INT:
75
8.73M
            *i = num->value.i;
76
8.73M
            break;
77
2.39k
        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.39k
            tmp = (int64_t)num->value.d;
84
2.39k
            if ((double)tmp != num->value.d) {
85
29
                return_error(gs_error_typecheck);
86
29
            }
87
2.36k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.36k
            *i = tmp;
89
2.36k
            break;
90
954
        default:
91
954
            return_error(gs_error_typecheck);
92
8.73M
    }
93
94
8.73M
    return 0;
95
8.73M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
96.0k
{
70
96.0k
    pdf_num *num = (pdf_num *)obj;
71
96.0k
    int64_t tmp;
72
73
96.0k
    switch (pdfi_type_of(num)) {
74
95.9k
        case PDF_INT:
75
95.9k
            *i = num->value.i;
76
95.9k
            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
79
        default:
91
79
            return_error(gs_error_typecheck);
92
96.0k
    }
93
94
95.9k
    return 0;
95
96.0k
}
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
3.93M
{
70
3.93M
    pdf_num *num = (pdf_num *)obj;
71
3.93M
    int64_t tmp;
72
73
3.93M
    switch (pdfi_type_of(num)) {
74
3.87M
        case PDF_INT:
75
3.87M
            *i = num->value.i;
76
3.87M
            break;
77
36.5k
        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
36.5k
            tmp = (int64_t)num->value.d;
84
36.5k
            if ((double)tmp != num->value.d) {
85
23.0k
                return_error(gs_error_typecheck);
86
23.0k
            }
87
13.5k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
13.5k
            *i = tmp;
89
13.5k
            break;
90
29.7k
        default:
91
29.7k
            return_error(gs_error_typecheck);
92
3.93M
    }
93
94
3.88M
    return 0;
95
3.93M
}
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
56.7k
{
101
56.7k
    pdf_buffer *b = (pdf_buffer *)o;
102
56.7k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
56.7k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
56.7k
    b->data = data;
110
56.7k
    b->length = length;
111
56.7k
    return 0;
112
56.7k
}
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
23
{
101
23
    pdf_buffer *b = (pdf_buffer *)o;
102
23
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
23
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
23
    b->data = data;
110
23
    b->length = length;
111
23
    return 0;
112
23
}
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
34.3k
{
101
34.3k
    pdf_buffer *b = (pdf_buffer *)o;
102
34.3k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
34.3k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
34.3k
    b->data = data;
110
34.3k
    b->length = length;
111
34.3k
    return 0;
112
34.3k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
22.3k
{
101
22.3k
    pdf_buffer *b = (pdf_buffer *)o;
102
22.3k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
22.3k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
22.3k
    b->data = data;
110
22.3k
    b->length = length;
111
22.3k
    return 0;
112
22.3k
}
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