(format nil "~A__imprint" class)
(let ((ilayout (sod-class-ilayout class)))
(format stream "~&~:
-/* Imprint raw memory with instance structure. */
-static void *~A__imprint(void *p)
+/* Imprint raw memory with class `~A' instance structure. */
+static void *~:*~A__imprint(void *p)
{
struct ~A *sod__obj = p;
" struct ~A *sod__obj = ~A__imprint(p);~2%"
(ilayout-struct-tag class) class)
(setf used t))
- (format stream " {~% ~A ~A ="
- (sod-slot-type dslot)
- *sod-tmp-val*)
- (ecase (sod-initializer-value-kind init)
- (:simple (write (sod-initializer-value-form init)
- :stream stream
- :pretty nil :escape nil)
- (format stream ";~%"))
- (:compound (format stream " {")
- (write (sod-initializer-value-form init)
- :stream stream
- :pretty nil :escape nil)
- (format stream " };~%")))
- (format stream " ~A.~A = ~A;~% }~%"
+ (format stream " {~% ")
+ (pprint-c-type (sod-slot-type dslot) stream
+ *sod-tmp-val*)
+ (format stream " = ~A;~% ~
+ ~A.~A = ~A;~% ~
+ }~%"
+ (sod-initializer-value init)
isl (sod-slot-name dslot)
*sod-tmp-val*))))))))))
(unless used
:case :common)
:state nil)))
(with-module-environment (module)
- (dolist (name '("va_list" "size_t" "ptrdiff_t"))
+ (dolist (name '("va_list" "size_t" "ptrdiff_t" "wchar_t"))
(add-to-module module (make-instance 'type-item :name name)))
(flet ((header-name (name)
(concatenate 'string "\"" (string-downcase name) ".h\""))