Changeset 27018 in project


Ignore:
Timestamp:
07/08/12 04:38:02 (9 years ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [50.0.146.157]:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/bind

    r27017 r27018  
    724724Functions with variable number of arguments are not supported.
    725725
     726==== {{structs}} in arguments and return types
     727
     728As of version 1.0, functions with structure by value types are supported in arguments and return types as well as nested structs. However, these types are converted to their pointer-equivalents on the Scheme-side. For example,
     729
     730 (bind "struct point intersection(struct line a, struct line b)")
     731
     732will produce a function {{intersection}} with arguments expecting pointers to structs {{a}} and {{b}}. It will return a {{locative}} which holds a blob containing the {{point}} structure (does not need to be freed explicitly). Note that it is a bad idea to pass this {{locative}} to foreign functions that might access it after the immediate call. This is because the GC will move the {{locative}}'s blob around in memory, outdating its pointer.
     733
    726734=== C++ notes
    727735
Note: See TracChangeset for help on using the changeset viewer.