Coverage Report

Created: 2026-02-14 07:09

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
154M
{
32
154M
    pdf_num *num = (pdf_num *)obj;
33
34
154M
    switch (pdfi_type_of(num)) {
35
50.5M
        case PDF_INT:
36
50.5M
            *d = (double)num->value.i;
37
50.5M
            break;
38
103M
        case PDF_REAL:
39
103M
            *d = num->value.d;
40
103M
            break;
41
250k
        default:
42
250k
            return_error(gs_error_typecheck);
43
154M
    }
44
45
154M
    return 0;
46
154M
}
zpdfops.c:pdfi_obj_to_real
Line
Count
Source
31
297k
{
32
297k
    pdf_num *num = (pdf_num *)obj;
33
34
297k
    switch (pdfi_type_of(num)) {
35
0
        case PDF_INT:
36
0
            *d = (double)num->value.i;
37
0
            break;
38
297k
        case PDF_REAL:
39
297k
            *d = num->value.d;
40
297k
            break;
41
0
        default:
42
0
            return_error(gs_error_typecheck);
43
297k
    }
44
45
297k
    return 0;
46
297k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_real
pdf_dict.c:pdfi_obj_to_real
Line
Count
Source
31
1.89M
{
32
1.89M
    pdf_num *num = (pdf_num *)obj;
33
34
1.89M
    switch (pdfi_type_of(num)) {
35
1.70M
        case PDF_INT:
36
1.70M
            *d = (double)num->value.i;
37
1.70M
            break;
38
193k
        case PDF_REAL:
39
193k
            *d = num->value.d;
40
193k
            break;
41
112
        default:
42
112
            return_error(gs_error_typecheck);
43
1.89M
    }
44
45
1.89M
    return 0;
46
1.89M
}
pdf_array.c:pdfi_obj_to_real
Line
Count
Source
31
17.4M
{
32
17.4M
    pdf_num *num = (pdf_num *)obj;
33
34
17.4M
    switch (pdfi_type_of(num)) {
35
15.2M
        case PDF_INT:
36
15.2M
            *d = (double)num->value.i;
37
15.2M
            break;
38
2.22M
        case PDF_REAL:
39
2.22M
            *d = num->value.d;
40
2.22M
            break;
41
1.28k
        default:
42
1.28k
            return_error(gs_error_typecheck);
43
17.4M
    }
44
45
17.4M
    return 0;
46
17.4M
}
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
123M
{
32
123M
    pdf_num *num = (pdf_num *)obj;
33
34
123M
    switch (pdfi_type_of(num)) {
35
27.7M
        case PDF_INT:
36
27.7M
            *d = (double)num->value.i;
37
27.7M
            break;
38
95.9M
        case PDF_REAL:
39
95.9M
            *d = num->value.d;
40
95.9M
            break;
41
246k
        default:
42
246k
            return_error(gs_error_typecheck);
43
123M
    }
44
45
123M
    return 0;
46
123M
}
Unexecuted instantiation: pdf_image.c:pdfi_obj_to_real
pdf_page.c:pdfi_obj_to_real
Line
Count
Source
31
702k
{
32
702k
    pdf_num *num = (pdf_num *)obj;
33
34
702k
    switch (pdfi_type_of(num)) {
35
407k
        case PDF_INT:
36
407k
            *d = (double)num->value.i;
37
407k
            break;
38
294k
        case PDF_REAL:
39
294k
            *d = num->value.d;
40
294k
            break;
41
252
        default:
42
252
            return_error(gs_error_typecheck);
43
702k
    }
44
45
701k
    return 0;
46
702k
}
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.25M
{
32
1.25M
    pdf_num *num = (pdf_num *)obj;
33
34
1.25M
    switch (pdfi_type_of(num)) {
35
795k
        case PDF_INT:
36
795k
            *d = (double)num->value.i;
37
795k
            break;
38
452k
        case PDF_REAL:
39
452k
            *d = num->value.d;
40
452k
            break;
41
3.06k
        default:
42
3.06k
            return_error(gs_error_typecheck);
43
1.25M
    }
44
45
1.24M
    return 0;
46
1.25M
}
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.90M
{
32
8.90M
    pdf_num *num = (pdf_num *)obj;
33
34
8.90M
    switch (pdfi_type_of(num)) {
35
4.61M
        case PDF_INT:
36
4.61M
            *d = (double)num->value.i;
37
4.61M
            break;
38
4.29M
        case PDF_REAL:
39
4.29M
            *d = num->value.d;
40
4.29M
            break;
41
125
        default:
42
125
            return_error(gs_error_typecheck);
43
8.90M
    }
44
45
8.90M
    return 0;
46
8.90M
}
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.4M
{
51
10.4M
    pdf_num *num = (pdf_num *)obj;
52
53
10.4M
    switch (pdfi_type_of(num)) {
54
4.28M
        case PDF_INT:
55
4.28M
            *f = (float)num->value.i;
56
4.28M
            break;
57
6.16M
        case PDF_REAL:
58
6.16M
            *f = (float)num->value.d;
59
6.16M
            break;
60
19.9k
        default:
61
19.9k
            return_error(gs_error_typecheck);
62
10.4M
    }
63
64
10.4M
    return 0;
65
10.4M
}
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
552k
{
51
552k
    pdf_num *num = (pdf_num *)obj;
52
53
552k
    switch (pdfi_type_of(num)) {
54
220k
        case PDF_INT:
55
220k
            *f = (float)num->value.i;
56
220k
            break;
57
319k
        case PDF_REAL:
58
319k
            *f = (float)num->value.d;
59
319k
            break;
60
12.8k
        default:
61
12.8k
            return_error(gs_error_typecheck);
62
552k
    }
63
64
539k
    return 0;
65
552k
}
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.91M
{
51
9.91M
    pdf_num *num = (pdf_num *)obj;
52
53
9.91M
    switch (pdfi_type_of(num)) {
54
4.06M
        case PDF_INT:
55
4.06M
            *f = (float)num->value.i;
56
4.06M
            break;
57
5.84M
        case PDF_REAL:
58
5.84M
            *f = (float)num->value.d;
59
5.84M
            break;
60
7.11k
        default:
61
7.11k
            return_error(gs_error_typecheck);
62
9.91M
    }
63
64
9.90M
    return 0;
65
9.91M
}
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.65M
{
70
8.65M
    pdf_num *num = (pdf_num *)obj;
71
8.65M
    int64_t tmp;
72
73
8.65M
    switch (pdfi_type_of(num)) {
74
8.60M
        case PDF_INT:
75
8.60M
            *i = num->value.i;
76
8.60M
            break;
77
29.3k
        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.3k
            tmp = (int64_t)num->value.d;
84
29.3k
            if ((double)tmp != num->value.d) {
85
17.2k
                return_error(gs_error_typecheck);
86
17.2k
            }
87
12.0k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
12.0k
            *i = tmp;
89
12.0k
            break;
90
19.3k
        default:
91
19.3k
            return_error(gs_error_typecheck);
92
8.65M
    }
93
94
8.61M
    return 0;
95
8.65M
}
zpdfops.c:pdfi_obj_to_int
Line
Count
Source
69
579k
{
70
579k
    pdf_num *num = (pdf_num *)obj;
71
579k
    int64_t tmp;
72
73
579k
    switch (pdfi_type_of(num)) {
74
579k
        case PDF_INT:
75
579k
            *i = num->value.i;
76
579k
            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
579k
    }
93
94
579k
    return 0;
95
579k
}
Unexecuted instantiation: ghostpdf.c:pdfi_obj_to_int
pdf_dict.c:pdfi_obj_to_int
Line
Count
Source
69
5.33M
{
70
5.33M
    pdf_num *num = (pdf_num *)obj;
71
5.33M
    int64_t tmp;
72
73
5.33M
    switch (pdfi_type_of(num)) {
74
5.33M
        case PDF_INT:
75
5.33M
            *i = num->value.i;
76
5.33M
            break;
77
2.82k
        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.82k
            tmp = (int64_t)num->value.d;
84
2.82k
            if ((double)tmp != num->value.d) {
85
23
                return_error(gs_error_typecheck);
86
23
            }
87
2.80k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
2.80k
            *i = tmp;
89
2.80k
            break;
90
648
        default:
91
648
            return_error(gs_error_typecheck);
92
5.33M
    }
93
94
5.33M
    return 0;
95
5.33M
}
pdf_array.c:pdfi_obj_to_int
Line
Count
Source
69
75.4k
{
70
75.4k
    pdf_num *num = (pdf_num *)obj;
71
75.4k
    int64_t tmp;
72
73
75.4k
    switch (pdfi_type_of(num)) {
74
75.3k
        case PDF_INT:
75
75.3k
            *i = num->value.i;
76
75.3k
            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
94
        default:
91
94
            return_error(gs_error_typecheck);
92
75.4k
    }
93
94
75.3k
    return 0;
95
75.4k
}
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.66M
{
70
2.66M
    pdf_num *num = (pdf_num *)obj;
71
2.66M
    int64_t tmp;
72
73
2.66M
    switch (pdfi_type_of(num)) {
74
2.61M
        case PDF_INT:
75
2.61M
            *i = num->value.i;
76
2.61M
            break;
77
26.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
26.5k
            tmp = (int64_t)num->value.d;
84
26.5k
            if ((double)tmp != num->value.d) {
85
17.2k
                return_error(gs_error_typecheck);
86
17.2k
            }
87
9.26k
            pdfi_set_warning(ctx, 0, NULL, W_PDF_INT_AS_REAL, "pdfi_obj_to_int", NULL);
88
9.26k
            *i = tmp;
89
9.26k
            break;
90
18.6k
        default:
91
18.6k
            return_error(gs_error_typecheck);
92
2.66M
    }
93
94
2.62M
    return 0;
95
2.66M
}
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
42.3k
{
101
42.3k
    pdf_buffer *b = (pdf_buffer *)o;
102
42.3k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
42.3k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
42.3k
    b->data = data;
110
42.3k
    b->length = length;
111
42.3k
    return 0;
112
42.3k
}
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
18
{
101
18
    pdf_buffer *b = (pdf_buffer *)o;
102
18
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
18
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
18
    b->data = data;
110
18
    b->length = length;
111
18
    return 0;
112
18
}
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
24.4k
{
101
24.4k
    pdf_buffer *b = (pdf_buffer *)o;
102
24.4k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
24.4k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
24.4k
    b->data = data;
110
24.4k
    b->length = length;
111
24.4k
    return 0;
112
24.4k
}
pdf_font11.c:pdfi_buffer_set_data
Line
Count
Source
100
17.8k
{
101
17.8k
    pdf_buffer *b = (pdf_buffer *)o;
102
17.8k
    if (pdfi_type_of(b) != PDF_BUFFER) {
103
0
        return_error(gs_error_typecheck);
104
0
    }
105
106
17.8k
    if (b->data) {
107
        gs_free_object(OBJ_MEMORY(b), b->data, "pdfi_buffer_set_data(data)");
108
0
    }
109
17.8k
    b->data = data;
110
17.8k
    b->length = length;
111
17.8k
    return 0;
112
17.8k
}
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