cl-autowrap
cl-autowrap copied to clipboard
:ANON-TYPE-42 is not the name of a class
Hi
Ok. After many blind alley and discovering the proper clang incantations and loading the library I finally got the test (LWM)
Here is the transcript.
CL-USER 5 > (in-package "CL-AUTOWRAP-TESTS")
#<The CL-AUTOWRAP-TESTS package, 24/64 internal, 38/64 external>
CL-AUTOWRAP-TESTS 6 > (cffi:use-foreign-library cl-autowrap-tests-lib)
#<CFFI:FOREIGN-LIBRARY CL-AUTOWRAP-TESTS-LIB "libcl-autowrap-test.dylib">
CL-AUTOWRAP-TESTS 7 > (get-foo)
#<FOO-T {#X00150F40}>
CL-AUTOWRAP-TESTS 8 > (free-foo *)
CL-AUTOWRAP-TESTS 9 > (let ((foo (get-foo)))
(setf (foo-t.a foo) 5) ;; foo.a = 5;
(setf (foo-t.x[].b0 foo 0) #b10) ;; foo.x[0].b0 = 2;
(print (foo-t.x[].s.x foo 1)) ;; anonymous struct
(foo-t.x[].s foo 0) ;; => child wrapper
(foo-t.x[].s& foo 0) ;; &(foo.x[0].s) => pointer
(free-foo foo))
0
Error: #:ANON-TYPE-2247244 is not the name of a class
1 (continue) Try finding the class #:ANON-TYPE-2247244 again
2 (abort) Return to level 0.
3 Return to top loop level 0.
Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.
CL-AUTOWRAP-TESTS 11 : 1 > :b
Call to ERROR
Call to CERROR
Call to FIND-CLASS
Call to CLOS::MAKE-INSTANCE-SYMBOL
Interpreted call to FOO-T.X[].S
Call to LET
Call to EVAL
Call to CAPI::CAPI-TOP-LEVEL-FUNCTION
Call to CAPI::INTERACTIVE-PANE-TOP-LOOP
Call to MP::PROCESS-SG-FUNCTION
Looks like uninterned symbol are not quite palatable as class names in LWM.
Cheers MA
Err this clearly slipped under my radar entirely .. is this the cl-autowrap-test
? I clearly haven't loaded that stuff in awhile. :( What's LWM?
Oh LispWorks I guess .. Uh hm. Are uninterned symbols not allowed by the spec?