Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 651663 Details for
Bug 879931
Review Request: angelscript - AngelCode Scripting Library
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
angelscript addons vs ror addons
as-addons.diff (text/plain), 4.80 KB, created by
Dan Horák
on 2012-11-25 21:24:41 UTC
(
hide
)
Description:
angelscript addons vs ror addons
Filename:
MIME Type:
Creator:
Dan Horák
Created:
2012-11-25 21:24:41 UTC
Size:
4.80 KB
patch
obsolete
>diff -Nrup --strip-trailing-cr -w /tmp/angelscript_2.22.1/sdk/add_on/debugger/debugger.h /opt2/src/rigsofrods/source/angelscript_addons/debugger/debugger.h >--- /tmp/angelscript_2.22.1/sdk/add_on/debugger/debugger.h 2011-07-01 23:10:14.000000000 +0200 >+++ /opt2/src/rigsofrods/source/angelscript_addons/debugger/debugger.h 2012-11-25 18:22:20.794312204 +0100 >@@ -1,10 +1,17 @@ > #ifndef DEBUGGER_H > #define DEBUGGER_H > >+#include <stdio.h> >+#include <stdlib.h> >+ > #include <angelscript.h> > #include <string> > #include <vector> > >+#ifdef AS_USE_NAMESPACE >+using namespace AngelScript; >+#endif //AS_USE_NAMESPACE >+ > class CDebugger > { > public: >diff -Nrup --strip-trailing-cr -w /tmp/angelscript_2.22.1/sdk/add_on/scriptbuilder/scriptbuilder.cpp /opt2/src/rigsofrods/source/angelscript_addons/scriptbuilder/scriptbuilder.cpp >--- /tmp/angelscript_2.22.1/sdk/add_on/scriptbuilder/scriptbuilder.cpp 2011-12-18 16:37:58.000000000 +0100 >+++ /opt2/src/rigsofrods/source/angelscript_addons/scriptbuilder/scriptbuilder.cpp 2012-11-25 18:22:20.797312157 +0100 >@@ -120,6 +120,7 @@ bool CScriptBuilder::IncludeIfNotAlready > return true; > } > >+#if 0 > int CScriptBuilder::LoadScriptSection(const char *filename) > { > // Open the script file >@@ -168,6 +169,7 @@ int CScriptBuilder::LoadScriptSection(co > > return ProcessScriptSection(code.c_str(), filename); > } >+#endif //0 > > int CScriptBuilder::ProcessScriptSection(const char *script, const char *sectionname) > { >diff -Nrup --strip-trailing-cr -w /tmp/angelscript_2.22.1/sdk/add_on/scriptbuilder/scriptbuilder.h /opt2/src/rigsofrods/source/angelscript_addons/scriptbuilder/scriptbuilder.h >--- /tmp/angelscript_2.22.1/sdk/add_on/scriptbuilder/scriptbuilder.h 2011-12-18 16:34:14.000000000 +0100 >+++ /opt2/src/rigsofrods/source/angelscript_addons/scriptbuilder/scriptbuilder.h 2012-11-25 18:22:20.797312157 +0100 >@@ -92,7 +92,7 @@ protected: > void ClearAll(); > int Build(); > int ProcessScriptSection(const char *script, const char *sectionname); >- int LoadScriptSection(const char *filename); >+ virtual int LoadScriptSection(const char *filename) = 0; > bool IncludeIfNotAlreadyIncluded(const char *filename); > > int SkipStatement(int pos); >diff -Nrup --strip-trailing-cr -w /tmp/angelscript_2.22.1/sdk/add_on/scriptdictionary/scriptdictionary.h /opt2/src/rigsofrods/source/angelscript_addons/scriptdictionary/scriptdictionary.h >--- /tmp/angelscript_2.22.1/sdk/add_on/scriptdictionary/scriptdictionary.h 2010-08-15 15:03:32.000000000 +0200 >+++ /opt2/src/rigsofrods/source/angelscript_addons/scriptdictionary/scriptdictionary.h 2012-11-25 18:22:20.798312141 +0100 >@@ -55,7 +55,6 @@ public: > void EnumReferences(asIScriptEngine *engine); > void ReleaseAllReferences(asIScriptEngine *engine); > >-protected: > // The structure for holding the values > struct valueStruct > { >@@ -68,6 +67,10 @@ protected: > int typeId; > }; > >+ // HACK so we can interate over the items in C++ >+ std::map<std::string, valueStruct> dict; >+protected: >+ > // We don't want anyone to call the destructor directly, it should be called through the Release method > virtual ~CScriptDictionary(); > >@@ -77,7 +80,6 @@ protected: > // Our properties > asIScriptEngine *engine; > mutable int refCount; >- std::map<std::string, valueStruct> dict; > }; > > // This function will determine the configuration of the engine >diff -Nrup --strip-trailing-cr -w /tmp/angelscript_2.22.1/sdk/add_on/scriptmath/scriptmath.cpp /opt2/src/rigsofrods/source/angelscript_addons/scriptmath/scriptmath.cpp >--- /tmp/angelscript_2.22.1/sdk/add_on/scriptmath/scriptmath.cpp 2010-06-17 20:36:52.000000000 +0200 >+++ /opt2/src/rigsofrods/source/angelscript_addons/scriptmath/scriptmath.cpp 2012-11-25 18:22:20.802312079 +0100 >@@ -1,6 +1,7 @@ > #include <assert.h> > #include <math.h> > #include <string.h> >+#include <stdlib.h> > #include "scriptmath.h" > > #ifdef __BORLANDC__ >@@ -102,9 +103,13 @@ void RegisterScriptMath_Native(asIScript > // Nearest integer, absolute value, and remainder functions > r = engine->RegisterGlobalFunction("float ceil(float)", asFUNCTIONPR(ceilf, (float), float), asCALL_CDECL); assert( r >= 0 ); > r = engine->RegisterGlobalFunction("float abs(float)", asFUNCTIONPR(fabsf, (float), float), asCALL_CDECL); assert( r >= 0 ); >+ r = engine->RegisterGlobalFunction("float fabs(float)", asFUNCTIONPR(fabsf, (float), float), asCALL_CDECL); assert( r >= 0 ); > r = engine->RegisterGlobalFunction("float floor(float)", asFUNCTIONPR(floorf, (float), float), asCALL_CDECL); assert( r >= 0 ); > r = engine->RegisterGlobalFunction("float fraction(float)", asFUNCTIONPR(fractionf, (float), float), asCALL_CDECL); assert( r >= 0 ); > >+ // our stuff >+ r = engine->RegisterGlobalFunction("int abs(int)", asFUNCTIONPR(abs, (int), int), asCALL_CDECL); assert( r >= 0 ); >+ > // Don't register modf because AngelScript already supports the % operator > #else > // double versions of the same
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 879931
: 651663