<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to feature-requests</title><link>https://sourceforge.net/p/squirrel/feature-requests/</link><description>Recent changes to feature-requests</description><atom:link href="https://sourceforge.net/p/squirrel/feature-requests/feed.rss" rel="self"/><language>en</language><lastBuildDate>Mon, 03 Aug 2009 15:37:23 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/squirrel/feature-requests/feed.rss" rel="self" type="application/rss+xml"/><item><title>read file as string</title><link>https://sourceforge.net/p/squirrel/feature-requests/7/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;a simple way for reading a file as string would be nice. Because there is no builtin way from blob to string and no method to read a string directly.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 03 Aug 2009 15:37:23 -0000</pubDate><guid>https://sourceforge.net7aabf741633290f3a87afcbab1fd12ac0c1c671a</guid></item><item><title>Make UserData implementation more safe</title><link>https://sourceforge.net/p/squirrel/feature-requests/6/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When embedding Squirrel using UserData we have a one &lt;br /&gt;
big problem - to be sure that UserData allocated have &lt;br /&gt;
specified type (we can invoke other closure in Squirrel &lt;br /&gt;
with current UserData) we need to hold in UserData some &lt;br /&gt;
data unique for this UserData type. &lt;br /&gt;
This can be a pointer for example.&lt;/p&gt;
&lt;p&gt;But this is not a fast way - we must get UserData then &lt;br /&gt;
get from it this pointer (when UserData size is less then &lt;br /&gt;
pointer size we have unpredictable side effect) and at &lt;br /&gt;
last compare it.&lt;/p&gt;
&lt;p&gt;I suggest to use some more data at UserData - pointer to &lt;br /&gt;
user-specified data (same as user-pointer). &lt;/p&gt;
&lt;p&gt;One more member - the UserData size is also good but &lt;br /&gt;
not as vital as type pointer.&lt;/p&gt;
&lt;p&gt;Also is good to use in one call release hook.&lt;/p&gt;
&lt;p&gt;When user push new UserData we can modify function or &lt;br /&gt;
add new as:&lt;/p&gt;
&lt;p&gt;&amp;amp;quot;SQUserPointer sq_newuserdata_t(HSQUIRRELVM v,&lt;br /&gt;
unsigned int size, SQUserPointer usertype, &lt;br /&gt;
SQUSERDATARELEASE release)&amp;amp;quot;&lt;/p&gt;
&lt;p&gt;The last two member may be NULL.&lt;/p&gt;
&lt;p&gt;In most cases UserData have delegate with closures &lt;br /&gt;
(otherwise meaning of UserData is nullified) so alternate &lt;br /&gt;
UserData create function is:&lt;/p&gt;
&lt;p&gt;&amp;amp;quot;SQUserPointer sq_newuserdata_td(HSQUIRRELVM v,&lt;br /&gt;
unsigned int size, SQUserPointer usertype, &lt;br /&gt;
SQUSERDATARELEASE release, int idxdelegate)&amp;amp;quot;&lt;/p&gt;
&lt;p&gt;To simplify detection of user data we have to add two &lt;br /&gt;
new requiest function:&lt;/p&gt;
&lt;p&gt;&amp;amp;quot;SQRESULT sq_getuserdata_t(HSQUIRRELVM v,int idx,&lt;br /&gt;
SQUserPointer *puserdata, SQUserPointer requesttype)&amp;amp;quot;&lt;/p&gt;
&lt;p&gt;This function request only specified type.&lt;/p&gt;
&lt;p&gt;&amp;amp;quot;SQRESULT sq_getuserdata_tx(HSQUIRRELVM v,int idx,&lt;br /&gt;
SQUserPointer *puserdata, SQUserPointer *havetype)&amp;amp;quot;&lt;/p&gt;
&lt;p&gt;This function request any type and type of it.&lt;/p&gt;
&lt;p&gt;This functions required to UserData have changed, this &lt;br /&gt;
ones can't be added without it.&lt;br /&gt;
Otherwise we can create UserData without such pointer &lt;br /&gt;
and cause memory access errors and POSSIBLY &lt;br /&gt;
UNSTABLE code.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sat, 06 Dec 2003 10:16:37 -0000</pubDate><guid>https://sourceforge.netfdf78a32b9ad26df06a43d9c1753b427610db882</guid></item><item><title>Argument binding</title><link>https://sourceforge.net/p/squirrel/feature-requests/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In current version of Squirrel (0.6) is possible to call &lt;br /&gt;
function in squirrel with count of arguments different &lt;br /&gt;
from declared. &lt;/p&gt;
&lt;p&gt;When using less arguments arguments not &lt;br /&gt;
specified will be unknown (in most cases they be &lt;br /&gt;
last function n-th argument, in some cases NULL, &lt;br /&gt;
etc.). &lt;/p&gt;
&lt;p&gt;When using more arguments than in function &lt;br /&gt;
definition extra arguments don't have access from &lt;br /&gt;
function.&lt;/p&gt;
&lt;p&gt;I suggest one of folowing solution:&lt;/p&gt;
&lt;p&gt;1. Count of argument to function. When calling &lt;br /&gt;
function with arguments less than defined extra &lt;br /&gt;
arguments filled with NULLs. When calling function &lt;br /&gt;
with more arguments than defined generate an &lt;br /&gt;
error.&lt;/p&gt;
&lt;p&gt;2. Use exact number of arguments. In functon &lt;br /&gt;
definition using syntax &amp;amp;quot;arg=default_value&amp;amp;quot; when &lt;br /&gt;
argument can be omitted. This allow calling some &lt;br /&gt;
function like &amp;amp;quot;func_5(8, av2,,15)&amp;amp;quot; defined as &lt;br /&gt;
&amp;amp;quot;function(a1, a2, a3=&amp;amp;quot;ee&amp;amp;quot;, a4=0, a5=&amp;amp;quot;0&amp;amp;quot;)&amp;amp;quot;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sun, 09 Nov 2003 11:33:31 -0000</pubDate><guid>https://sourceforge.net4f965a89a5549cc0965da43fcb421df45b9a841f</guid></item><item><title>Add new metamethod for delete</title><link>https://sourceforge.net/p/squirrel/feature-requests/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Strange but adding an item can be catched inside a &lt;br /&gt;
table but catching &amp;amp;quot;delete&amp;amp;quot; operator is impossible.&lt;/p&gt;
&lt;p&gt;I suggest to add new metamethod &amp;amp;quot;_delslot&amp;amp;quot; to list &lt;br /&gt;
of other metamethods to complete slot &lt;br /&gt;
metamethods list.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sat, 08 Nov 2003 08:40:28 -0000</pubDate><guid>https://sourceforge.neta798e039a59462e8abcfe38c6c4e9f8cac1ecca4</guid></item><item><title>Add new type (userdatapointer)</title><link>https://sourceforge.net/p/squirrel/feature-requests/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In some situations when embedding Squirrel &lt;br /&gt;
&amp;amp;quot;userdata&amp;amp;quot; type is not very eficient: when I use &lt;br /&gt;
manually created objects or imported via API (ex. &lt;br /&gt;
ActiveX in windows). In this case using another &lt;br /&gt;
buffer with only one pointer inside is not very clean.&lt;/p&gt;
&lt;p&gt;I suggest to use special type &amp;amp;quot;userdatapointer&amp;amp;quot;. &lt;br /&gt;
This type is very close to &amp;amp;quot;userdata&amp;amp;quot; type but &lt;br /&gt;
instead of allocating data by VM this type has only &lt;br /&gt;
pointer with two functions  - addref and release, all &lt;br /&gt;
specified in native language.&lt;/p&gt;
&lt;p&gt;Inside engine this may be implemented as using &lt;br /&gt;
structure &lt;/p&gt;
&lt;p&gt;struct UserDataPointer {&lt;br /&gt;
void* data;&lt;br /&gt;
void (*addref)(HSQUIRRELVM, void*);&lt;br /&gt;
void (*release)(HSQUIRRELVM, void*);&lt;br /&gt;
};&lt;/p&gt;
&lt;p&gt;This structure can be embeded into object structure &lt;br /&gt;
or pointer to it can be holded inside.&lt;/p&gt;
&lt;p&gt;Next this allow future optimization of VM code to &lt;br /&gt;
make code very efficient.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sat, 08 Nov 2003 08:36:11 -0000</pubDate><guid>https://sourceforge.netbd7835dd66a2e928b53377473b7b359515379957</guid></item><item><title>Unite LIB headers</title><link>https://sourceforge.net/p/squirrel/feature-requests/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In current squirrel version (0.6) files&lt;br /&gt;
sqiolib.h&lt;br /&gt;
sqmathlib.h&lt;br /&gt;
sqsystemlib.h&lt;br /&gt;
sqbloblib.h&lt;br /&gt;
have only one or some more declaration of LIB &lt;br /&gt;
registration function.&lt;/p&gt;
&lt;p&gt;1) This headers could be united into one named &lt;br /&gt;
something as &amp;amp;quot;sqstdlib.h&amp;amp;quot;.&lt;/p&gt;
&lt;p&gt;2) This libs haven't SQUIRREL_API or some other &lt;br /&gt;
declaration predicate and incompatible with &lt;br /&gt;
&amp;amp;quot;squirrel.h&amp;amp;quot; file.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sat, 08 Nov 2003 08:27:34 -0000</pubDate><guid>https://sourceforge.netc9ecb40f8522a84333067a8a6d9a02be63983208</guid></item><item><title>change printf</title><link>https://sourceforge.net/p/squirrel/feature-requests/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;In current version of Squirrel used &amp;amp;quot;scprintf&amp;amp;quot; (printf &lt;br /&gt;
or wprintf) for output information. I suggest to use &lt;br /&gt;
function private for each VM for such output. This &lt;br /&gt;
allow for one VM dump into file, another into &lt;br /&gt;
window etc.&lt;/p&gt;
&lt;p&gt;Suggested prototype of this function are:&lt;br /&gt;
typedef int (*dump_func)(HSQUIRRELVM v, const &lt;br /&gt;
SQChar *fmt, ...);&lt;/p&gt;
&lt;p&gt;to use this function one support function must be &lt;br /&gt;
added:&lt;br /&gt;
SQUIRREL_API dump_func &lt;br /&gt;
sq_set_dump_func(HSQUIRRELVM v, dump_func pf);&lt;/p&gt;
&lt;p&gt;Default function may be NULL or empty stub &lt;br /&gt;
function.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rewoonenco Andrew</dc:creator><pubDate>Sat, 08 Nov 2003 08:20:27 -0000</pubDate><guid>https://sourceforge.netf48396f1ef25dcf7234876fc5715e5bc710fc2eb</guid></item></channel></rss>