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

« back to all changes in this revision

Viewing changes to src/c/instance.d

  • Committer: Bazaar Package Importer
  • Author(s): Albin Tonnerre
  • Date: 2008-06-20 18:00:19 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080620180019-7fbz1ln5444vtkkr
Tags: 0.9j-20080306-2ubuntu1
* Enabled unicode support. (Closes: LP #123530)
* Modify Maintainer value to match the DebianMaintainerField specification.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: c; c-basic-offset: 8 -*- */
1
2
/*
2
3
    instance.c -- CLOS interface.
3
4
*/
273
274
        case t_cfun:
274
275
        case t_cclosure:
275
276
                t = @'function'; break;
276
 
        case t_foreign:
277
 
                t = @'si::foreign-data'; break;
278
277
#ifdef ECL_THREADS
279
278
        case t_process:
280
279
                t = @'mp::process'; break;
281
280
        case t_lock:
282
281
                t = @'mp::lock'; break;
 
282
        case t_condition_variable:
 
283
                t = @'mp::condition-variable'; break;
283
284
#endif
 
285
        case t_codeblock:
 
286
                t = @'si::code-block'; break;
 
287
        case t_foreign:
 
288
                t = @'si::foreign-data'; break;
 
289
        case t_frame:
 
290
                t = @'si::frame'; break;
284
291
        default:
285
292
                ecl_internal_error("not a lisp data object");
286
293
        }
289
296
                t = cl_find_class(1, Ct);
290
297
        @(return t)
291
298
}
 
299
 
 
300
cl_object
 
301
ecl_slot_value(cl_object x, const char *slot)
 
302
{
 
303
        cl_object slot_name = c_string_to_object(slot);
 
304
        return funcall(3, @'slot-value', x, slot_name);
 
305
}
 
306
 
 
307
cl_object
 
308
ecl_slot_value_set(cl_object x, const char *slot, cl_object value)
 
309
{
 
310
        cl_object slot_name = c_string_to_object(slot);
 
311
        cl_object slot_setter = c_string_to_object("(SETF SLOT-VALUE)");
 
312
        return funcall(4, ecl_fdefinition(slot_setter), value, x, slot_name);
 
313
}