Howto:Extend Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 162: Line 162:
  naRef naStringValue(naContext c, naRef n);
  naRef naStringValue(naContext c, naRef n);


= Passing C++ handles to Nasal scripts =  
= Passing Pointers to Nasal scripts =  
Things get more complicated if you need to pass a handle to a C/C++ object into a Nasal script.  There, you need to use a wrapped handle type called a ghost ("Garbage-collectable Handle to an OutSide Thing"), which has a callback that you need to implement to deal with what happens when the Nasal interpreter garbage collects your object.
Things get more complicated if you need to pass a handle to a C/C++ object into a Nasal script.  There, you need to use a wrapped handle type called a ghost ("Garbage-collectable Handle to an OutSide Thing"), which has a callback that you need to implement to deal with what happens when the Nasal interpreter garbage collects your object.


2,561

edits

Navigation menu