Skip to content

Commit 6a3c0dc

Browse files
committed
2012-11-24 version 1.5.2
Added meta data for Irrlicht 3D engine. Now we can use Irrlicht in Lua, JavaScript and Python. 18 samples in Irrlicht were converted to Lua, JavaScript and Python. Added function "import" in script binding core service to load libraries at runtime from within script. Added GMetaObjectArray to use C++ object array in script. Added GMetaDebug to ease debugging script. Now script can set break point (int 3) and trace messages. Added GMetaCore to provide core functions in script. cloneClass was moved to GMetaCore. A new function "cast" was added to cast object from script. To use "cast", RTTI must be enabled in the meta data. Improved reflecting for variadic functions, now suppport non-variadic parameters. E.g, int myVariadicFunc(int a, const char * b, GMetaVariadicParam * v); Now dotted nested namespace can be passed to createScriptObject. E.g, createScriptObject("a.b.c"), then script can use the script object a.b.c Added function holdObject to GScriptObject and IScriptObject to hold meta data which is created dynamically. Added meta traits to manage script object lifetime. Now script engine can handle cpgf interfaces correctly. Metagen can reflect bitfield as property by adding getter and setter functions. Metagen can wrap C++ operator overloading with named function, which is usable by script. Metagen can split large source file to smaller files. Now fromVariant<GVariant>(variant) will return the variant directly. Changed the utility functions in gmetaapiutil.h from template to non-template, to keep the API minimal. Moved and renamed gbytearray.h/cpp to metautility/gmetabytearray.h/cpp, and renamed class GByteArray and GMetaByteArray. Renamed byte array functions getMemory/getCurrentMemory to getPointer/getCurrentPointer. Now when passing to method parameter, or setting to field, object pointer can be casted correctly according to the class hierarchy. This is useful in multiple inheritance. Removed function gainScriptObject from GScriptObject and IScriptObject. Now createScriptObject can return the existing script object. Improved meta traits. Now in reflection, the base meta class can be resolved correctly even it is reflected later than derived classes. Now converting an C++ object to GVariant won't trigger any operator & overloading. Fixed a bug that in script, assign an object with another variable with same instance may cause the object be freed. Fixed a bug that in Python binding, None value was not handled when passing from script to C++ and it was converted to wrong GVariant. Fixed a bug that in V8 Javascript binding, there is null pointer crash if the object constructor returns NULL. Now an exception is raised instead of crash. Fixed a bug that function isInheritedFrom in GMetaClass and IMetaClass works wrong. Fixed a bug that if a GVariant holding a reference to fundamental, when casting it to a fundamental in different type size, the result is wrong. Fixed a bug that script binding doesn't distinguish between functions which are only different in constness. git-svn-id: https://subversion.assembla.com/svn/kbasm/cpgf/trunk@654 5ea4cdcf-77fc-412b-903d-47c6f9a32d48
1 parent 786b08c commit 6a3c0dc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

changelog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
2012-11-24 version 1.5.2
22
Added meta data for Irrlicht 3D engine. Now we can use Irrlicht in Lua, JavaScript and Python.
3+
18 samples in Irrlicht were converted to Lua, JavaScript and Python.
34
Added function "import" in script binding core service to load libraries at runtime from within script.
45
Added GMetaObjectArray to use C++ object array in script.
56
Added GMetaDebug to ease debugging script. Now script can set break point (int 3) and trace messages.

test/variant/test_variant_cast.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ GTEST(TestVariant_CastFromFloat)
121121
GCHECK(casted > 4.9f && casted < 5.1f);
122122

123123
int b = 3;
124-
value = &a;
124+
value = &b;
125125
value.refData().typeData.vt = byReference | vtSignedInt;
126126
CAN_FROM(void *, value);
127127
CAN_FROM(const void *, value);

0 commit comments

Comments
 (0)