~ubuntu-branches/ubuntu/intrepid/ecl/intrepid

« back to all changes in this revision

Viewing changes to src/c/typespec.d

  • Committer: Bazaar Package Importer
  • Author(s): Peter Van Eynde
  • Date: 2006-06-21 09:21:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621092121-txz1f21lj0wh0f67
Tags: 0.9h-20060617-1
* New upstream version
* Updated standards version without real changes. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
void
55
55
FEtype_error_proper_list(cl_object x) {
56
56
        cl_error(9, @'simple-type-error', @':format-control',
57
 
                    make_constant_string("Not a proper list ~D"),
 
57
                    make_constant_base_string("Not a proper list ~D"),
58
58
                    @':format-arguments', cl_list(1, x),
59
59
                    @':expected-type', c_string_to_object("si::proper-list"),
60
60
                    @':datum', x);
64
64
FEtype_error_alist(cl_object x)
65
65
{
66
66
        cl_error(9, @'simple-type-error', @':format-control',
67
 
                    make_constant_string("Not a valid association list ~D"),
 
67
                    make_constant_base_string("Not a valid association list ~D"),
68
68
                    @':format-arguments', cl_list(1, x),
69
69
                    @':expected-type', @'list',
70
70
                    @':datum', x);
76
76
        /* FIXME: Is this the right way to rebind it? */
77
77
        bds_bind(@'*print-circle*', Ct);
78
78
        cl_error(9, @'simple-type-error', @':format-control',
79
 
                    make_constant_string("Circular list ~D"),
 
79
                    make_constant_base_string("Circular list ~D"),
80
80
                    @':format-arguments', cl_list(1, x),
81
81
                    @':expected-type', @'list',
82
82
                    @':datum', x);
86
86
FEtype_error_index(cl_object seq, cl_object ndx)
87
87
{
88
88
        cl_error(9, @'simple-type-error', @':format-control',
89
 
                    make_constant_string("~S is not a valid index into the object ~S"),
 
89
                    make_constant_base_string("~S is not a valid index into the object ~S"),
90
90
                    @':format-arguments', cl_list(2, ndx, seq),
91
91
                    @':expected-type', cl_list(3, @'integer', MAKE_FIXNUM(0), MAKE_FIXNUM(length(seq)-1)),
92
92
                    @':datum', ndx);
153
153
void
154
154
assert_type_string(cl_object p)
155
155
{
156
 
        if (type_of(p) != t_string)
157
 
                FEtype_error_string(p);
 
156
        cl_type t = type_of(p);
 
157
#ifdef ECL_UNICODE
 
158
        if (t != t_base_string && t != t_string)
 
159
                FEtype_error_string(p);
 
160
#else
 
161
        if (t != t_base_string)
 
162
                FEtype_error_string(p);
 
163
#endif
 
164
}
 
165
 
 
166
void
 
167
assert_type_base_string(cl_object p)
 
168
{
 
169
        if (type_of(p) != t_base_string)
 
170
                FEwrong_type_argument(@'base-string',p);
158
171
}
159
172
 
160
173
void
297
310
                }
298
311
                break;
299
312
 
 
313
#ifdef ECL_UNICODE
300
314
        case t_string:
301
315
                if (x->string.adjustable ||
302
316
                    x->string.hasfillp ||
306
320
                        t = @'simple-string';
307
321
                t = cl_list(2, t, MAKE_FIXNUM(x->string.dim));
308
322
                break;
 
323
#endif
 
324
 
 
325
        case t_base_string:
 
326
                if (x->base_string.adjustable ||
 
327
                    x->base_string.hasfillp ||
 
328
                    !Null(CAR(x->base_string.displaced)))
 
329
                        t = @'base-string';
 
330
                else
 
331
                        t = @'simple-base-string';
 
332
                t = cl_list(2, t, MAKE_FIXNUM(x->base_string.dim));
 
333
                break;
309
334
 
310
335
        case t_bitvector:
311
336
                if (x->vector.adjustable ||