Coverage Report

Created: 2026-09-14 07:34

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
145M
{
32
145M
    pdf_num *num = (pdf_num *)obj;
33
34
145M
    switch (pdfi_type_of(num)) {
35
43.8M
        case PDF_INT:
36
43.8M
            *d = (double)num->value.i;
37
43.8M
            break;
38
101M
        case PDF_REAL:
39
101M
            *d = num->value.d;
40
101M
            break;
41
226k
        default:
42
226k
            return_error(gs_error_typecheck);
43
145M
    }
44
45
145M
    return 0;
46
145M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
239k
{
32
239k
    pdf_num *num = (pdf_num *)obj;
33
34
239k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
239k
        case PDF_REAL:
39
239k
            *d = num->value.d;
40
239k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
239k
    }
44
45
239k
    return 0;
46
239k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
1.54M
{
32
1.54M
    pdf_num *num = (pdf_num *)obj;
33
34
1.54M
    switch (pdfi_type_of(num)) {
35
1.35M
        case PDF_INT:
36
1.35M
            *d = (double)num->value.i;
37
1.35M
            break;
38
197k
        case PDF_REAL:
39
197k
            *d = num->value.d;
40
197k
            break;
41
75
        default:
42
75
            return_error(gs_error_typecheck);
43
1.54M
    }
44
45
1.54M
    return 0;
46
1.54M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
13.8M
{
32
13.8M
    pdf_num *num = (pdf_num *)obj;
33
34
13.8M
    switch (pdfi_type_of(num)) {
35
11.6M
        case PDF_INT:
36
11.6M
            *d = (double)num->value.i;
37
11.6M
            break;
38
2.13M
        case PDF_REAL:
39
2.13M
            *d = num->value.d;
40
2.13M
            break;
41
872
        default:
42
872
            return_error(gs_error_typecheck);
43
13.8M
    }
44
45
13.8M
    return 0;
46
13.8M
}
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
118M
{
32
118M
    pdf_num *num = (pdf_num *)obj;
33
34
118M
    switch (pdfi_type_of(num)) {
35
23.7M
        case PDF_INT:
36
23.7M
            *d = (double)num->value.i;
37
23.7M
            break;
38
94.4M
        case PDF_REAL:
39
94.4M
            *d = num->value.d;
40
94.4M
            break;
41
222k
        default:
42
222k
            return_error(gs_error_typecheck);
43
118M
    }
44
45
118M
    return 0;
46
118M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
588k
{
32
588k
    pdf_num *num = (pdf_num *)obj;
33
34
588k
    switch (pdfi_type_of(num)) {
35
351k
        case PDF_INT:
36
351k
            *d = (double)num->value.i;
37
351k
            break;
38
236k
        case PDF_REAL:
39
236k
            *d = num->value.d;
40
236k
            break;
41
183
        default:
42
183
            return_error(gs_error_typecheck);
43
588k
    }
44
45
587k
    return 0;
46
588k
}
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.15M
{
32
1.15M
    pdf_num *num = (pdf_num *)obj;
33
34
1.15M
    switch (pdfi_type_of(num)) {
35
684k
        case PDF_INT:
36
684k
            *d = (double)num->value.i;
37
684k
            break;
38
468k
        case PDF_REAL:
39
468k
            *d = num->value.d;
40
468k
            break;
41
2.50k
        default:
42
2.50k
            return_error(gs_error_typecheck);
43
1.15M
    }
44
45
1.15M
    return 0;
46
1.15M
}
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.0M
{
32
10.0M
    pdf_num *num = (pdf_num *)obj;
33
34
10.0M
    switch (pdfi_type_of(num)) {
35
6.05M
        case PDF_INT:
36
6.05M
            *d = (double)num->value.i;
37
6.05M
            break;
38
4.00M
        case PDF_REAL:
39
4.00M
            *d = num->value.d;
40
4.00M
            break;
41
87
        default:
42
87
            return_error(gs_error_typecheck);
43
10.0M
    }
44
45
10.0M
    return 0;
46
10.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
9.16M
{
51
9.16M
    pdf_num *num = (pdf_num *)obj;
52
53
9.16M
    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.28M
        case PDF_REAL:
58
5.28M
            *f = (float)num->value.d;
59
5.28M
            break;
60
15.8k
        default:
61
15.8k
            return_error(gs_error_typecheck);
62
9.16M
    }
63
64
9.15M
    return 0;
65
9.16M
}
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
221k
        case PDF_INT:
55
221k
            *f = (float)num->value.i;
56
221k
            break;
57
308k
        case PDF_REAL:
58
308k
            *f = (float)num->value.d;
59
308k
            break;
60
9.91k
        default:
61
9.91k
            return_error(gs_error_typecheck);
62
539k
    }
63
64
529k
    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
8.62M
{
51
8.62M
    pdf_num *num = (pdf_num *)obj;
52
53
8.62M
    switch (pdfi_type_of(num)) {
54
3.64M
        case PDF_INT:
55
3.64M
            *f = (float)num->value.i;
56
3.64M
            break;
57
4.97M
        case PDF_REAL:
58
4.97M
            *f = (float)num->value.d;
59
4.97M
            break;
60
5.96k
        default:
61
5.96k
            return_error(gs_error_typecheck);
62
8.62M
    }
63
64
8.62M
    return 0;
65
8.62M
}
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
7.58M
{
70
7.58M
    pdf_num *num = (pdf_num *)obj;
71
7.58M
    int64_t tmp;
72
73
7.58M
    switch (pdfi_type_of(num)) {
74
7.54M
        case PDF_INT:
75
7.54M
            *i = num->value.i;
76
7.54M
            break;
77
23.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
23.7k
            tmp = (int64_t)num->value.d;
84
23.7k
            if ((double)tmp != num->value.d) {
85
13.9k
                return_error(gs_error_typecheck);
86
13.9k
            }
87
9.87k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
9.87k
            *i = tmp;
89
9.87k
            break;
90
14.1k
        default:
91
14.1k
            return_error(gs_error_typecheck);
92
7.58M
    }
93
94
7.55M
    return 0;
95
7.58M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
497k
{
70
497k
    pdf_num *num = (pdf_num *)obj;
71
497k
    int64_t tmp;
72
73
497k
    switch (pdfi_type_of(num)) {
74
497k
        case PDF_INT:
75
497k
            *i = num->value.i;
76
497k
            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
497k
    }
93
94
497k
    return 0;
95
497k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.00M
{
70
5.00M
    pdf_num *num = (pdf_num *)obj;
71
5.00M
    int64_t tmp;
72
73
5.00M
    switch (pdfi_type_of(num)) {
74
5.00M
        case PDF_INT:
75
5.00M
            *i = num->value.i;
76
5.00M
            break;
77
2.08k
        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.08k
            tmp = (int64_t)num->value.d;
84
2.08k
            if ((double)tmp != num->value.d) {
85
10
                return_error(gs_error_typecheck);
86
10
            }
87
2.07k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.07k
            *i = tmp;
89
2.07k
            break;
90
564
        default:
91
564
            return_error(gs_error_typecheck);
92
5.00M
    }
93
94
5.00M
    return 0;
95
5.00M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
63.7k
{
70
63.7k
    pdf_num *num = (pdf_num *)obj;
71
63.7k
    int64_t tmp;
72
73
63.7k
    switch (pdfi_type_of(num)) {
74
63.7k
        case PDF_INT:
75
63.7k
            *i = num->value.i;
76
63.7k
            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
81
        default:
91
81
            return_error(gs_error_typecheck);
92
63.7k
    }
93
94
63.7k
    return 0;
95
63.7k
}
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.01M
{
70
2.01M
    pdf_num *num = (pdf_num *)obj;
71
2.01M
    int64_t tmp;
72
73
2.01M
    switch (pdfi_type_of(num)) {
74
1.98M
        case PDF_INT:
75
1.98M
            *i = num->value.i;
76
1.98M
            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.9k
                return_error(gs_error_typecheck);
86
13.9k
            }
87
7.80k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
7.80k
            *i = tmp;
89
7.80k
            break;
90
13.4k
        default:
91
13.4k
            return_error(gs_error_typecheck);
92
2.01M
    }
93
94
1.98M
    return 0;
95
2.01M
}
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
35.5k
{
101
35.5k
    pdf_buffer *b = (pdf_buffer *)o;
102
35.5k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
35.5k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
35.5k
    b->data = data;
110
35.5k
    b->length = length;
111
35.5k
    return 0;
112
35.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
21.0k
{
101
21.0k
    pdf_buffer *b = (pdf_buffer *)o;
102
21.0k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
21.0k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
21.0k
    b->data = data;
110
21.0k
    b->length = length;
111
21.0k
    return 0;
112
21.0k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
14.4k
{
101
14.4k
    pdf_buffer *b = (pdf_buffer *)o;
102
14.4k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
14.4k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
14.4k
    b->data = data;
110
14.4k
    b->length = length;
111
14.4k
    return 0;
112
14.4k
}
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