diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bindings/swig/csharp/CMakeLists.txt | 15 | ||||
-rw-r--r-- | src/bindings/swig/csharp/uscxml.i | 19 | ||||
-rw-r--r-- | src/uscxml/util/URL.cpp | 2 |
3 files changed, 21 insertions, 15 deletions
diff --git a/src/bindings/swig/csharp/CMakeLists.txt b/src/bindings/swig/csharp/CMakeLists.txt index 966f740..fc07676 100644 --- a/src/bindings/swig/csharp/CMakeLists.txt +++ b/src/bindings/swig/csharp/CMakeLists.txt @@ -56,27 +56,30 @@ if (DMCS_EXECUTABLE OR CSC_EXECUTABLE) # build managed code part if (CSC_EXECUTABLE) - ADD_CUSTOM_TARGET(csharp + ADD_CUSTOM_COMMAND( # ADD_CUSTOM_TARGET is always considered outdated + OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/org/uscxml/InterpreterException.cs ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml COMMAND ${CSC_EXECUTABLE} /target:library /out:${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll *.cs - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml - COMMENT "Creating umundoCSharp.dll for C# ...") + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml + COMMENT "Creating uscxmlCSharp.dll for C# ...") else() - ADD_CUSTOM_TARGET(csharp + ADD_CUSTOM_COMMAND( + OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/org/uscxml/InterpreterException.cs ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml COMMAND ${DMCS_EXECUTABLE} -target:library /out:${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll *.cs - WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/bindings/swig/csharp/org/uscxml COMMENT "Creating umundoCSharp.dll for Mono ...") endif() - + ADD_CUSTOM_TARGET(csharp DEPENDS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/uscxmlCSharp.dll) + add_dependencies(csharp uscxmlNativeCSharp) if (BUILD_TESTS) add_dependencies(ALL_TESTS csharp) diff --git a/src/bindings/swig/csharp/uscxml.i b/src/bindings/swig/csharp/uscxml.i index ac154c5..154bda3 100644 --- a/src/bindings/swig/csharp/uscxml.i +++ b/src/bindings/swig/csharp/uscxml.i @@ -178,7 +178,6 @@ WRAP_TO_STRING(uscxml::InterpreterIssue); // Beautify important classes //*********************************************** - // byte[] signature for Blob get/setData // see http://permalink.gmane.org/gmane.comp.programming.swig/5804 @@ -216,6 +215,9 @@ WRAP_TO_STRING(uscxml::InterpreterIssue); $result = (char *)result; } +%include "../uscxml_beautify.i" + +#if 0 %csmethodmodifiers uscxml::Event::getParamMap() "private"; @@ -228,7 +230,6 @@ WRAP_TO_STRING(uscxml::InterpreterIssue); %csmethodmodifiers uscxml::Interpreter::getIOProcessors() "private"; %csmethodmodifiers uscxml::Data::getCompoundKeys() "private"; -%include "../uscxml_beautify.i" %typemap(csimports) uscxml::Interpreter %{ using System; @@ -241,7 +242,7 @@ using System.Runtime.InteropServices; Dictionary<string, NativeIOProcessor> ioProcs = new Dictionary<string, NativeIOProcessor>(); StringVector keys = getIOProcessorKeys(); IOProcMap ioProcMap = getIOProcessorsNative(); - for (size_t i = 0; i < keys.Count; i++) { + for (int i = 0; i < keys.Count; i++) { ioProcs[keys[i]] = ioProcMap[keys[i]]; } return ioProcs; @@ -251,7 +252,7 @@ using System.Runtime.InteropServices; Dictionary<string, NativeInvoker> invokers = new Dictionary<string, NativeInvoker>(); StringVector keys = getInvokerKeys(); InvokerMap invokerMap = getInvokersNative(); - for (size_t i = 0; i < keys.Count; i++) { + for (int i = 0; i < keys.Count; i++) { invokers[keys[i]] = invokerMap[keys[i]]; } return invokers; @@ -293,7 +294,7 @@ using System.Runtime.InteropServices; Dictionary<string, Data> compound = new Dictionary<string, Data>(); DataMap dataMap = getCompoundNative(); StringVector dataMapKeys = getCompoundKeys(); - for (size_t i = 0; i < dataMapKeys.Count; i++) { + for (int i = 0; i < dataMapKeys.Count; i++) { compound[dataMapKeys[i]] = dataMap[dataMapKeys[i]]; } return compound; @@ -310,7 +311,7 @@ using System.Runtime.InteropServices; public List<Data> getArray() { List<Data> arr = new List<Data>(); DataList dataList = getArrayNative(); - for (size_t i = 0; i < dataList.size(); i++) { + for (int i = 0; i < dataList.size(); i++) { arr.Add(dataList.get(i)); } return arr; @@ -350,7 +351,7 @@ using System.Runtime.InteropServices; foreach (KeyValuePair<string, DataList> entry in paramMap) { DataList dataList = entry.Value; List<Data> paramList = new List<Data>(); - for (size_t i = 0; i < dataList.size(); i++) { + for (int i = 0; i < dataList.size(); i++) { Data data = dataList.get(i); paramList.Add(data); } @@ -375,7 +376,7 @@ using System.Runtime.InteropServices; Dictionary<string, Data> nameList = new Dictionary<string, Data>(); DataMap nameListMap = getNameListNative(); StringVector nameListMapKeys = getNameListKeys(); - for (size_t i = 0; i < nameListMapKeys.Count; i++) { + for (int i = 0; i < nameListMapKeys.Count; i++) { nameList[nameListMapKeys[i]] = nameListMap[nameListMapKeys[i]]; } return nameList; @@ -390,6 +391,8 @@ using System.Runtime.InteropServices; } %} +#endif + //*********************************************** // Parse the header file to generate wrappers //*********************************************** diff --git a/src/uscxml/util/URL.cpp b/src/uscxml/util/URL.cpp index 3fcb387..b429e22 100644 --- a/src/uscxml/util/URL.cpp +++ b/src/uscxml/util/URL.cpp @@ -968,7 +968,7 @@ void URLFetcher::perform() { case -1: { /* select error */ #if 0 - // this is not an actual error - there was just nothing to process + // this is not an actual error - there was just nothing to process #ifdef _WIN32 char *s = NULL; FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, |