Coverage Report

Created: 2025-08-28 07:06

/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
236M
{
32
236M
    pdf_num *num = (pdf_num *)obj;
33
34
236M
    switch (pdfi_type_of(num)) {
35
77.4M
        case PDF_INT:
36
77.4M
            *d = (double)num->value.i;
37
77.4M
            break;
38
158M
        case PDF_REAL:
39
158M
            *d = num->value.d;
40
158M
            break;
41
309k
        default:
42
309k
            return_error(gs_error_typecheck);
43
236M
    }
44
45
235M
    return 0;
46
236M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
342k
{
32
342k
    pdf_num *num = (pdf_num *)obj;
33
34
342k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
342k
        case PDF_REAL:
39
342k
            *d = num->value.d;
40
342k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
342k
    }
44
45
342k
    return 0;
46
342k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
2.56M
{
32
2.56M
    pdf_num *num = (pdf_num *)obj;
33
34
2.56M
    switch (pdfi_type_of(num)) {
35
2.06M
        case PDF_INT:
36
2.06M
            *d = (double)num->value.i;
37
2.06M
            break;
38
508k
        case PDF_REAL:
39
508k
            *d = num->value.d;
40
508k
            break;
41
111
        default:
42
111
            return_error(gs_error_typecheck);
43
2.56M
    }
44
45
2.56M
    return 0;
46
2.56M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
26.2M
{
32
26.2M
    pdf_num *num = (pdf_num *)obj;
33
34
26.2M
    switch (pdfi_type_of(num)) {
35
21.1M
        case PDF_INT:
36
21.1M
            *d = (double)num->value.i;
37
21.1M
            break;
38
5.05M
        case PDF_REAL:
39
5.05M
            *d = num->value.d;
40
5.05M
            break;
41
1.37k
        default:
42
1.37k
            return_error(gs_error_typecheck);
43
26.2M
    }
44
45
26.2M
    return 0;
46
26.2M
}
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
187M
{
32
187M
    pdf_num *num = (pdf_num *)obj;
33
34
187M
    switch (pdfi_type_of(num)) {
35
41.9M
        case PDF_INT:
36
41.9M
            *d = (double)num->value.i;
37
41.9M
            break;
38
145M
        case PDF_REAL:
39
145M
            *d = num->value.d;
40
145M
            break;
41
303k
        default:
42
303k
            return_error(gs_error_typecheck);
43
187M
    }
44
45
187M
    return 0;
46
187M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
808k
{
32
808k
    pdf_num *num = (pdf_num *)obj;
33
34
808k
    switch (pdfi_type_of(num)) {
35
468k
        case PDF_INT:
36
468k
            *d = (double)num->value.i;
37
468k
            break;
38
339k
        case PDF_REAL:
39
339k
            *d = num->value.d;
40
339k
            break;
41
238
        default:
42
238
            return_error(gs_error_typecheck);
43
808k
    }
44
45
807k
    return 0;
46
808k
}
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.18M
{
32
2.18M
    pdf_num *num = (pdf_num *)obj;
33
34
2.18M
    switch (pdfi_type_of(num)) {
35
1.31M
        case PDF_INT:
36
1.31M
            *d = (double)num->value.i;
37
1.31M
            break;
38
865k
        case PDF_REAL:
39
865k
            *d = num->value.d;
40
865k
            break;
41
3.38k
        default:
42
3.38k
            return_error(gs_error_typecheck);
43
2.18M
    }
44
45
2.18M
    return 0;
46
2.18M
}
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
16.0M
{
32
16.0M
    pdf_num *num = (pdf_num *)obj;
33
34
16.0M
    switch (pdfi_type_of(num)) {
35
10.4M
        case PDF_INT:
36
10.4M
            *d = (double)num->value.i;
37
10.4M
            break;
38
5.62M
        case PDF_REAL:
39
5.62M
            *d = num->value.d;
40
5.62M
            break;
41
151
        default:
42
151
            return_error(gs_error_typecheck);
43
16.0M
    }
44
45
16.0M
    return 0;
46
16.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
15.6M
{
51
15.6M
    pdf_num *num = (pdf_num *)obj;
52
53
15.6M
    switch (pdfi_type_of(num)) {
54
7.33M
        case PDF_INT:
55
7.33M
            *f = (float)num->value.i;
56
7.33M
            break;
57
8.32M
        case PDF_REAL:
58
8.32M
            *f = (float)num->value.d;
59
8.32M
            break;
60
19.8k
        default:
61
19.8k
            return_error(gs_error_typecheck);
62
15.6M
    }
63
64
15.6M
    return 0;
65
15.6M
}
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
969k
{
51
969k
    pdf_num *num = (pdf_num *)obj;
52
53
969k
    switch (pdfi_type_of(num)) {
54
373k
        case PDF_INT:
55
373k
            *f = (float)num->value.i;
56
373k
            break;
57
584k
        case PDF_REAL:
58
584k
            *f = (float)num->value.d;
59
584k
            break;
60
12.7k
        default:
61
12.7k
            return_error(gs_error_typecheck);
62
969k
    }
63
64
957k
    return 0;
65
969k
}
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
14.7M
{
51
14.7M
    pdf_num *num = (pdf_num *)obj;
52
53
14.7M
    switch (pdfi_type_of(num)) {
54
6.96M
        case PDF_INT:
55
6.96M
            *f = (float)num->value.i;
56
6.96M
            break;
57
7.74M
        case PDF_REAL:
58
7.74M
            *f = (float)num->value.d;
59
7.74M
            break;
60
7.10k
        default:
61
7.10k
            return_error(gs_error_typecheck);
62
14.7M
    }
63
64
14.7M
    return 0;
65
14.7M
}
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
11.8M
{
70
11.8M
    pdf_num *num = (pdf_num *)obj;
71
11.8M
    int64_t tmp;
72
73
11.8M
    switch (pdfi_type_of(num)) {
74
11.7M
        case PDF_INT:
75
11.7M
            *i = num->value.i;
76
11.7M
            break;
77
29.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
29.5k
            tmp = (int64_t)num->value.d;
84
29.5k
            if ((double)tmp != num->value.d) {
85
17.6k
                return_error(gs_error_typecheck);
86
17.6k
            }
87
11.9k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
11.9k
            *i = tmp;
89
11.9k
            break;
90
25.3k
        default:
91
25.3k
            return_error(gs_error_typecheck);
92
11.8M
    }
93
94
11.8M
    return 0;
95
11.8M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
656k
{
70
656k
    pdf_num *num = (pdf_num *)obj;
71
656k
    int64_t tmp;
72
73
656k
    switch (pdfi_type_of(num)) {
74
656k
        case PDF_INT:
75
656k
            *i = num->value.i;
76
656k
            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
656k
    }
93
94
656k
    return 0;
95
656k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
7.93M
{
70
7.93M
    pdf_num *num = (pdf_num *)obj;
71
7.93M
    int64_t tmp;
72
73
7.93M
    switch (pdfi_type_of(num)) {
74
7.93M
        case PDF_INT:
75
7.93M
            *i = num->value.i;
76
7.93M
            break;
77
2.51k
        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.51k
            tmp = (int64_t)num->value.d;
84
2.51k
            if ((double)tmp != num->value.d) {
85
21
                return_error(gs_error_typecheck);
86
21
            }
87
2.49k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.49k
            *i = tmp;
89
2.49k
            break;
90
824
        default:
91
824
            return_error(gs_error_typecheck);
92
7.93M
    }
93
94
7.93M
    return 0;
95
7.93M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
87.1k
{
70
87.1k
    pdf_num *num = (pdf_num *)obj;
71
87.1k
    int64_t tmp;
72
73
87.1k
    switch (pdfi_type_of(num)) {
74
87.0k
        case PDF_INT:
75
87.0k
            *i = num->value.i;
76
87.0k
            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
91
        default:
91
91
            return_error(gs_error_typecheck);
92
87.1k
    }
93
94
87.0k
    return 0;
95
87.1k
}
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.16M
{
70
3.16M
    pdf_num *num = (pdf_num *)obj;
71
3.16M
    int64_t tmp;
72
73
3.16M
    switch (pdfi_type_of(num)) {
74
3.11M
        case PDF_INT:
75
3.11M
            *i = num->value.i;
76
3.11M
            break;
77
27.0k
        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
27.0k
            tmp = (int64_t)num->value.d;
84
27.0k
            if ((double)tmp != num->value.d) {
85
17.6k
                return_error(gs_error_typecheck);
86
17.6k
            }
87
9.41k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
9.41k
            *i = tmp;
89
9.41k
            break;
90
24.4k
        default:
91
24.4k
            return_error(gs_error_typecheck);
92
3.16M
    }
93
94
3.12M
    return 0;
95
3.16M
}
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
50.6k
{
101
50.6k
    pdf_buffer *b = (pdf_buffer *)o;
102
50.6k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
50.6k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
50.6k
    b->data = data;
110
50.6k
    b->length = length;
111
50.6k
    return 0;
112
50.6k
}
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
21
{
101
21
    pdf_buffer *b = (pdf_buffer *)o;
102
21
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
21
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
21
    b->data = data;
110
21
    b->length = length;
111
21
    return 0;
112
21
}
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
30.6k
{
101
30.6k
    pdf_buffer *b = (pdf_buffer *)o;
102
30.6k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
30.6k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
30.6k
    b->data = data;
110
30.6k
    b->length = length;
111
30.6k
    return 0;
112
30.6k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
19.9k
{
101
19.9k
    pdf_buffer *b = (pdf_buffer *)o;
102
19.9k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
19.9k
    if (b->data) {
107
0
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
19.9k
    b->data = data;
110
19.9k
    b->length = length;
111
19.9k
    return 0;
112
19.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