Commit Graph

1917 Commits

Author SHA1 Message Date
ThePhD
49ad128493 If you want to have return types, use .call instead of operator(). 2013-12-13 23:30:16 -05:00
ThePhD
c6f6203ab2 We can avoid unused variable issues entirely and keep MSVC from borking out by explicitly declaring the size of the swallow declaration. This should make all compilers happy. 2013-12-13 23:26:59 -05:00
ThePhD
009a79606a It has to be a reference, not a value. I mistakenly thought typename Table was taken by reference... oh well. It's fixed now. I wish VC++ didn't choke so badly on decltype. 2013-12-13 22:34:56 -05:00
ThePhD
9624dd93e7 VC++ Compat again. 2013-12-13 20:09:51 -05:00
ThePhD
4dab754b86 VC++ Compatibility and some changes to function I'll need to test. 2013-12-13 17:50:24 -05:00
Rapptz
ebbceeb9e2 Add support for const table operator[] retrieval 2013-12-13 15:40:20 -05:00
Danny
b2e83d4fca Merge pull request #7 from ThePhD/master
VC++ Compatibility
2013-12-13 12:05:04 -08:00
ThePhD
856d28ab70 EnableIf and DisableIf back in place, type trait fixed for MSVC. Bleh, this is a lot of work. Removed functional header, because nobody's using it. 2013-12-13 14:59:46 -05:00
ThePhD
dc6935553b Forgot a private on table. 2013-12-13 14:19:04 -05:00
ThePhD
2192e98eec MSVC needs explicit overloads and explicit =default operators on sol::function. It's quite whacky, really. Anyway, it compiles, so let's just make sure this works for GCC too. 2013-12-13 14:16:59 -05:00
Rapptz
8db67834b2 Add test cases for operator[] 2013-12-12 20:20:46 -05:00
Rapptz
af0097fb7f Add support for setting functions with operator[] 2013-12-12 19:48:26 -05:00
Rapptz
7cc8c93289 Move type traits to its own header and clean up code using the traits 2013-12-12 18:43:36 -05:00
Rapptz
5eeaedec2f Basic operator[] support for tables 2013-12-12 18:12:07 -05:00
Rapptz
d44a215216 Remove trivial destructors from lua_func types 2013-12-12 14:36:09 -05:00
Rapptz
ffb32f45ad Renamed sol.scratch.cpp to tests.cpp 2013-12-12 05:40:05 -05:00
Rapptz
5e8379558f Update README 2013-12-12 05:33:44 -05:00
Rapptz
9f36db8148 Rename script_file to open_file 2013-12-12 05:31:35 -05:00
Rapptz
c241a3df92 Remove redundant check for narr and nrec variables in create_table 2013-12-12 05:12:45 -05:00
Rapptz
fdf145ecd8 Minor stylistic changes to be consistent 2013-12-12 05:11:09 -05:00
Danny
61e49d9829 Merge pull request #6 from ThePhD/master
Catch, Tests and 64-bit compatibility with Fixes
2013-12-12 01:39:07 -08:00
ThePhD
a59320787f We apparently need to link in dl (dladdr) manually. 2013-12-11 23:43:33 -05:00
ThePhD
2b4f9cc24c Meh, who needs "eval". It's technically right, but I think evaluate might be for shorter lines and stuff... who knows. 2013-12-11 18:16:52 -05:00
ThePhD
0da6ff4690 Test cases for tables and the opening of libraries. 2013-12-11 18:14:12 -05:00
ThePhD
e9d90d617c Well, -llua5.2. At least it's more explicit. 2013-12-11 13:26:54 -05:00
ThePhD
9204a019ba Checking once more if we need additional library paths... 2013-12-11 13:22:05 -05:00
ThePhD
029bd91e23 Weeee, = instead of -! 2013-12-11 13:17:14 -05:00
ThePhD
b77fd29f37 ~Installed~ 2013-12-11 13:14:34 -05:00
ThePhD
e6a9688b80 If this works, Ninja is stupid. 2013-12-11 12:51:10 -05:00
ThePhD
459bbcaba0 GCC is lame. But at least it's building now. Fixed up the build.ninja and made all tests pass (exceptions weren't being thrown because of lua_pcall: use lua_call to let exceptions propogate naturally). 2013-12-11 12:42:00 -05:00
Dave Snider
0482faa2e2 add note about running locally. fixes #68 2013-12-11 09:37:38 -08:00
ThePhD
bcf4b9b08f Have I mentioned I hate GCC? I hate GCC. 2013-12-11 11:56:34 -05:00
ThePhD
350f430d74 Improved tests, added a build.ninja for TeamCity, and fixed formatting again to work with Rapptz's style. 2013-12-11 11:18:13 -05:00
ThePhD
dd63621453 Added some catch tests and a basic nil getter. 2013-12-11 08:32:27 -05:00
ThePhD
e7f8ec9e5c CATCH for tests. 2013-12-11 06:38:25 -05:00
ThePhD
a5d14580b1 Adding sol.scratch.cpp, and will also add CATCH for tests. 2013-12-11 06:34:18 -05:00
ThePhD
fc19896815 Some changes to make sure builds go through on 64-bit. 2013-12-11 06:10:30 -05:00
Rapptz
9e47ec6b06 Merge branch 'master' of https://github.com/ThePhD/sol into ThePhD 2013-12-09 17:20:21 -05:00
ThePhD
e53c47f7b1 Okay, so now it compiles without errors or warnings and works pretty well. This should be the last piece necessary for full working conformance. Yey~ 2013-12-09 17:01:52 -05:00
Rapptz
404dc641a9 Merge branch 'master' of https://github.com/ThePhD/sol into ThePhD 2013-12-09 14:27:39 -05:00
ThePhD
19d01ecd1d Okay, cleaned up includes and now the newest feature:
STATEFUL FUNCTIONS!
Any stateful function now works and is properly cleaned up, thanks to some additional metatables that are associated with the function values.
This lays the ground work for class bindings, but that's a far off dream. For now, table retrieval and `operator[]` is what's for dinner.
2013-12-09 14:12:38 -05:00
ThePhD
21142e7e7d Removed std::unordered_map storage on tables since they were getting deleted anyways.
Memory leaks are currently present: will have to figure out how to patch those up.
2013-12-09 12:05:17 -05:00
Rapptz
599673150e Remove construction from a filename as it's pretty useless 2013-12-09 00:22:37 -05:00
ThePhD
51f7010363 Additional nullptr's for GCC's whining ass, and more reinterpret casts. Also for GCC's whiny ass. 2013-12-09 00:04:37 -05:00
ThePhD
2d2ad59492 Well, now that we've optimized l-values, the only reason for explicit_lua_func and member pointers is for it to actually store it. To we store a T now, isntead of a T*. 2013-12-09 00:01:28 -05:00
ThePhD
a66ceb92f7 GCC is retarded. Well, mostly retarded, anyhow... 2013-12-08 23:51:18 -05:00
ThePhD
288fd1319c Ranged for loop. Because ~~clean code~~. 2013-12-08 23:42:20 -05:00
ThePhD
854cbeef71 Fixing style to fit @Rapptz's usual no-tabs, four-space-indents, template<> no-spaces stuff. 2013-12-08 23:09:07 -05:00
ThePhD
49c73c4725 Heavy optimizations to stateless and lvalue member functions allow us to make many of the general use cases of lambdas and member function pointers work out.
This will be useful. The next fix has tobe in table.hpp in the std::false_type ... specialization of the private `set_fx` function.
2013-12-08 23:05:03 -05:00
Daniel Oaks
8bd1938c8b html logo_only is now an option 2013-12-08 23:18:43 +10:00