[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [smokegen/smokev4] /: implement signal return values, fix some marshalling errors
From: Arno Rehn <arno () arnorehn ! de>
Date: 2012-10-12 14:03:19
Message-ID: 20121012140319.0D89DA60E6 () git ! kde ! org
[Download RAW message or body]
Git commit edfce930612608578c931e00b42c312eac71a5d5 by Arno Rehn.
Committed on 09/10/2012 at 19:26.
Pushed by arnorehn into branch 'smokev4'.
implement signal return values, fix some marshalling errors
M +27 -0 smokeutils.cpp
M +2 -0 smokeutils.h
http://commits.kde.org/smokegen/edfce930612608578c931e00b42c312eac71a5d5
diff --git a/smokeutils.cpp b/smokeutils.cpp
index 74953c9..3dd452a 100644
--- a/smokeutils.cpp
+++ b/smokeutils.cpp
@@ -22,6 +22,33 @@
#include "smokeutils.h"
#include "smokemanager.h"
+void copyStackItem(Smoke::StackItem& dest, const Smoke::StackItem& src, short unsigned int typeId)
+{
+#define CASE(type) case Smoke::t_##type: dest.s_##type = src.s_##type; break;
+
+ switch (typeId) {
+ CASE(bool);
+ CASE(char);
+ CASE(uchar);
+ CASE(short);
+ CASE(ushort);
+ CASE(int);
+ CASE(uint);
+ CASE(long);
+ CASE(ulong);
+ CASE(longlong);
+ CASE(ulonglong);
+ CASE(float);
+ CASE(double);
+ CASE(longdouble);
+ CASE(enum);
+
+ default: dest.s_voidp = src.s_voidp;
+ }
+
+#undef CASE
+}
+
bool SmokeType::isUnsigned() const {
if (!typeId()) return false;
if (_unsigned > -1) return _unsigned;
diff --git a/smokeutils.h b/smokeutils.h
index ecad512..e6cb74a 100644
--- a/smokeutils.h
+++ b/smokeutils.h
@@ -48,6 +48,8 @@ constexpr std::size_t static_strlen(const CharType (&) [N]) {
return N - 1;
}
+void copyStackItem(Smoke::StackItem &dest, const Smoke::StackItem& src, unsigned short typeId);
+
class SmokeType {
protected:
Smoke::Type *_t; // derived from _mi, but cached
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic