Coverage Report

Created: 2026-07-24 07:44

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
159M
{
32
159M
    pdf_num *num = (pdf_num *)obj;
33
34
159M
    switch (pdfi_type_of(num)) {
35
49.2M
        case PDF_INT:
36
49.2M
            *d = (double)num->value.i;
37
49.2M
            break;
38
109M
        case PDF_REAL:
39
109M
            *d = num->value.d;
40
109M
            break;
41
247k
        default:
42
247k
            return_error(gs_error_typecheck);
43
159M
    }
44
45
159M
    return 0;
46
159M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
259k
{
32
259k
    pdf_num *num = (pdf_num *)obj;
33
34
259k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
259k
        case PDF_REAL:
39
259k
            *d = num->value.d;
40
259k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
259k
    }
44
45
259k
    return 0;
46
259k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
1.70M
{
32
1.70M
    pdf_num *num = (pdf_num *)obj;
33
34
1.70M
    switch (pdfi_type_of(num)) {
35
1.48M
        case PDF_INT:
36
1.48M
            *d = (double)num->value.i;
37
1.48M
            break;
38
215k
        case PDF_REAL:
39
215k
            *d = num->value.d;
40
215k
            break;
41
83
        default:
42
83
            return_error(gs_error_typecheck);
43
1.70M
    }
44
45
1.70M
    return 0;
46
1.70M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
16.7M
{
32
16.7M
    pdf_num *num = (pdf_num *)obj;
33
34
16.7M
    switch (pdfi_type_of(num)) {
35
14.4M
        case PDF_INT:
36
14.4M
            *d = (double)num->value.i;
37
14.4M
            break;
38
2.35M
        case PDF_REAL:
39
2.35M
            *d = num->value.d;
40
2.35M
            break;
41
1.01k
        default:
42
1.01k
            return_error(gs_error_typecheck);
43
16.7M
    }
44
45
16.7M
    return 0;
46
16.7M
}
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
26.0M
        case PDF_INT:
36
26.0M
            *d = (double)num->value.i;
37
26.0M
            break;
38
102M
        case PDF_REAL:
39
102M
            *d = num->value.d;
40
102M
            break;
41
243k
        default:
42
243k
            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
643k
{
32
643k
    pdf_num *num = (pdf_num *)obj;
33
34
643k
    switch (pdfi_type_of(num)) {
35
386k
        case PDF_INT:
36
386k
            *d = (double)num->value.i;
37
386k
            break;
38
256k
        case PDF_REAL:
39
256k
            *d = num->value.d;
40
256k
            break;
41
208
        default:
42
208
            return_error(gs_error_typecheck);
43
643k
    }
44
45
643k
    return 0;
46
643k
}
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
1.23M
{
32
1.23M
    pdf_num *num = (pdf_num *)obj;
33
34
1.23M
    switch (pdfi_type_of(num)) {
35
736k
        case PDF_INT:
36
736k
            *d = (double)num->value.i;
37
736k
            break;
38
494k
        case PDF_REAL:
39
494k
            *d = num->value.d;
40
494k
            break;
41
2.95k
        default:
42
2.95k
            return_error(gs_error_typecheck);
43
1.23M
    }
44
45
1.23M
    return 0;
46
1.23M
}
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
10.3M
{
32
10.3M
    pdf_num *num = (pdf_num *)obj;
33
34
10.3M
    switch (pdfi_type_of(num)) {
35
6.08M
        case PDF_INT:
36
6.08M
            *d = (double)num->value.i;
37
6.08M
            break;
38
4.27M
        case PDF_REAL:
39
4.27M
            *d = num->value.d;
40
4.27M
            break;
41
98
        default:
42
98
            return_error(gs_error_typecheck);
43
10.3M
    }
44
45
10.3M
    return 0;
46
10.3M
}
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
9.68M
{
51
9.68M
    pdf_num *num = (pdf_num *)obj;
52
53
9.68M
    switch (pdfi_type_of(num)) {
54
4.10M
        case PDF_INT:
55
4.10M
            *f = (float)num->value.i;
56
4.10M
            break;
57
5.56M
        case PDF_REAL:
58
5.56M
            *f = (float)num->value.d;
59
5.56M
            break;
60
17.6k
        default:
61
17.6k
            return_error(gs_error_typecheck);
62
9.68M
    }
63
64
9.66M
    return 0;
65
9.68M
}
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
539k
{
51
539k
    pdf_num *num = (pdf_num *)obj;
52
53
539k
    switch (pdfi_type_of(num)) {
54
224k
        case PDF_INT:
55
224k
            *f = (float)num->value.i;
56
224k
            break;
57
304k
        case PDF_REAL:
58
304k
            *f = (float)num->value.d;
59
304k
            break;
60
11.4k
        default:
61
11.4k
            return_error(gs_error_typecheck);
62
539k
    }
63
64
528k
    return 0;
65
539k
}
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
9.14M
{
51
9.14M
    pdf_num *num = (pdf_num *)obj;
52
53
9.14M
    switch (pdfi_type_of(num)) {
54
3.87M
        case PDF_INT:
55
3.87M
            *f = (float)num->value.i;
56
3.87M
            break;
57
5.25M
        case PDF_REAL:
58
5.25M
            *f = (float)num->value.d;
59
5.25M
            break;
60
6.17k
        default:
61
6.17k
            return_error(gs_error_typecheck);
62
9.14M
    }
63
64
9.13M
    return 0;
65
9.14M
}
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
8.22M
{
70
8.22M
    pdf_num *num = (pdf_num *)obj;
71
8.22M
    int64_t tmp;
72
73
8.22M
    switch (pdfi_type_of(num)) {
74
8.18M
        case PDF_INT:
75
8.18M
            *i = num->value.i;
76
8.18M
            break;
77
24.1k
        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.1k
            tmp = (int64_t)num->value.d;
84
24.1k
            if ((double)tmp != num->value.d) {
85
13.8k
                return_error(gs_error_typecheck);
86
13.8k
            }
87
10.2k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
10.2k
            *i = tmp;
89
10.2k
            break;
90
15.3k
        default:
91
15.3k
            return_error(gs_error_typecheck);
92
8.22M
    }
93
94
8.19M
    return 0;
95
8.22M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
542k
{
70
542k
    pdf_num *num = (pdf_num *)obj;
71
542k
    int64_t tmp;
72
73
542k
    switch (pdfi_type_of(num)) {
74
542k
        case PDF_INT:
75
542k
            *i = num->value.i;
76
542k
            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
542k
    }
93
94
542k
    return 0;
95
542k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.52M
{
70
5.52M
    pdf_num *num = (pdf_num *)obj;
71
5.52M
    int64_t tmp;
72
73
5.52M
    switch (pdfi_type_of(num)) {
74
5.51M
        case PDF_INT:
75
5.51M
            *i = num->value.i;
76
5.51M
            break;
77
2.45k
        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.45k
            tmp = (int64_t)num->value.d;
84
2.45k
            if ((double)tmp != num->value.d) {
85
18
                return_error(gs_error_typecheck);
86
18
            }
87
2.43k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.43k
            *i = tmp;
89
2.43k
            break;
90
608
        default:
91
608
            return_error(gs_error_typecheck);
92
5.52M
    }
93
94
5.52M
    return 0;
95
5.52M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
69.5k
{
70
69.5k
    pdf_num *num = (pdf_num *)obj;
71
69.5k
    int64_t tmp;
72
73
69.5k
    switch (pdfi_type_of(num)) {
74
69.5k
        case PDF_INT:
75
69.5k
            *i = num->value.i;
76
69.5k
            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
71
        default:
91
71
            return_error(gs_error_typecheck);
92
69.5k
    }
93
94
69.5k
    return 0;
95
69.5k
}
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.08M
{
70
2.08M
    pdf_num *num = (pdf_num *)obj;
71
2.08M
    int64_t tmp;
72
73
2.08M
    switch (pdfi_type_of(num)) {
74
2.05M
        case PDF_INT:
75
2.05M
            *i = num->value.i;
76
2.05M
            break;
77
21.7k
        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
21.7k
            tmp = (int64_t)num->value.d;
84
21.7k
            if ((double)tmp != num->value.d) {
85
13.8k
                return_error(gs_error_typecheck);
86
13.8k
            }
87
7.85k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
7.85k
            *i = tmp;
89
7.85k
            break;
90
14.6k
        default:
91
14.6k
            return_error(gs_error_typecheck);
92
2.08M
    }
93
94
2.05M
    return 0;
95
2.08M
}
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
38.5k
{
101
38.5k
    pdf_buffer *b = (pdf_buffer *)o;
102
38.5k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
38.5k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
38.5k
    b->data = data;
110
38.5k
    b->length = length;
111
38.5k
    return 0;
112
38.5k
}
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
14
{
101
14
    pdf_buffer *b = (pdf_buffer *)o;
102
14
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
14
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
14
    b->data = data;
110
14
    b->length = length;
111
14
    return 0;
112
14
}
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
22.9k
{
101
22.9k
    pdf_buffer *b = (pdf_buffer *)o;
102
22.9k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
22.9k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
22.9k
    b->data = data;
110
22.9k
    b->length = length;
111
22.9k
    return 0;
112
22.9k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
15.6k
{
101
15.6k
    pdf_buffer *b = (pdf_buffer *)o;
102
15.6k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
15.6k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
15.6k
    b->data = data;
110
15.6k
    b->length = length;
111
15.6k
    return 0;
112
15.6k
}
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