Huabing.Xu
bc55d3246b
Merge branch 'develop' into free_instead_of_delete
...
# By minggo (12) and others
# Via minggo (18) and others
* develop: (78 commits)
[AUTO] : updating submodule reference to latest autogenerated bindings
Update CHANGELOG[ci skip]
Update AUTHORS [ci skip]
fix bug: cccolor to jsval function has error in jsb
[ci skip]
[ci skip]
[ci skip]
[ci skip]
[ci skip]
C++11: NULL -> nullptr
[ci skip]
Fix: UserDefault::createXMLFile with correct XML definition.
[ci skip]
[ci skip]
[ci skip]
Fix bug: rename const with under line seperator
[AUTO] : updating submodule reference to latest autogenerated bindings
Fix bug: Z fighting on TransitionScenePageTurn
Fixed bugs
Modify reader and fixed bugs
...
Conflicts:
cocos/editor-support/cocostudio/CCSGUIReader.cpp
2013-11-14 14:47:01 +08:00
rablwupei
96462eb81f
fix bug: cccolor to jsval function has error in jsb
2013-11-14 12:03:44 +08:00
Ricardo Quesada
be64dd97cf
replaces `delete[]` with `free()` in C-based API
...
API that returns a newly allocated buffer as an output argument (not return value) are error-prone.
- Users forget to release the newly allocated buffer
- Or the call `delete` instead of `delete[]`
But some of those API need to call `realloc` on the buffer.
But `realloc` is only valid if the buffer was previously allocated with `malloc`.
If a buffer needs to be re-allocated using a C++ API, then `std::vector<char*>` should be used instead...
So, this patch does:
- Migrates the API from `new []` / `delete[]` to `malloc()` / `free()`
- Fixes all the memory issues: incorrect deallocs and memory leaks
- Updates the documentation
- And fixes misc issues with the API: removes `cc` from the ZipUtils class.
2013-11-11 18:09:47 -08:00
James Chen
49289d7576
Adding cc.TextureCache.getInstance() to jsb_deprecated.js.
2013-11-11 16:45:44 +08:00
James Chen
20b350a58b
Removing cocosjs_manual_conversions.h(.cpp). Put all jsval <-> native value conversion codes to js_manual_conversions.h(.cpp).
2013-11-11 16:45:44 +08:00
James Chen
ff3bfbe8a2
Using std::unordered_map instead of UTHASH for js_type_class_t.
...
Since xxx.hash_code() return size_t which is 8bytes on 64bit system, we should not use HASH_ADD_INT and HASH_FIND_INT for js_type_class_t.
2013-11-11 14:36:43 +08:00
James Chen
5a0df8d2e8
VS2012 doesn’t support invoke another constructor method in current constructor.
2013-11-11 14:36:43 +08:00
James Chen
fe88f7c941
Fixing memory leak of JSStringWrapper::set .
2013-11-11 14:36:43 +08:00
James Chen
9d5813b7d9
Some fixes:
...
1) Moving the implementation of JSStringWrapper to .cpp file. Removing override operator() which will be easy to make errors.
2) Deleting JSCallFuncWrapper since it isn’t needed after using std::function for MenuItem’s Callback.
3) Fixing ChipmunkTest crash sometimes on MAC platform(64bit).
2013-11-11 14:36:42 +08:00
James Chen
0c4b6e7a37
Removing JSB Version since JSB source codes will be updated with cocos2d-x.
...
Also, remove some unused codes.
2013-11-11 10:40:51 +08:00
James Chen
9d3716e964
Merge pull request #4109 from HoGarfield/JS_Call
...
Missing add "JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET " before calling JS_CallFunctionValue
2013-11-05 23:56:03 -08:00
garfield_ho
f36fd002cd
Remove duplicate
2013-11-06 15:40:23 +08:00
garfield_ho
f6070406cd
Missing add "JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET " before calling JS_CallFunctionValue
2013-11-06 15:31:58 +08:00
Ricardo Quesada
84a6aa29cd
Adds more 64-bit fixes
...
Replaces more `int` with `long` where it makes sense.
Also , it repalces some `unsigned long` with `long` for "lenght"
values as described in our c++ guideline
2013-11-05 17:36:44 -08:00
James Chen
3a8c052ae5
Merge pull request #4039 from dumganhar/spv25
...
issue #2826 : Bug fix of 'js::IsInRequest'
2013-10-31 19:56:09 -07:00
James Chen
baccf828f3
closed #2826 : Removing js::IsInRequest in ScriptingCore.cpp for win32.
2013-11-01 10:45:01 +08:00
James Chen
074f688d95
Merge pull request #4030 from dumganhar/spv25
...
[sp v25] Updating SpiderMonkey library to FFv25.
2013-10-31 07:08:09 -07:00
James Chen
8884c58ac1
issue #2826 : Updating ScriptingCore.cpp. runScript small fix.
2013-10-31 21:03:06 +08:00
James Chen
4b2429186c
closed #3093 : The last test of OpenglTest crashes on Windows.
2013-10-31 16:27:00 +08:00
James Chen
f478e2d2a5
issue #2826 : Bug fixes for win32.
2013-10-31 15:15:52 +08:00
James Chen
6f978c5cbd
issue #2826 : Bug fixes after using Spidermonkey v25. Adding JSB_AUTOCOMPARTMENT_WITH_GLOBAL_OBJCET macro.
2013-10-31 15:13:49 +08:00
dingpinglv
7e8faed7af
fixed #3048 : rename some comments
2013-10-31 14:36:17 +08:00
dingpinglv
f172abbc14
fixed #3048 : add some comments for cc.rect
2013-10-31 14:31:25 +08:00
dingpinglv
c116d070d3
Closed #3048 : cc.rect can receiving different type parameters now
2013-10-31 14:16:42 +08:00
James Chen
0f7a99f898
[sp v25] Don't use 'using namespace std;' to make android build happy.
2013-10-31 11:15:18 +08:00
James Chen
541a0478ac
[sp v25] Removing unused comments in main.js
2013-10-31 11:15:18 +08:00
James Chen
d2fc29dbfa
[sp v25] Updating Debugger script.
2013-10-31 11:15:17 +08:00
James Chen
a81998ccf6
[sp v25] Debugger script, loading file is ok.
2013-10-31 11:15:17 +08:00
James Chen
3b86d6398f
[sp v25] Fixing complication errors after updating Spidermonkey to v25.
2013-10-31 11:15:17 +08:00
samuelhu
1f07a659a6
issue #3069:Modify layer lua register and add some compatible lua binding functions
2013-10-31 09:49:04 +08:00
James Chen
48ce5e39fe
EventDispatcher is managed by Director now, like Scheduler and ActionManager.
2013-10-26 15:04:01 +08:00
James Chen
1339ef7ecb
[JSB] These are only for v2.x JSB compatibility after removing controller codes in Layer.
2013-10-25 15:20:06 +08:00
James Chen
a56475e872
Updating jsb.
2013-10-25 10:53:46 +08:00
Dhilan007
fd993e2fa2
issues #2905:split jsbinding module
2013-10-24 17:54:57 +08:00
James Chen
feee6ca84b
Merge pull request #3978 from HoGarfield/cc.RESOLUTION_POLICY
...
Add cc.RESOLUTION_POLICY to jsb_cocos2d.js,so it can use setDesignResolutionSize in cc.EGLView
2013-10-22 01:34:44 -07:00
garfield_ho
55d45081f6
Fixed name
2013-10-22 15:41:43 +08:00
Dhilan007
232f0d598b
issues #2905:add new vs project
2013-10-21 22:21:11 +08:00
Dhilan007
f11dba586a
issue #2905:modification vs-project for folder structure change
2013-10-21 22:09:21 +08:00
garfield_ho
54ac8f3537
Add cc.RESOLUTION_POLICY to jsb_cocos2d.js,so it can use setDesignResolutionSize in cc.EGLView
2013-10-19 16:44:14 +08:00
minggo
9c3cac759c
issue #2905:simple game and assets manager build ok on android
2013-10-17 18:39:37 +08:00
minggo
e50f9fc43b
issue #2905 : jsbinding samples and lua binding samples build ok on android
2013-10-17 15:04:30 +08:00
minggo
8f9756f030
issue #2905:TestJavascript build ok on Android
2013-10-17 11:28:57 +08:00
James Chen
6fba0dd5db
issue #2905 : [iOS Mac] TestJavascript works now.
2013-10-16 15:43:59 +08:00
James Chen
f6275667bf
Removing unused ios projects.
2013-10-12 15:02:28 +08:00
James Chen
7de6646213
Don't ignore (D|d)ebugXXX folders or files. And move scripting/javascript/bindings/js to 'scripting/javascript/script/' folder.
2013-10-12 14:56:40 +08:00
minggo
5acbe663e0
issue #2905 : add missing files
2013-10-12 13:44:57 +08:00
minggo
ad6325b0dd
fix conflicts
2013-10-12 11:31:32 +08:00
minggo
4313c46e93
issue #2905:adjust folder structure
2013-10-12 11:22:05 +08:00