Ver código fonte

Add development notification

Ole Krüger 10 anos atrás
pai
commit
d517eaf177
4 arquivos alterados com 19 adições e 19 exclusões
  1. 2 2
      README.md
  2. 1 1
      lib/luwra.hpp
  3. 15 15
      lib/luwra/functions.hpp
  4. 1 1
      lib/luwra/usertypes.hpp

+ 2 - 2
README.md

@@ -1,6 +1,8 @@
 # Luwra
 A header-only C++ library which provides a Lua wrapper with minimal overhead.
 
+NOTE: Luwra is under heavy development the documentation might not be current.
+
 ## Usage
 Most of Luwra's features are based on template specialization. If you are not familiar with
 templates in C++, I highly recommend you inform yourself about them. Otherwise the following
@@ -97,5 +99,3 @@ lua_CFunction cfunc = WrapFunction<lua_Number(lua_Number, lua_Number), my_add>;
 
 ### User types
 Something is going be here soon.
-
-Have a look at [the example](https://github.com/vapourismo/luwra/blob/master/examples/methods.cpp).

+ 1 - 1
lib/luwra.hpp

@@ -4,7 +4,7 @@
 #include "luwra/common.hpp"
 #include "luwra/types.hpp"
 #include "luwra/stack.hpp"
+#include "luwra/functions.hpp"
 #include "luwra/usertypes.hpp"
-#include "luwra/wrappers.hpp"
 
 #endif

+ 15 - 15
lib/luwra/wrappers.hpp → lib/luwra/functions.hpp

@@ -4,8 +4,8 @@
  * Copyright (C) 2015, Ole Krüger <ole@vprsm.de>
  */
 
-#ifndef LUWRA_WRAPPERS_H_
-#define LUWRA_WRAPPERS_H_
+#ifndef LUWRA_FUNCTIONS_H_
+#define LUWRA_FUNCTIONS_H_
 
 #include "common.hpp"
 #include "types.hpp"
@@ -24,37 +24,37 @@ namespace internal {
 
 	template <>
 	struct FunctionWrapper<void()> {
-		template <void(*funptr)()> static
-		int invoke(State*) {
-			funptr();
+		template <void(*FunctionPointer)()> static
+		int Invoke(State*) {
+			FunctionPointer();
 			return 0;
 		}
 	};
 
 	template <typename R>
 	struct FunctionWrapper<R()> {
-		template <R(*funptr)()> static
-		int invoke(State* state) {
-			return Value<R>::push(state, funptr());
+		template <R(*FunctionPointer)()> static
+		int Invoke(State* state) {
+			return Value<R>::push(state, FunctionPointer());
 		}
 	};
 
 	template <typename... A>
 	struct FunctionWrapper<void(A...)> {
-		template <void (*funptr)(A...)> static
-		int invoke(State* state) {
-			apply(state, funptr);
+		template <void (*FunctionPointer)(A...)> static
+		int Invoke(State* state) {
+			apply(state, FunctionPointer);
 			return 0;
 		}
 	};
 
 	template <typename R, typename... A>
 	struct FunctionWrapper<R(A...)> {
-		template <R (*funptr)(A...)> static
-		int invoke(State* state) {
+		template <R (*FunctionPointer)(A...)> static
+		int Invoke(State* state) {
 			return Value<R>::push(
 				state,
-				apply(state, funptr)
+				apply(state, FunctionPointer)
 			);
 		}
 	};
@@ -78,7 +78,7 @@ template <
 	S* FunctionPointer
 >
 constexpr CFunction WrapFunction =
-	&internal::FunctionWrapper<S>::template invoke<FunctionPointer>;
+	&internal::FunctionWrapper<S>::template Invoke<FunctionPointer>;
 
 LUWRA_NS_END
 

+ 1 - 1
lib/luwra/usertypes.hpp

@@ -10,7 +10,7 @@
 #include "common.hpp"
 #include "types.hpp"
 #include "stack.hpp"
-#include "wrappers.hpp"
+#include "functions.hpp"
 
 #include <sstream>
 #include <utility>