| age |
author |
description |
| 13 days ago |
Eric Wing |
Bug fix for functions/methods that return raw pointers (doesn't include char*). The code was not dereferencing the return block memory correctly which resulted in the wrong address being pushed as lightuserdata through the bridge.default tip |
| 4 weeks ago |
Eric Wing |
Commented out more testing NSLogs. |
| 4 weeks ago |
Eric Wing |
Obj-C Exception Handling: Added callStackSymbols to be printed as part of error string for more information. |
| 4 weeks ago |
Eric Wing |
Updated/merged to Lua 5.1.5. |
| 4 weeks ago |
Eric Wing |
Native Objective-C exception handler patch for Lua. |
| 4 weeks ago |
Eric Wing |
OpenSavePanelBlocks: Minor tweak to simplify setting the default file name. (I did it the hard way last time.) |
| 5 weeks ago |
Eric Wing |
Experiment to change Lua's pall implementation to use native Objective-C exception handling instead of setjmp/longjmp. This will allow for Obj-C exceptions that are thrown while in the middle of a pcall to be caught by Lua and handled through Lua's normal pcall error handling mechanism. |
| 6 weeks ago |
Eric Wing |
merged |
| 6 weeks ago |
Eric Wing |
One more optimization for __index for structs. Saving the sub-struct in the original struct's environment table for use as a cache helps in two areas. 1) Walking the struct again can be bypassed, 2) Intermediate/temporary structs avoid allocation since I can reuse. Accesses like nsrect.size.width=nsrect.size.width+1 are enough to make this a big win. |
| 6 weeks ago |
Eric Wing |
Fixed compile problems building for Release. The default Xcode project templates produce code which is incompatible with the 32-bit runtime so the default code needed to be changed. There was also a missed copy/paste for the copy of the OpenSavePanelBlocks part of the DMG build. |
| 6 weeks ago |
Eric Wing |
Bumped version numbers to 0.4 since everything is in front of me. |
| 6 weeks ago |
Eric Wing |
merged 0.4 branch with 0.3.3 branch. Xcode project had bad conflicts so I took the 0.4 project and redid the 0.3.3 changes which are mostly CreateDMG related. |
| 7 weeks ago |
Eric Wing |
Added tag 0.3.3 for changeset 11cec62989a4 |
| 7 weeks ago |
Eric Wing |
Updated stuff for 0.3.3 release.0.3.3 |
| 7 weeks ago |
Eric Wing |
Applied same alloc/init bypass optimizations for caching for ParseSupportMethod as seen in the previous commit for ParseSupportStruct. |
| 7 weeks ago |
Eric Wing |
One more optimization to struct bridge. Before, I was calling [[ParseSupportStruct alloc] init] in the struct metamethods which can get called a lot. These have caching already in place from a long time ago, but the alloc creates memory which needs to be immediately released if there is a cache find. This was showing up in the profiler so I made a new convenience class designated initializer which will check the cache before falling back to an alloc. |
| 7 weeks ago |
Eric Wing |
merged |
| 7 weeks ago |
Eric Wing |
merged |
| 7 weeks ago |
Eric Wing |
Added #define to TestApp to make it easier to switch where the autorelease pool is declared to make it easier to report a garbag collection bug to Apple. |
| 7 weeks ago |
Eric Wing |
Fix for returning structs through blocks created in Lua. |
| 7 weeks ago |
Eric Wing |
Added more caching for struct handling. Passing structs through the block callbacks was very expensive because NSXMLDocument kept getting recreated to analyze the struct size and signature. I added several of these functions to use ParseSupportCache to speed this up. |
| 7 weeks ago |
Eric Wing |
Compile fix for BlocksExample and removed print statement in block bridge. |
| 7 weeks ago |
Eric Wing |
Partial struct bridge redesign due to handle failing case of nsrect.size.width = 100. |
| 7 weeks ago |
Eric Wing |
Audit/fixes/cleanups to deal with the bug identified by Fjölnir Ásgeirsson. The subclass bridge had the bug. The function bridge had code that needed changing though I'm not sure if was an actual problem. I also cleaned the other uses of FFISupport_ParseSupportFunctionReturnValueToFFIType where they were providing stack memory when they didn't need to. |
| 7 weeks ago |
Eric Wing |
Removed accidental commit of test code that doesn't work. |
| 7 weeks ago |
Eric Wing |
Fjölnir Ásgeirsson caught some bugs with struct support and blocks. I'm mallocing memory and then losing the pointer and eventually the bad pointer leads to a crash. I had a comment above FFISupport_ParseSupportFunctionReturnValueToFFIType which warned me about this but I didn't read it. I temporarily disable the malloc and wrote a new simple test. I need to clean this up and also audit the section of code that this originally was copied from (probably subclass bridge). |
| 8 weeks ago |
Eric Wing |
Enhancements/changes to allow Obj-C defined blocks to be invoked on the Lua side. For this to work, a signature must be registered with LuaCocoa. Lua-created blocks get this automatically, but Obj-C blocks must be registered via: |
| 8 weeks ago |
Eric Wing |
Initial support to call a block from the Lua side (without extracting the Lua function). Next step is to extend it to work with all blocks, not just Lua created blocks. |
| 8 weeks ago |
Eric Wing |
Added LuaCocoa.toblock() and LuaCocoa.tofunction(). LuaCocoa.toLua is also modified to basically call LuaCocoa.tofunction() for Lua defined blocks. |
| 8 weeks ago |
Eric Wing |
Disabled debug NSLog that was annoying somebody. |
| 2 months ago |
Eric Wing |
Commented the recents stuff, window title, and proxy icon. |
| 2 months ago |
Eric Wing |
Removed unneeded code from PrototypeLauncher. |
| 2 months ago |
Eric Wing |
New Open/Save Panel example using Obj-C blocks to contrast to old delegate style example. New PrototypeLauncher app which is based off the HybridCoreAnimationScriptability example. New UndoManager example. |
| 2 months ago |
Eric Wing |
Fixed MacVim to escape/percent-encode URLs to handle spaces in path. Changed TextMate to use URL schemes. |
| 2 months ago |
Eric Wing |
Added hgignore for man pages. |
| 2 months ago |
Eric Wing |
Remaining fixes for main LuaCocoa class and SubclassBridge to deal with finalize happening on the non-origin thread. Subclass objects now contain a new hidden ivar which is [NSThread currentThread] on object creation. Like the block solution, it will do a comparison to the currentThread on dealloc/finalize and call the other thread for non-thread-safe cleanup. |
| 2 months ago |
Eric Wing |
Realized my fix was wrong for all the same reasons I went through so many headaches this past month. The cleanup needs be done on the origin thread, not necessarily the main thread. |
| 2 months ago |
Eric Wing |
Forgot that finalize is done on a background thread so I needed to fix the finalizer for the block cleanup. |
| 2 months ago |
Eric Wing |
Removed (now dead) dispatch_queue stuff from code. |
| 2 months ago |
Eric Wing |
Enhanced background queue test and fixed leak. |
| 2 months ago |
Eric Wing |
Refactored code duplication of ffi/lua argument wrangling code in subclass and block code to reuse the same implementation. |
| 2 months ago |
Eric Wing |
Enhanced test cases. Added NULL checks for in-pointer dereferencing to avoid crashes. |
| 2 months ago |
Eric Wing |
Added new test/example program for Blocks. |
| 2 months ago |
Eric Wing |
Merged |
| 2 months ago |
Eric Wing |
Enhanced Subclass and Block callbacks to automatically dereference pointers to known types when invoking Lua with a pointer parameter. |
| 2 months ago |
Eric Wing |
Quickly removed registrations to shared definition map in subclass bridge that I think are unnecessary. |
| 2 months ago |
Eric Wing |
Added category support and extended SimpleLuaView example to show category usage. |
| 2 months ago |
Eric Wing |
Typo fix in comment. |
| 2 months ago |
Eric Wing |
Changed lua_pcall failure to use [NSException raise:format:] instead of luaL_error because I'm not actually in a pcall which causes the program to die. |
| 2 months ago |
Eric Wing |
merged |
| 2 months ago |
Eric Wing |
Removal of obsolete code from LuaClassDefinitionMap. |
| 2 months ago |
Eric Wing |
Reimplementation of LuaClassDefinitionMap to track on a per-selector basis instead of per-class. This will help support categories. |
| 2 months ago |
Eric Wing |
merged |
| 2 months ago |
Eric Wing |
The solution I thought I was seeking from Charles Srstka from the Obj-C mailing list. I needed to use dispatch_sync, not dispatch_async to avoid the ffi pointer corruption. Unfortunately, I was immediately warned away from this solution by Dave Zarzycki. |
| 2 months ago |
Eric Wing |
Based on another suggestion by Charles Srstka from the Obj-C mailing list, I preserved the ideas behind using dispatch_get_current_queue() and dispatch_sync, but reimplemented with [NSThread currentThread] and performWithSelector:onThread:withObject:waitUntilDone: |
| 2 months ago |
Eric Wing |
In implementing blocks, I realized I needed to add a few more guards for conditions where the lua_State is closed in both blocks and subclasses. |
| 2 months ago |
Eric Wing |
Waypoint: Blocks: Added new singleton class to keep track of available Lua states to prevent block callbacks from invoking dead Lua states due to their asynchronous nature. |
| 2 months ago |
Eric Wing |
Waypoint: Blocks: Enhanced implementation to keep a map of a block for a Lua function. If a block already exists when trying to create a block for a Lua function, it will retrieve the existing block which will help with the 1-to-1 mapping. Note that the block's life-cycle may die before the Lua function. I haven't figured out if I can keep the block around for the life of the Lua function without creating a retain cycle where neither ever get cleaned up. |
| 2 months ago |
Eric Wing |
Waypoint: Blocks/Subclass bridge: Slightly refactored multiple return value code for out-pointers so it can be reused in the subclass bridge. Now applied to the subclass bridge. |
| 2 months ago |
Eric Wing |
Waypoint: Blocks: Added out-values for pointers for blocks by using multiple return values. array:enumerateObjectsUsingBlock BOOL* stop now can be manipulated by returning a value from the function. |