[angelscript] 1.10.0 WIP 2

  • From: "Andreas Jonsson" <andreas@xxxxxxxxxxxxx>
  • To: "angelscript" <angelscript@xxxxxxxxxxxxx>
  • Date: Sun, 10 Oct 2004 14:01:02 -0300

I've uploaded the second WIP of version 1.10.0.

This version brings a much improved ExecuteString() method. The improvements 
made to the function is:
- Calls to ExecuteString() can be recursive, i.e. ExecuteString() can call a 
function that in turn calls ExecuteString()
- The application can pass its own context to ExecuteString() for preparation 
and execution (or just preparation)
- ExecuteString() should work with multiple threads (I haven't tested this yet, 
but I don't see why not)
- Only one call to ExecuteString() and retrieve the asIContext for exception 
handling (pass a pointer to a variable that will receieve the context)
- GetContextForExecuteString() is deprecated.

The old functionality is still available by defining AS_DEPRECATED when 
compiling the library

I've improved the multithread code so that it now works with MinGW as well. I 
removed the include of windows.h by locally declaring the few functions needed 
for thread handling. std::map had to be replaced with my own code as I found 
that the STL library isn't all that well-working as it ought to be. Microsoft's 
implementation of the STL library doesn't compile when you turn off the 
language extensions, and MinGW's implementation causes run-time problems with 
other template codes. My own map class (found in as_map.cpp) isn't quite as 
well structured as STL's map, but it works. However, I will improve upon it and 
start using it for other purposes as well, for example for mapping strings to 
classes, which should improve script compile times as well. 

Yes, I know of STLPort which is supposedly much better than any STL library 
that comes with the compilers, but I don't want to force people to download 
another library just to compile mine. I have been thinking about rewriting the 
interface of my classes to match those of STL though. That would make it 
possible to replace my implementation and save some bytes in the final 
application.

I also fixed a bug with SetArguments(). It didn't allow the application to pass 
a pointer to the memory where the script function should return application 
registered classes. Thanks goes to Thomas Suter for helping me discover that 
bug.

Regards,
Andreas Jönsson
Author of AngelScript






AngelScript - AngelCode Scripting Library
http://www.angelcode.com/angelscript/
http://www.angelcode.com/forums/

Other related posts:

  • » [angelscript] 1.10.0 WIP 2