Hi,
While I'm generally having success using lisp objects from within C, I
am unable to successfully create a lisp array from a list of C ints.
For example the following throws invalid memory access errors [1] on the
first call to si_aset...
int i, length;
length = 5;
int c_bytes[5];
for (i=0; i<length; i++){
c_bytes[i] = i;
}
cl_object bytes = cl_make_array(1, MAKE_FIXNUM(5));
for (i=0; i<length; i++) {
printf("%d ", i);
si_aset(3, bytes, fix(i), fix(c_bytes[i]));
}
Am I doing anything obviously wrong, or is there a better way? I found
nothing on the wiki [2], but when I find a working solution I'll be sure
to post it there.
Thanks -- Eric
Footnotes:
[1] specifically
,----
| Condition of type: SEGMENTATION-VIOLATION
| Detected access to an invalid or protected memory address.
`----
[2] http://ecls.wikispaces.com/C+and+lisp+conversion+functions
--
Eric Schulte
http://cs.unm.edu/~eschulte/
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Ecls-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecls-list