From a5e24b4fa2ef13eaee0647e230c69956d615ce86 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 21 Jul 2015 19:26:35 -0400 Subject: [PATCH 1/3] Fix userdata -> usertype in examples. --- README.md | 2 +- bootstrap.py | 2 +- examples/{userdata.cpp => usertype.cpp} | 213 ++++++++++++------------ 3 files changed, 111 insertions(+), 106 deletions(-) rename examples/{userdata.cpp => usertype.cpp} (75%) diff --git a/README.md b/README.md index 5daebd20..ce908c98 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ struct vars { int main() { sol::state lua; - lua.new_userdata("vars", "boop", &vars::boop); + lua.new_usertype("vars", "boop", &vars::boop); lua.script("beep = vars.new()\n" "beep.boop = 1"); assert(lua.get("beep").boop == 1); diff --git a/bootstrap.py b/bootstrap.py index 1d6a0b3b..ce6750eb 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -50,7 +50,7 @@ args = parser.parse_args() # general variables include = [ '.', os.path.join('Catch', 'include')] depends = [] -cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++11' ] +cxxflags = [ '-Wall', '-Wextra', '-pedantic', '-pedantic-errors', '-std=c++11', '-Wno-unused-variable' ] ldflags = [] script_dir = os.path.dirname(os.path.realpath(sys.argv[0])) sol_dir = os.path.join(script_dir, 'sol') diff --git a/examples/userdata.cpp b/examples/usertype.cpp similarity index 75% rename from examples/userdata.cpp rename to examples/usertype.cpp index 96d269f4..15457590 100644 --- a/examples/userdata.cpp +++ b/examples/usertype.cpp @@ -1,104 +1,109 @@ -#include -#include -#include -#include - -struct foo { -private: - std::string name; -public: - foo(std::string name): name(std::string(name)) {} - - void print() { - std::cout << name << '\n'; - } - - int test(int x) { - return name.length() + x; - } -}; - -struct vector { -private: - float x = 0; - float y = 0; -public: - vector() = default; - vector(float x): x(x) {} - vector(float x, float y): x(x), y(y) {} - - bool is_unit() const { - return (x * x + y * y) == 1.f; - } -}; - -struct variables { - bool low_gravity = false; - int boost_level = 0; - -}; - -int main() { - sol::state lua; - lua.open_libraries(sol::lib::base, sol::lib::math); - - // the simplest way to create a class is through - // sol::state::new_userdata - // the first template is the class type - // the rest are the constructor parameters - // using new_userdata you can only have one constructor - - - // you must make sure that the name of the function - // goes before the member function pointer - lua.new_userdata("foo", "print", &foo::print, "test", &foo::test); - - // making the class from lua is simple - // same with calling member functions - lua.script("x = foo.new('test')\n" - "x:print()\n" - "y = x:test(10)"); - - auto y = lua.get("y"); - assert(y == 14); - - // if you want a class to have more than one constructor - // the way to do so is through set_userdata and creating - // a userdata yourself with constructor types - - { - // Notice the brace: this means we're in a new scope - // first, define the different types of constructors - sol::constructors, sol::types, sol::types> ctor; - - // the only template parameter is the class type - // the first argument of construction is the name - // second is the constructor types - // then the rest are function name and member function pointer pairs - sol::userdata udata("vector", ctor, "is_unit", &vector::is_unit); - - // then you must register it - lua.set_userdata(udata); - // You can throw away the userdata after you set it: you do NOT - // have to keep it around - // cleanup happens automagically - } - // calling it is the same as new_userdata - - lua.script("v = vector.new()\n" - "v = vector.new(12)\n" - "v = vector.new(10, 10)\n" - "assert(not v:is_unit())\n"); - - // You can even have C++-like member-variable-access - // just pass is public member variables in the same style as functions - lua.new_userdata("variables", "low_gravity", &variables::low_gravity, "boost_level", &variables::boost_level); - - // making the class from lua is simple - // same with calling member functions/variables - lua.script("local vars = variables.new()\n" - "assert(not vars.low_gravity)\n" - "vars.low_gravity = true\n" - "local x = vars.low_gravity\n" - "assert(x)"); -} +#include +#include +#include +#include + +struct foo { +private: + std::string name; +public: + foo(std::string name): name(std::string(name)) {} + + void print() { + std::cout << name << '\n'; + } + + int test(int x) { + return name.length() + x; + } +}; + +struct vector { +private: + float x = 0; + float y = 0; +public: + vector() = default; + vector(float x): x(x) {} + vector(float x, float y): x(x), y(y) {} + + bool is_unit() const { + return (x * x + y * y) == 1.f; + } +}; + +struct variables { + bool low_gravity = false; + int boost_level = 0; + +}; + +int main() { + sol::state lua; + lua.open_libraries(sol::lib::base, sol::lib::math); + + // the simplest way to create a class is through + // sol::state::new_usertype + // the first template is the class type + // the rest are the constructor parameters + // using new_usertype you can only have one constructor + + + // you must make sure that the name of the function + // goes before the member function pointer + lua.new_usertype("foo", "print", &foo::print, "test", &foo::test); + + // making the class from lua is simple + // same with calling member functions + lua.script("x = foo.new('test')\n" + "x:print()\n" + "y = x:test(10)"); + + auto y = lua.get("y"); + assert(y == 14); + + // if you want a class to have more than one constructor + // the way to do so is through set_usertype and creating + // a usertype yourself with constructor types + + { + // Notice the brace: this means we're in a new scope + // first, define the different types of constructors + sol::constructors, sol::types, sol::types> ctor; + + // the only template parameter is the class type + // the first argument of construction is the name + // second is the constructor types + // then the rest are function name and member function pointer pairs + sol::usertype udata(ctor, "is_unit", &vector::is_unit); + + // then you must register it + // by default, the registered name is done through demangling of T in sol::usertype + // using the demangling API provided by the compiler + // if you don't want to use the unmangled name, you can provide your own name like so: + // lua.set_usertype("vector", udata); + lua.set_usertype(udata); + + // You can throw away the usertype after you set it: you do NOT + // have to keep it around + // cleanup happens automagically + } + // calling it is the same as new_usertype + + lua.script("v = vector.new()\n" + "v = vector.new(12)\n" + "v = vector.new(10, 10)\n" + "assert(not v:is_unit())\n"); + + // You can even have C++-like member-variable-access + // just pass is public member variables in the same style as functions + lua.new_usertype("variables", "low_gravity", &variables::low_gravity, "boost_level", &variables::boost_level); + + // making the class from lua is simple + // same with calling member functions/variables + lua.script("local vars = variables.new()\n" + "assert(not vars.low_gravity)\n" + "vars.low_gravity = true\n" + "local x = vars.low_gravity\n" + "assert(x)"); +} From eae5c6f25901a4d138db8499f59e2afab762fbfa Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 21 Jul 2015 19:49:06 -0400 Subject: [PATCH 2/3] Add single.py script to create single headers. --- README.md | 6 +- single.py | 164 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ sol.hpp | 29 ---------- 3 files changed, 169 insertions(+), 30 deletions(-) create mode 100644 single.py delete mode 100644 sol.hpp diff --git a/README.md b/README.md index ce908c98..39d1c045 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Build Status](https://travis-ci.org/Rapptz/sol.svg?branch=master)](https://travis-ci.org/Rapptz/sol) -Sol is a C++ library binding to Lua. It currently supports Lua 5.2. Sol aims to be easy to use and easy to add to a project. +Sol is a C++ library binding to Lua. It currently supports Lua 5.2+. Sol aims to be easy to use and easy to add to a project. At this time, the library is header-only for easy integration with projects. ## Sneak Peek @@ -39,6 +39,10 @@ int main() { More examples are given in the examples directory. +## Creating a single header + +For maximum ease of use, a script called `single.py` is provided. You can run this script to create a single file version of the library so you can only include that part of it. Check `single.py --help` for more info. + ## Features - Supports retrieval and setting of multiple types including `std::string`. diff --git a/single.py b/single.py new file mode 100644 index 00000000..bafad43f --- /dev/null +++ b/single.py @@ -0,0 +1,164 @@ +#!/usr/bin/env python + +import argparse +import os, sys +import re +import datetime as dt + +# python 3 compatibility +try: + import cStringIO as sstream +except ImportError: + import io.StringIO as sstream + +description = "Converts sol to a single file for convenience." + +# command line parser +parser = argparse.ArgumentParser(usage='%(prog)s [options...]', description=description) +parser.add_argument('--output', '-o', help='name and location of where to place file', metavar='file', default='sol.hpp') +parser.add_argument('--quiet', help='suppress all output', action='store_true') +args = parser.parse_args() + +script_path = os.path.normpath(os.path.dirname(os.path.realpath(__file__))) +working_dir = os.getcwd() +os.chdir(script_path) + +intro = """// The MIT License (MIT) + +// Copyright (c) 2013 Danny Y., Rapptz + +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal in +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +// the Software, and to permit persons to whom the Software is furnished to do so, +// subject to the following conditions: + +// The above copyright notice and this permission notice shall be included in all +// copies or substantial portions of the Software. + +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +// This file was generated with a script. +// Generated {time} UTC +// This header was generated with sol {version} (revision {revision}) +// https://github.com/Rapptz/sol + +#ifndef {guard} +#define {guard} + +""" + +module_path = os.path.join(script_path) + +includes = set([]) +standard_include = re.compile(r'#include <(.*?)>') +local_include = re.compile(r'#include "(.*?)"') +ifndef_cpp = re.compile(r'#ifndef SOL_.*?_HPP') +define_cpp = re.compile(r'#define SOL_.*?_HPP') +endif_cpp = re.compile(r'#endif // SOL_.*?_HPP') + +def get_include(line, base_path): + local_match = local_include.match(line) + if local_match: + # local include found + full_path = os.path.normpath(os.path.join(base_path, local_match.group(1))).replace('\\', '/') + return full_path + + return None + + +def is_include_guard(line): + return ifndef_cpp.match(line) or define_cpp.match(line) or endif_cpp.match(line) + +def get_revision(): + return os.popen('git rev-parse --short HEAD').read().strip() + +def get_version(): + return os.popen('git describe --tags --abbrev=0').read().strip() + +def process_file(filename, out): + global includes + filename = os.path.normpath(filename) + + if filename in includes: + return + + includes.add(filename) + + if not args.quiet: + print('processing {}'.format(filename)) + + out.write('// beginning of {}\n\n'.format(filename)) + empty_line_state = True + + with open(filename, 'r') as f: + for line in f: + # skip comments + if line.startswith('//'): + continue + + # skip include guard non-sense + if is_include_guard(line): + continue + + # get relative directory + base_path = os.path.dirname(filename) + + # check if it's a standard file + std = standard_include.search(line) + if std: + std_file = os.path.join('std', std.group(0)) + if std_file in includes: + continue + includes.add(std_file) + + # see if it's an include file + name = get_include(line, base_path) + + if name: + process_file(name, out) + continue + + empty_line = len(line.strip()) == 0 + + if empty_line and empty_line_state: + continue + + empty_line_state = empty_line + + # line is fine + out.write(line) + + out.write('// end of {}\n\n'.format(filename)) + + +version = get_version() +revision = get_revision() +include_guard = 'SOL_SINGLE_INCLUDE_HPP' + +if not args.quiet: + print('Creating single header for sol') + print('Current version: {version} (revision {revision})\n'.format(version = version, revision = revision)) + + +processed_files = [os.path.join(script_path, 'sol', x) for x in ('state.hpp', 'object.hpp', 'function.hpp')] +result = '' + +ss = sstream.StringIO() +ss.write(intro.format(time=dt.datetime.utcnow(), revision=revision, version=version, guard=include_guard)) +for processed_file in processed_files: + process_file(processed_file, ss) + +ss.write('#endif // {}\n'.format(include_guard)) +result = ss.getvalue() +ss.close() + +with open(args.output, 'w') as f: + f.write(result) + diff --git a/sol.hpp b/sol.hpp deleted file mode 100644 index ce093f66..00000000 --- a/sol.hpp +++ /dev/null @@ -1,29 +0,0 @@ -// The MIT License (MIT) - -// Copyright (c) 2013 Danny Y., Rapptz - -// Permission is hereby granted, free of charge, to any person obtaining a copy of -// this software and associated documentation files (the "Software"), to deal in -// the Software without restriction, including without limitation the rights to -// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -// the Software, and to permit persons to whom the Software is furnished to do so, -// subject to the following conditions: - -// The above copyright notice and this permission notice shall be included in all -// copies or substantial portions of the Software. - -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -#ifndef SOL_HPP -#define SOL_HPP - -#include "sol/state.hpp" -#include "sol/object.hpp" -#include "sol/function.hpp" - -#endif // SOL_HPP From 38d03eef6edb5485310aaf2d548fce70a5d1d1a6 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Tue, 21 Jul 2015 19:51:17 -0400 Subject: [PATCH 3/3] Update copyright year. --- LICENSE.txt | 2 +- single.py | 2 +- sol/debug.hpp | 2 +- sol/default_construct.hpp | 2 +- sol/demangle.hpp | 2 +- sol/deprecate.hpp | 4 ++-- sol/error.hpp | 2 +- sol/function.hpp | 4 ++-- sol/function_types.hpp | 2 +- sol/object.hpp | 2 +- sol/proxy.hpp | 2 +- sol/reference.hpp | 2 +- sol/resolve.hpp | 2 +- sol/stack.hpp | 2 +- sol/state.hpp | 2 +- sol/table.hpp | 2 +- sol/traits.hpp | 8 ++++---- sol/tuple.hpp | 4 ++-- sol/types.hpp | 2 +- sol/usertype.hpp | 2 +- sol/usertype_traits.hpp | 2 +- 21 files changed, 27 insertions(+), 27 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 3619ff30..70efdf21 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2013 Danny Y., Rapptz +Copyright (c) 2013-2015 Rapptz and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/single.py b/single.py index bafad43f..f46d22df 100644 --- a/single.py +++ b/single.py @@ -25,7 +25,7 @@ os.chdir(script_path) intro = """// The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/debug.hpp b/sol/debug.hpp index 4fe2c7b8..5ed2d9dc 100644 --- a/sol/debug.hpp +++ b/sol/debug.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/default_construct.hpp b/sol/default_construct.hpp index 73165ba1..6a6fef91 100644 --- a/sol/default_construct.hpp +++ b/sol/default_construct.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/demangle.hpp b/sol/demangle.hpp index 78f4dd4f..4a8f6350 100644 --- a/sol/demangle.hpp +++ b/sol/demangle.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/deprecate.hpp b/sol/deprecate.hpp index 498e4807..f5207481 100644 --- a/sol/deprecate.hpp +++ b/sol/deprecate.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in @@ -26,7 +26,7 @@ #ifdef _MSC_VER #define SOL_DEPRECATED __declspec(deprecated) #elif __GNUC__ - #define SOL_DEPRECATED __attribute__((deprecated)) + #define SOL_DEPRECATED __attribute__((deprecated)) #else #define SOL_DEPRECATED [[deprecated]] #endif // compilers diff --git a/sol/error.hpp b/sol/error.hpp index c64cf453..1d5e4593 100644 --- a/sol/error.hpp +++ b/sol/error.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/function.hpp b/sol/function.hpp index 3a2c563a..c2dedcdb 100644 --- a/sol/function.hpp +++ b/sol/function.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in @@ -179,7 +179,7 @@ struct pusher> { int upvalues = stack::detail::push_as_upvalues(L, memfxptr); upvalues += stack::push(L, userobjdata); - + stack::push(L, freefunc, upvalues); } diff --git a/sol/function_types.hpp b/sol/function_types.hpp index 1da7dc80..17899323 100644 --- a/sol/function_types.hpp +++ b/sol/function_types.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/object.hpp b/sol/object.hpp index 2d6ccba0..f141d593 100644 --- a/sol/object.hpp +++ b/sol/object.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/proxy.hpp b/sol/proxy.hpp index a2fe3254..aab24807 100644 --- a/sol/proxy.hpp +++ b/sol/proxy.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/reference.hpp b/sol/reference.hpp index 0f2f786e..ed843c3e 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/resolve.hpp b/sol/resolve.hpp index 1f6f6066..b5cc272e 100644 --- a/sol/resolve.hpp +++ b/sol/resolve.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/stack.hpp b/sol/stack.hpp index d526968d..e304e428 100644 --- a/sol/stack.hpp +++ b/sol/stack.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/state.hpp b/sol/state.hpp index 0c6dc8f9..9046671e 100644 --- a/sol/state.hpp +++ b/sol/state.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/table.hpp b/sol/table.hpp index d5ab4720..2e1978e7 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/traits.hpp b/sol/traits.hpp index b9fcc2d4..7f45bf2a 100644 --- a/sol/traits.hpp +++ b/sol/traits.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in @@ -120,9 +120,9 @@ struct return_type { template<> struct return_type<> : types<>{ typedef void type; -}; - -namespace detail { +}; + +namespace detail { template>::value> struct is_function_impl : std::is_function::type> {}; diff --git a/sol/tuple.hpp b/sol/tuple.hpp index 670359fd..a9dc74c6 100644 --- a/sol/tuple.hpp +++ b/sol/tuple.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in @@ -58,7 +58,7 @@ struct build_reverse_indices<0, Ns...> : indices {}; template struct types : build_indices { typedef types type; }; - + namespace detail { template struct reversed_ : Acc{}; diff --git a/sol/types.hpp b/sol/types.hpp index 676ef316..8787e7df 100644 --- a/sol/types.hpp +++ b/sol/types.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/usertype.hpp b/sol/usertype.hpp index f7ebea3f..2434d1fa 100644 --- a/sol/usertype.hpp +++ b/sol/usertype.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in diff --git a/sol/usertype_traits.hpp b/sol/usertype_traits.hpp index 34871f55..5ad05512 100644 --- a/sol/usertype_traits.hpp +++ b/sol/usertype_traits.hpp @@ -1,6 +1,6 @@ // The MIT License (MIT) -// Copyright (c) 2013 Danny Y., Rapptz +// Copyright (c) 2013-2015 Rapptz and contributors // Permission is hereby granted, free of charge, to any person obtaining a copy of // this software and associated documentation files (the "Software"), to deal in