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
ThePhD
8c023c54a5
This properly pushes a local function to the table. However, we're having issues because the tables are being constructed without an attachment to sol::state, making it impossible to keep std::shared_ptr's alive that contain the virtual interfaces necessary to handle those goddamn lambdas.
2013-12-07 21:16:23 -05:00
Rapptz
a4a4d21376
Allow polymorphic object class to handle sol::function
2013-12-03 01:20:31 -05:00
Rapptz
101e80c913
Remove unused unordered_map
2013-12-02 23:59:44 -05:00
Rapptz
6ff859ba29
Stylistic changes to match the rest of the code
2013-12-02 23:33:23 -05:00
ThePhD
45000177c3
Alright, this should fix the GCC build errors! Everything should work as advertised. A Sol for the Mun: go, go!
2013-12-02 21:39:21 -05:00
ThePhD
86b16dc61b
GCC is still not compiling, complaining about detail::ltr_pop and not being able to find a proper overload. I'm not sure why it's complaining, I'll have to look in more detail soon.
2013-12-02 20:12:25 -05:00
ThePhD
17ec059c32
Move ltr_pop down, so that GCC can see the right instantiations of the functions it needs.
2013-12-02 19:34:10 -05:00
ThePhD
bf2404bdfd
More style fixes and more attempts to make sure this compiles between GCC and MSVC.
2013-12-02 19:15:23 -05:00
ThePhD
29f171e124
Style fixes and fixes for templates not usually used by MSVC (broken two-phase lookup killing me here. :c)
...
Member functions now work as well for set_function. If performance of `new`ing a type ever becomes too large, we can create a custom allocator for the std::shared_ptr's of the types. We can also up-front allocate for the unordered_map as well.
2013-12-02 18:11:25 -05:00
ThePhD
be98a4fdd4
Reformatted to look like Rapptz's style. The following code sample work without error in VS 2013: http://pastebin.com/s4Jbjnht
...
It'll be up to @Rapptz's to make further changes to make sure GCC compiles, but the core of the functionality is there and my work is essentially done.
Class bindings are up next, but really I don't want to even touch those. :c
2013-12-02 15:42:03 -05:00
ThePhD
f67b21b525
The solution technically works, but there's some stack corruption going on somewhere that I can quite track down, even when calling a void function with no parameters. I'll have to look into it...
2013-12-02 14:22:51 -05:00
ThePhD
ebf4908c27
Formatting corrections
2013-12-01 18:57:28 -05:00
ThePhD
9f79e8c573
function header with addition to sol.hpp so that a person can do function invocations on lua functions without explicitly adding sol/functions.hpp
2013-12-01 18:15:26 -05:00
ThePhD
24c76d3e03
Added VS2013 files to gitignore.
2013-12-01 17:27:17 -05:00
Rapptz
1f22cdd19e
Add size function to query table size
2013-11-30 21:17:15 -05:00
Rapptz
83cfcc3694
Add polymorphic lua object type
2013-11-30 21:12:50 -05:00
Rapptz
b80e77b9c2
Add using statements for basic EnableIf and DisableIf
2013-11-29 17:57:46 -05:00
Rapptz
8ed913e8c1
Allow specification of index in get<T> function
2013-11-28 22:51:51 -05:00
Rapptz
796fd6903e
Switched pop to get and wrote a new pop<T> function
2013-11-28 18:27:27 -05:00
Rapptz
f49e35a105
Add call function to transform a tuple into function arguments
2013-11-28 06:50:26 -05:00
Rapptz
4f714539d6
Make reference pushing take an actual reference to the object instead of by value
2013-11-26 05:07:10 -05:00
Rapptz
294e37f822
Allow creation of tables
2013-11-26 04:06:48 -05:00
Rapptz
12aac41b9e
Readd support for types that inherit from reference
2013-11-26 04:05:04 -05:00
Rapptz
ecb44462af
Revert "Allow push to work with types that inherit from reference"
...
This reverts commit f2d72f7bb2
.
2013-11-26 01:21:53 -05:00
Rapptz
c3ca4d9610
FIx error with loading coroutine library
2013-11-26 01:07:18 -05:00
HFCPC
bf90dbcc81
Fix error with sol::state set function returning an instance of the global table
2013-11-25 16:45:00 -05:00
HFCPC
f2d72f7bb2
Allow push to work with types that inherit from reference
2013-11-25 16:44:05 -05:00
HFCPC
c8c82ee56b
Add support for specific library imports
2013-11-25 15:53:28 -05:00
Rapptz
45f801f740
make pop<bool> compare to 0 instead of casting to bool
2013-11-25 06:14:46 -05:00
Rapptz
1c423da153
Removed uses of constexpr for MSVC 2013
2013-11-25 05:20:14 -05:00
Rapptz
f775790c2d
Initial commit
2013-11-25 04:56:27 -05:00