Coverage Report

Created: 2026-04-09 07:06

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
162M
{
32
162M
    pdf_num *num = (pdf_num *)obj;
33
34
162M
    switch (pdfi_type_of(num)) {
35
43.9M
        case PDF_INT:
36
43.9M
            *d = (double)num->value.i;
37
43.9M
            break;
38
118M
        case PDF_REAL:
39
118M
            *d = num->value.d;
40
118M
            break;
41
228k
        default:
42
228k
            return_error(gs_error_typecheck);
43
162M
    }
44
45
162M
    return 0;
46
162M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
257k
{
32
257k
    pdf_num *num = (pdf_num *)obj;
33
34
257k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
257k
        case PDF_REAL:
39
257k
            *d = num->value.d;
40
257k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
257k
    }
44
45
257k
    return 0;
46
257k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
1.72M
{
32
1.72M
    pdf_num *num = (pdf_num *)obj;
33
34
1.72M
    switch (pdfi_type_of(num)) {
35
1.44M
        case PDF_INT:
36
1.44M
            *d = (double)num->value.i;
37
1.44M
            break;
38
277k
        case PDF_REAL:
39
277k
            *d = num->value.d;
40
277k
            break;
41
85
        default:
42
85
            return_error(gs_error_typecheck);
43
1.72M
    }
44
45
1.72M
    return 0;
46
1.72M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
15.7M
{
32
15.7M
    pdf_num *num = (pdf_num *)obj;
33
34
15.7M
    switch (pdfi_type_of(num)) {
35
12.9M
        case PDF_INT:
36
12.9M
            *d = (double)num->value.i;
37
12.9M
            break;
38
2.80M
        case PDF_REAL:
39
2.80M
            *d = num->value.d;
40
2.80M
            break;
41
965
        default:
42
965
            return_error(gs_error_typecheck);
43
15.7M
    }
44
45
15.7M
    return 0;
46
15.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
134M
{
32
134M
    pdf_num *num = (pdf_num *)obj;
33
34
134M
    switch (pdfi_type_of(num)) {
35
24.4M
        case PDF_INT:
36
24.4M
            *d = (double)num->value.i;
37
24.4M
            break;
38
110M
        case PDF_REAL:
39
110M
            *d = num->value.d;
40
110M
            break;
41
224k
        default:
42
224k
            return_error(gs_error_typecheck);
43
134M
    }
44
45
134M
    return 0;
46
134M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
620k
{
32
620k
    pdf_num *num = (pdf_num *)obj;
33
34
620k
    switch (pdfi_type_of(num)) {
35
365k
        case PDF_INT:
36
365k
            *d = (double)num->value.i;
37
365k
            break;
38
255k
        case PDF_REAL:
39
255k
            *d = num->value.d;
40
255k
            break;
41
196
        default:
42
196
            return_error(gs_error_typecheck);
43
620k
    }
44
45
620k
    return 0;
46
620k
}
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.09M
{
32
1.09M
    pdf_num *num = (pdf_num *)obj;
33
34
1.09M
    switch (pdfi_type_of(num)) {
35
681k
        case PDF_INT:
36
681k
            *d = (double)num->value.i;
37
681k
            break;
38
413k
        case PDF_REAL:
39
413k
            *d = num->value.d;
40
413k
            break;
41
2.54k
        default:
42
2.54k
            return_error(gs_error_typecheck);
43
1.09M
    }
44
45
1.09M
    return 0;
46
1.09M
}
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.13M
{
32
8.13M
    pdf_num *num = (pdf_num *)obj;
33
34
8.13M
    switch (pdfi_type_of(num)) {
35
4.04M
        case PDF_INT:
36
4.04M
            *d = (double)num->value.i;
37
4.04M
            break;
38
4.09M
        case PDF_REAL:
39
4.09M
            *d = num->value.d;
40
4.09M
            break;
41
94
        default:
42
94
            return_error(gs_error_typecheck);
43
8.13M
    }
44
45
8.13M
    return 0;
46
8.13M
}
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.48M
{
51
9.48M
    pdf_num *num = (pdf_num *)obj;
52
53
9.48M
    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.59M
        case PDF_REAL:
58
5.59M
            *f = (float)num->value.d;
59
5.59M
            break;
60
16.5k
        default:
61
16.5k
            return_error(gs_error_typecheck);
62
9.48M
    }
63
64
9.46M
    return 0;
65
9.48M
}
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
502k
{
51
502k
    pdf_num *num = (pdf_num *)obj;
52
53
502k
    switch (pdfi_type_of(num)) {
54
204k
        case PDF_INT:
55
204k
            *f = (float)num->value.i;
56
204k
            break;
57
287k
        case PDF_REAL:
58
287k
            *f = (float)num->value.d;
59
287k
            break;
60
10.2k
        default:
61
10.2k
            return_error(gs_error_typecheck);
62
502k
    }
63
64
492k
    return 0;
65
502k
}
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.98M
{
51
8.98M
    pdf_num *num = (pdf_num *)obj;
52
53
8.98M
    switch (pdfi_type_of(num)) {
54
3.66M
        case PDF_INT:
55
3.66M
            *f = (float)num->value.i;
56
3.66M
            break;
57
5.30M
        case PDF_REAL:
58
5.30M
            *f = (float)num->value.d;
59
5.30M
            break;
60
6.28k
        default:
61
6.28k
            return_error(gs_error_typecheck);
62
8.98M
    }
63
64
8.97M
    return 0;
65
8.98M
}
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.57M
{
70
8.57M
    pdf_num *num = (pdf_num *)obj;
71
8.57M
    int64_t tmp;
72
73
8.57M
    switch (pdfi_type_of(num)) {
74
8.53M
        case PDF_INT:
75
8.53M
            *i = num->value.i;
76
8.53M
            break;
77
26.2k
        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
26.2k
            tmp = (int64_t)num->value.d;
84
26.2k
            if ((double)tmp != num->value.d) {
85
15.5k
                return_error(gs_error_typecheck);
86
15.5k
            }
87
10.7k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
10.7k
            *i = tmp;
89
10.7k
            break;
90
16.4k
        default:
91
16.4k
            return_error(gs_error_typecheck);
92
8.57M
    }
93
94
8.54M
    return 0;
95
8.57M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
516k
{
70
516k
    pdf_num *num = (pdf_num *)obj;
71
516k
    int64_t tmp;
72
73
516k
    switch (pdfi_type_of(num)) {
74
516k
        case PDF_INT:
75
516k
            *i = num->value.i;
76
516k
            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
516k
    }
93
94
516k
    return 0;
95
516k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.71M
{
70
5.71M
    pdf_num *num = (pdf_num *)obj;
71
5.71M
    int64_t tmp;
72
73
5.71M
    switch (pdfi_type_of(num)) {
74
5.70M
        case PDF_INT:
75
5.70M
            *i = num->value.i;
76
5.70M
            break;
77
2.25k
        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.25k
            tmp = (int64_t)num->value.d;
84
2.25k
            if ((double)tmp != num->value.d) {
85
10
                return_error(gs_error_typecheck);
86
10
            }
87
2.24k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.24k
            *i = tmp;
89
2.24k
            break;
90
603
        default:
91
603
            return_error(gs_error_typecheck);
92
5.71M
    }
93
94
5.71M
    return 0;
95
5.71M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
66.5k
{
70
66.5k
    pdf_num *num = (pdf_num *)obj;
71
66.5k
    int64_t tmp;
72
73
66.5k
    switch (pdfi_type_of(num)) {
74
66.4k
        case PDF_INT:
75
66.4k
            *i = num->value.i;
76
66.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
69
        default:
91
69
            return_error(gs_error_typecheck);
92
66.5k
    }
93
94
66.4k
    return 0;
95
66.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.28M
{
70
2.28M
    pdf_num *num = (pdf_num *)obj;
71
2.28M
    int64_t tmp;
72
73
2.28M
    switch (pdfi_type_of(num)) {
74
2.24M
        case PDF_INT:
75
2.24M
            *i = num->value.i;
76
2.24M
            break;
77
23.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
23.9k
            tmp = (int64_t)num->value.d;
84
23.9k
            if ((double)tmp != num->value.d) {
85
15.5k
                return_error(gs_error_typecheck);
86
15.5k
            }
87
8.45k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
8.45k
            *i = tmp;
89
8.45k
            break;
90
15.7k
        default:
91
15.7k
            return_error(gs_error_typecheck);
92
2.28M
    }
93
94
2.24M
    return 0;
95
2.28M
}
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
37.7k
{
101
37.7k
    pdf_buffer *b = (pdf_buffer *)o;
102
37.7k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
37.7k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
37.7k
    b->data = data;
110
37.7k
    b->length = length;
111
37.7k
    return 0;
112
37.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
13
{
101
13
    pdf_buffer *b = (pdf_buffer *)o;
102
13
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
13
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
13
    b->data = data;
110
13
    b->length = length;
111
13
    return 0;
112
13
}
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.5k
{
101
22.5k
    pdf_buffer *b = (pdf_buffer *)o;
102
22.5k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
22.5k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
22.5k
    b->data = data;
110
22.5k
    b->length = length;
111
22.5k
    return 0;
112
22.5k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
15.1k
{
101
15.1k
    pdf_buffer *b = (pdf_buffer *)o;
102
15.1k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
15.1k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
15.1k
    b->data = data;
110
15.1k
    b->length = length;
111
15.1k
    return 0;
112
15.1k
}
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