Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Ùpdate Squirrel and replace sqplus with sqrat
stahta01:
I have downloaded the attachments above and I am trying to build CB using parts of the patches.
I am using MinGW GCC 4.7.1; it does NOT appear to have EWOULDBLOCK.
The below patch was done to try to get the code to compile; no idea if it is a valid fix for the problem.
--- Code: ---diff --git a/src/sdk/scripting/squirrel/sqrdbg.cpp b/src/sdk/scripting/squirrel/sqrdbg.cpp
index 08da664..0c90b3d 100644
--- a/src/sdk/scripting/squirrel/sqrdbg.cpp
+++ b/src/sdk/scripting/squirrel/sqrdbg.cpp
@@ -103,7 +103,11 @@ SQRESULT sq_rdbg_update(HSQREMOTEDBG rdbg)
return sq_throwerror(rdbg->_v,_SC("disconnected"));
case SOCKET_ERROR:
{
+#ifdef _GLIBCXX_HAVE_EWOULDBLOCK
if(errno == EAGAIN || errno == EWOULDBLOCK)
+#else
+ if(errno == EAGAIN )
+#endif // _GLIBCXX_HAVE_EWOULDBLOCK
{
// No bytes received in Linux
}
--- End code ---
Tim S.
BlueHazzard:
--- Quote from: oBFusCATed on February 18, 2016, 12:42:11 am ---Do you keep the version with separate commits somewhere?
This one is really massive 17k loc added and only 1.5k loc removed according to github.
I don't think anyone can review such a big commit :(
--- End quote ---
Sadly not. This work is nearly 2 years old, and i was a git beginner at that moment. I used git and the main branch to sync my two workstations and so the commit history was cluttered with shit. At one point i squashed them together, without making a branch...
The patch is mainly cluttered because of removing of sqplus, and adding of squirrel and sqrat. You can ignore them in the patch, because the changes there does not come from me ;)
I can splitt it up more, but i was undecided between posting not compiling patches or one big patch what compiles. The current patch is "mostly" needed for the transfer to sqrat. The additions like C::B event handling or additional bindings are not more than 100 lines of code. I thought that it is more work to remove them, then reviewing them...
--- Quote from: oBFusCATed on February 18, 2016, 01:19:31 am ---Already saw bad staff in the commit.
1. There was a using namespace in a header.
2. Some new classes have been named in non conforming to the naming convention way (Menu_point_item).
3. I don't like the ->GetVM()->GetVM() pattern I see all over the place.
4. The changes in the envvars plugin looks to be mostly cosmetic, but they clutter the diff for no apparent reason.
5. You can remove all the code in the debugger plugin. It is mostly useless.
6. The changes in common_functions.script look to be cosmetic only.
7. The convert script is using camelcase for the name of the file. It is better to stick to lowercase and underscores!
8. Why have you added 2 new scripting extensions?
9. Problems with indents in src/sdk/menuitemsmanager.cpp
10. Using std::list in the same file. Using std::list ist the same as committing a crime against humanity. Vectors are always better. :)
11. Mixing includes with "" and <>, I'd say prefer "".
12. There are changes in wxpropgrid. Why? Why not separate commit?
13. Extremely log line in app.cpp
14. Lots of "FIXME (bluehazzard#1#): squirrel error" left in the code. Why?
--- End quote ---
So this is something nice, a list i can work on... After all this time i was getting "blind" for the obvious mistakes...
thanks!
BlueHazzard:
--- Quote from: stahta01 on February 18, 2016, 02:40:03 am ---FYI: Using "wxCHECK_VERSION" without including "wx/version.h" will likely lead to errors on NO PCH builds on Linux.
Edit: This header "wx/wxprec.h" includes "wx/defs.h"; and "wx/defs.h" includes "wx/version.h". Your patch guards "wx/wxprec.h" which will likely result in a NOPCH Build error.
--- End quote ---
Thanks, for the info. They build fine on my system(s), but i will look into it.
stahta01:
I am using your changes to try once more to learn the correct setting to use Git Under Windows and Linux.
https://github.com/stahta01/codeblocks_https_metadata/tree/port/sqrat
A simple patch the removes the need to define SCRAT_IMPORT in CB Projects. Only tested on Windows 7 32 bit wxWidgets 2.8.
--- Code: ---From e90fb7713cd9d8f7da8ecb6593047cd45b22fe14 Mon Sep 17 00:00:00 2001
From: Tim S <stahta01@users.sourceforge.net>
Date: Thu, 18 Feb 2016 12:20:48 -0500
Subject: [PATCH 11/17] * sqrat: Removed the need to define "SCRAT_IMPORT" in
CB Projects. (Thanks stahta01)
Edited, scripting/sqrat/sqratUtil.h to define SCRAT_IMPORT if SCRAT_EXPORT is not defined.
---
src/include/scripting/sqrat/sqratUtil.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/include/scripting/sqrat/sqratUtil.h b/src/include/scripting/sqrat/sqratUtil.h
index c076d70..2c8460d 100644
--- a/src/include/scripting/sqrat/sqratUtil.h
+++ b/src/include/scripting/sqrat/sqratUtil.h
@@ -37,6 +37,12 @@
#include <unordered_map>
#endif
+/* C::B begin */
+#if !defined(SCRAT_EXPORT) && !defined(SCRAT_IMPORT)
+ #define SCRAT_IMPORT
+#endif // !defined(SCRAT_EXPORT) && !defined(SCRAT_IMPORT)
+/* C::B end */
+
namespace Sqrat {
/// @cond DEV
--
2.7.1.windows.2
--- End code ---
Tim S.
oBFusCATed:
--- Quote from: BlueHazzard on February 18, 2016, 12:12:14 pm ---The current patch is "mostly" needed for the transfer to sqrat.
--- End quote ---
The patch is full with new features. There are two options - you can separate them or I can separate them. It is up to you to decide :)
Also it will be good if the squirrel upgrade and the switch from sqplus to scrat is done in a single separate commit (no matter if it compiles or not).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version