Coverage Report

Created: 2026-04-01 07:17

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
152M
{
32
152M
    pdf_num *num = (pdf_num *)obj;
33
34
152M
    switch (pdfi_type_of(num)) {
35
48.8M
        case PDF_INT:
36
48.8M
            *d = (double)num->value.i;
37
48.8M
            break;
38
103M
        case PDF_REAL:
39
103M
            *d = num->value.d;
40
103M
            break;
41
228k
        default:
42
228k
            return_error(gs_error_typecheck);
43
152M
    }
44
45
152M
    return 0;
46
152M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
274k
{
32
274k
    pdf_num *num = (pdf_num *)obj;
33
34
274k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
274k
        case PDF_REAL:
39
274k
            *d = num->value.d;
40
274k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
274k
    }
44
45
274k
    return 0;
46
274k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
1.80M
{
32
1.80M
    pdf_num *num = (pdf_num *)obj;
33
34
1.80M
    switch (pdfi_type_of(num)) {
35
1.59M
        case PDF_INT:
36
1.59M
            *d = (double)num->value.i;
37
1.59M
            break;
38
204k
        case PDF_REAL:
39
204k
            *d = num->value.d;
40
204k
            break;
41
95
        default:
42
95
            return_error(gs_error_typecheck);
43
1.80M
    }
44
45
1.80M
    return 0;
46
1.80M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
16.8M
{
32
16.8M
    pdf_num *num = (pdf_num *)obj;
33
34
16.8M
    switch (pdfi_type_of(num)) {
35
14.5M
        case PDF_INT:
36
14.5M
            *d = (double)num->value.i;
37
14.5M
            break;
38
2.24M
        case PDF_REAL:
39
2.24M
            *d = num->value.d;
40
2.24M
            break;
41
1.20k
        default:
42
1.20k
            return_error(gs_error_typecheck);
43
16.8M
    }
44
45
16.8M
    return 0;
46
16.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
122M
{
32
122M
    pdf_num *num = (pdf_num *)obj;
33
34
122M
    switch (pdfi_type_of(num)) {
35
27.0M
        case PDF_INT:
36
27.0M
            *d = (double)num->value.i;
37
27.0M
            break;
38
95.7M
        case PDF_REAL:
39
95.7M
            *d = num->value.d;
40
95.7M
            break;
41
223k
        default:
42
223k
            return_error(gs_error_typecheck);
43
122M
    }
44
45
122M
    return 0;
46
122M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
665k
{
32
665k
    pdf_num *num = (pdf_num *)obj;
33
34
665k
    switch (pdfi_type_of(num)) {
35
394k
        case PDF_INT:
36
394k
            *d = (double)num->value.i;
37
394k
            break;
38
271k
        case PDF_REAL:
39
271k
            *d = num->value.d;
40
271k
            break;
41
236
        default:
42
236
            return_error(gs_error_typecheck);
43
665k
    }
44
45
665k
    return 0;
46
665k
}
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.21M
{
32
1.21M
    pdf_num *num = (pdf_num *)obj;
33
34
1.21M
    switch (pdfi_type_of(num)) {
35
760k
        case PDF_INT:
36
760k
            *d = (double)num->value.i;
37
760k
            break;
38
451k
        case PDF_REAL:
39
451k
            *d = num->value.d;
40
451k
            break;
41
2.86k
        default:
42
2.86k
            return_error(gs_error_typecheck);
43
1.21M
    }
44
45
1.21M
    return 0;
46
1.21M
}
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
8.74M
{
32
8.74M
    pdf_num *num = (pdf_num *)obj;
33
34
8.74M
    switch (pdfi_type_of(num)) {
35
4.47M
        case PDF_INT:
36
4.47M
            *d = (double)num->value.i;
37
4.47M
            break;
38
4.26M
        case PDF_REAL:
39
4.26M
            *d = num->value.d;
40
4.26M
            break;
41
107
        default:
42
107
            return_error(gs_error_typecheck);
43
8.74M
    }
44
45
8.74M
    return 0;
46
8.74M
}
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
10.1M
{
51
10.1M
    pdf_num *num = (pdf_num *)obj;
52
53
10.1M
    switch (pdfi_type_of(num)) {
54
4.15M
        case PDF_INT:
55
4.15M
            *f = (float)num->value.i;
56
4.15M
            break;
57
5.97M
        case PDF_REAL:
58
5.97M
            *f = (float)num->value.d;
59
5.97M
            break;
60
18.5k
        default:
61
18.5k
            return_error(gs_error_typecheck);
62
10.1M
    }
63
64
10.1M
    return 0;
65
10.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
539k
{
51
539k
    pdf_num *num = (pdf_num *)obj;
52
53
539k
    switch (pdfi_type_of(num)) {
54
216k
        case PDF_INT:
55
216k
            *f = (float)num->value.i;
56
216k
            break;
57
311k
        case PDF_REAL:
58
311k
            *f = (float)num->value.d;
59
311k
            break;
60
11.8k
        default:
61
11.8k
            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.61M
{
51
9.61M
    pdf_num *num = (pdf_num *)obj;
52
53
9.61M
    switch (pdfi_type_of(num)) {
54
3.94M
        case PDF_INT:
55
3.94M
            *f = (float)num->value.i;
56
3.94M
            break;
57
5.66M
        case PDF_REAL:
58
5.66M
            *f = (float)num->value.d;
59
5.66M
            break;
60
6.76k
        default:
61
6.76k
            return_error(gs_error_typecheck);
62
9.61M
    }
63
64
9.60M
    return 0;
65
9.61M
}
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.45M
{
70
8.45M
    pdf_num *num = (pdf_num *)obj;
71
8.45M
    int64_t tmp;
72
73
8.45M
    switch (pdfi_type_of(num)) {
74
8.40M
        case PDF_INT:
75
8.40M
            *i = num->value.i;
76
8.40M
            break;
77
28.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
28.0k
            tmp = (int64_t)num->value.d;
84
28.0k
            if ((double)tmp != num->value.d) {
85
16.5k
                return_error(gs_error_typecheck);
86
16.5k
            }
87
11.5k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
11.5k
            *i = tmp;
89
11.5k
            break;
90
16.7k
        default:
91
16.7k
            return_error(gs_error_typecheck);
92
8.45M
    }
93
94
8.41M
    return 0;
95
8.45M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
557k
{
70
557k
    pdf_num *num = (pdf_num *)obj;
71
557k
    int64_t tmp;
72
73
557k
    switch (pdfi_type_of(num)) {
74
557k
        case PDF_INT:
75
557k
            *i = num->value.i;
76
557k
            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
557k
    }
93
94
557k
    return 0;
95
557k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.35M
{
70
5.35M
    pdf_num *num = (pdf_num *)obj;
71
5.35M
    int64_t tmp;
72
73
5.35M
    switch (pdfi_type_of(num)) {
74
5.35M
        case PDF_INT:
75
5.35M
            *i = num->value.i;
76
5.35M
            break;
77
2.59k
        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.59k
            tmp = (int64_t)num->value.d;
84
2.59k
            if ((double)tmp != num->value.d) {
85
19
                return_error(gs_error_typecheck);
86
19
            }
87
2.57k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.57k
            *i = tmp;
89
2.57k
            break;
90
664
        default:
91
664
            return_error(gs_error_typecheck);
92
5.35M
    }
93
94
5.35M
    return 0;
95
5.35M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
70.5k
{
70
70.5k
    pdf_num *num = (pdf_num *)obj;
71
70.5k
    int64_t tmp;
72
73
70.5k
    switch (pdfi_type_of(num)) {
74
70.4k
        case PDF_INT:
75
70.4k
            *i = num->value.i;
76
70.4k
            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
70.5k
    }
93
94
70.4k
    return 0;
95
70.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.46M
{
70
2.46M
    pdf_num *num = (pdf_num *)obj;
71
2.46M
    int64_t tmp;
72
73
2.46M
    switch (pdfi_type_of(num)) {
74
2.42M
        case PDF_INT:
75
2.42M
            *i = num->value.i;
76
2.42M
            break;
77
25.4k
        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
25.4k
            tmp = (int64_t)num->value.d;
84
25.4k
            if ((double)tmp != num->value.d) {
85
16.5k
                return_error(gs_error_typecheck);
86
16.5k
            }
87
8.93k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
8.93k
            *i = tmp;
89
8.93k
            break;
90
16.0k
        default:
91
16.0k
            return_error(gs_error_typecheck);
92
2.46M
    }
93
94
2.43M
    return 0;
95
2.46M
}
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
39.7k
{
101
39.7k
    pdf_buffer *b = (pdf_buffer *)o;
102
39.7k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
39.7k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
39.7k
    b->data = data;
110
39.7k
    b->length = length;
111
39.7k
    return 0;
112
39.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
16
{
101
16
    pdf_buffer *b = (pdf_buffer *)o;
102
16
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
16
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
16
    b->data = data;
110
16
    b->length = length;
111
16
    return 0;
112
16
}
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.1k
{
101
23.1k
    pdf_buffer *b = (pdf_buffer *)o;
102
23.1k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
23.1k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
23.1k
    b->data = data;
110
23.1k
    b->length = length;
111
23.1k
    return 0;
112
23.1k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
16.5k
{
101
16.5k
    pdf_buffer *b = (pdf_buffer *)o;
102
16.5k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
16.5k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
16.5k
    b->data = data;
110
16.5k
    b->length = length;
111
16.5k
    return 0;
112
16.5k
}
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