Re: [ANN] luabind 0.9-rc1

[email protected]
Newsgroups gmane.comp.lang.lua.bind.user
Message-ID <[email protected]>
On Thu, 10 Dec 2009 13:19:11 +0100
Daniel Wallin <[email protected]> wrote:

> I'm happy to announce the first RC of luabind 0.9. There have been a lot
> of improvements since 0.8.1. Among the more interesting ones are the
> automatic handling of down casts, as well as better smart pointer
> support, and of course the improved performance.
> 
> Many thanks to Athena Capital Research who funded a large part of the
> development for this release.
> 
> Please test and report problems!

Hello,
And thank you for your hard work.

I've updated luabind to 0.9rc1 and found that the LUABIND_NO_EXCEPTIONS
was not respected everywhere in the code.
I've attached a patch that make the thing compile (also it seems to work).
Is it possible to make luabind work without exceptions again?

Best regards,
Teodor Petrov

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev

_______________________________________________
luabind-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/luabind-user
luabind_0.9rc1_build.patch (text/x-patch, 1.4 KB)
diff -bur luabind-0.9-rc1/luabind/make_function.hpp libLuaBind/luabind/make_function.hpp
--- luabind-0.9-rc1/luabind/make_function.hpp	2009-12-10 12:33:11.000000000 +0200
+++ libLuaBind/luabind/make_function.hpp	2010-01-02 22:45:51.000000000 +0200
@@ -16,8 +16,9 @@
 
 namespace detail
 {
-
+# ifndef LUABIND_NO_EXCEPTIONS
   LUABIND_API void handle_exception_aux(lua_State* L);
+# endif
 
 // MSVC complains about member being sensitive to alignment (C4121)
 // when F is a pointer to member of a class with virtual bases.
@@ -54,6 +55,7 @@
 
           int results = 0;
 
+# ifndef LUABIND_NO_EXCEPTIONS
           try
           {
               results = invoke(
@@ -64,6 +66,9 @@
               handle_exception_aux(L);
               lua_error(L);
           }
+# else
+          results = invoke(L, *impl, ctx, impl->f, Signature(), impl->policies);
+# endif
 
           if (!ctx)
           {
diff -bur luabind-0.9-rc1/src/exception_handler.cpp libLuaBind/src/exception_handler.cpp
--- luabind-0.9-rc1/src/exception_handler.cpp	2009-12-10 12:33:11.000000000 +0200
+++ libLuaBind/src/exception_handler.cpp	2010-01-02 22:19:37.000000000 +0200
@@ -9,6 +9,8 @@
 #include <luabind/error.hpp>
 #include <stdexcept>
 
+# ifndef LUABIND_NO_EXCEPTIONS
+
 namespace luabind { namespace detail {
 
 namespace
@@ -82,3 +84,4 @@
 
 }} // namespace luabind::detail
 
+# endif // LUABIND_NO_EXCEPTIONS
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.