X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=inline;f=doc%2Fnotes.sgml;h=c4e86036a66c38184e5fd0ef2df771bf2dcbd997;hb=26c182a47734467abd8658d51d125ada642e0639;hp=8dfb3e5906178cb2e57dffe47857bd799ddd2d98;hpb=c7b9e795a73b25b3c81ecb1c8c69b8f0f944a064;p=uffi.git
diff --git a/doc/notes.sgml b/doc/notes.sgml
index 8dfb3e5..c4e8603 100644
--- a/doc/notes.sgml
+++ b/doc/notes.sgml
@@ -64,14 +64,26 @@
Cross-Implementation Optimization
-To fully optimize across platforms, both explicit type information
-must be passed to dereferencing of pointers and arrays. Though this
-optimization only helps with &acl;, &uffi; is designed to require this
-type information be passed the dereference functions. Second, declarations
-of type should be made in functions, structures, and classes where
-foreign objects will be help. This will optimize access for &lw;
-
-
+
+ To fully optimize across platforms, both explicit type
+ information must be passed to dereferencing of pointers and
+ arrays. Though this optimization only helps with &acl;, &uffi;
+ is designed to require this type information be passed the
+ dereference functions. Second, declarations of type should be
+ made in functions, structures, and classes where foreign
+ objects will be help. This will optimize access for &lw;
+
+
+ Here is an example that should both methods being used for
+ maximum cross-implementation optimization:
+
+(uffi:def-type the-struct-type-def the-struct-type)
+(let ((a-foreign-struct (allocate-foreign-object 'the-struct-type)))
+ (declare 'the-struct-type-def a-foreign-struct)
+ (get-slot-value a-foreign-struct 'the-struct-type 'field-name))
+
+
+