2007/1/9, todd ingalls <testcase@...>:
> When building libraries with (c:build-shared-library ... :init-name
> "init_FOO") I have a couple of questions:
> 1. what is the prototype for init_FOO ? Is it similiar to what I see
> in individual c-files? for instance if i compile a file like
> (compile-file "fl.lisp" :system-p t :h-file t :c-file t)
> i see something like :
> void init_FL(cl_object flag)
Yes, it is a function that takes a cblock, ie a lisp object describing
the library this function belongs to.
> 2. in this instance, what is the flag cl_object that is suppose to be
> passed to this function? I can see it is
> a cblock but I am not sure how to create this or where to get this from.
The recommended way would be to call
cl_object the_block = read_VV(OBJNULL, init_FOO)
You should take the cblock which is output by read_VV and save it
somewhere visible so that it is not garbage collected.
Dpto. de Fisica Teorica I, Fac. de CC Fisicas, Universidad Complutense,
Ciudad Universitaria s/n Madrid 2804 (Spain)