call_function with parts of string + length

Kristoffer Danielsson <[email protected]>
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
Consider this:

 

char *pString = "Hello world!";

luabind::call_function<void>(L, "foo", pString);

 

For efficiency, I want to send "Hello" only, to function foo - without having to copy the string or alter the pointer array. How can this be done? It must be possible to somehow wrap the pointer with a desired length!

 

Something like this:

luabind::call_function<void>(L, "foo", luabind::parameter(pString, 5));

 

Thanks.

_________________________________________________________________
Använd nätet för att dela med dig av dina minnen till vem du vill.
http://www.microsoft.com/sverige/windows/windowslive/products/photos-share.aspx?tab=1

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.