cl-autowrap icon indicating copy to clipboard operation
cl-autowrap copied to clipboard

:ANON-TYPE-42 is not the name of a class

Open marcoxa opened this issue 8 years ago • 2 comments

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

marcoxa avatar Jun 14 '16 15:06 marcoxa

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?

rpav avatar Dec 22 '16 20:12 rpav

Oh LispWorks I guess .. Uh hm. Are uninterned symbols not allowed by the spec?

rpav avatar Dec 22 '16 20:12 rpav