]> SALOME platform Git repositories - modules/paravis.git/commitdiff
Salome HOME
Merge branch 'master' of ssh://git.salome-platform.org/modules/paravis
authorabn <adrien.bruneton@cea.fr>
Wed, 2 Dec 2015 10:48:07 +0000 (11:48 +0100)
committerabn <adrien.bruneton@cea.fr>
Wed, 2 Dec 2015 10:48:07 +0000 (11:48 +0100)
src/Plugins/CMakeLists.txt
src/Plugins/JSONReader/JSONParser/vtkJSONParser.cxx
src/Plugins/JSONReader/JSONParser/vtkJSONParser.h
test/standalone/simple/CMakeLists.txt
test/standalone/simple/PyInterp.h
test/standalone/simple/PyInterp_Utils.h

index 20310a0793a642f8b21ec90190030d60fdca6f4f..2a5d8349dbc5b23617689c81a4118823998b68cd 100755 (executable)
 
 INCLUDE(${PARAVIEW_USE_FILE})
 
-IF(WIN32)
-  REMOVE_DEFINITIONS(-D_SECURE_SCL=0 -D_SECURE_SCL_THROWS=0)
-  IF(NOT CMAKE_BUILD_TYPE STREQUAL "RELEASE" AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
-    REMOVE_DEFINITIONS(-D_HAS_ITERATOR_DEBUGGING=0)  
-  ENDIF() 
-ENDIF() 
-
 SET(_subdirs
   MEDReader 
 #  TableReader  
index 6a88dd9aa5dcfe573f648893b751a48da49ffffe..7211fdb072e436711265002d2bbfcd7e4df62795 100644 (file)
 //DEBUG macro
 //#define __DEBUG
 
+#ifdef WIN32
+#include <limits>
+#define NAN std::numeric_limits<double>::quiet_NaN()
+#define isnan _isnan
+#endif
 
 // Key words
 #define MD  "_metadata"
@@ -319,9 +324,9 @@ void vtkJSONParser::finalize( vtkTable *t ) {
           vtkJSONMap::iterator mit = vl.find(this->ShortNames[col]);
           if(mit != vl.end()) {
               newCol->SetValue(row, mit->second);
-              vl.erase(mit);
-              delete mit->first;
               const char* c = mit->first;
+              vl.erase(mit);
+              delete c;             
               c = 0;
               row++;
           } else {
@@ -723,7 +728,7 @@ char* vtkJSONParser::getString(long b, long e) {
   long old_pos = ftell(this->File);
   fseek(this->File, b, SEEK_SET);
   long data_s = e - b;
-  result = new char[data_s];
+  result = new char[data_s + 1]; // + 1 for the '\0' symbol
   result[0] = 0;
   size_t nb_read = fread(result, sizeof(char), data_s, this->File);  
   result[nb_read] = '\0';
index 9ebe61ed63d0d46aff4fb3a811f99cf2142cf5bd..71b00c6861be0e82787dafdd4fd72bb839f2fd45 100644 (file)
@@ -34,7 +34,7 @@ class vtkJSONMetaNode;
 class vtkJSONInfoNode;
 
 //---------------------------------------------------
-class vtkJSONException : public std::exception {
+class VTK_EXPORT vtkJSONException : public std::exception {
  public:
     vtkJSONException(const char *reason);
     ~vtkJSONException() throw ();
@@ -43,7 +43,7 @@ class vtkJSONException : public std::exception {
   std::string Reason;
 }; 
 
-class vtkJSONParser : public vtkObject
+class VTK_EXPORT vtkJSONParser : public vtkObject
 {
 public:
   static vtkJSONParser* New();
index 3ae3cecb3b6d503ca0f276e420960991c4bf3dd5..9fba773fdcfc50a4e3da1aa91125f4ce6da0b45c 100644 (file)
@@ -32,5 +32,5 @@ INCLUDE_DIRECTORIES(
   )
 
 ADD_EXECUTABLE(paraCmdLine ${pl_SOURCES})
-TARGET_LINK_LIBRARIES(paraCmdLine ${PYTHON_LIBRARIES} ${QT_LIBRARIES} pqApplicationComponents)
+TARGET_LINK_LIBRARIES(paraCmdLine ${PYTHON_LIBRARIES} ${QT_LIBRARIES} pqApplicationComponents vtkRenderingFreeTypeOpenGL)
 
index 5bfedf344946fbbc87c983aa1bf068e79dc14b6c..7bf63df23ee89fc9086cace6c683db19822070d8 100755 (executable)
 #if !defined ( PYINTERP_H )
 #define PYINTERP_H
 
-// ========================================================
-// set dllexport type for Win platform 
-#ifdef WIN32
-# if defined PYINTERP_EXPORTS || defined PyInterp_EXPORTS
-#  define PYINTERP_EXPORT __declspec(dllexport)
-# else
-#  define PYINTERP_EXPORT __declspec(dllimport)
-# endif
-#else   // WIN32
-# define PYINTERP_EXPORT
-#endif  // WIN32
-
 // ========================================================
 // little trick - if we do not have debug python libraries
 #ifdef _DEBUG
index 31bbd9f15f791264d455d1da410f38db41744cfe..039c18574f083f5b2a82c24afbd3d1bb60881a1d 100644 (file)
@@ -41,7 +41,7 @@
  * When the class is instanciated the lock is acquired. It is released at destruction time.
  * Copy construction (and hence assignation) is forbidden.
  */
-class PYINTERP_EXPORT PyLockWrapper
+class PyLockWrapper
 {
 
 public:
@@ -85,7 +85,7 @@ private:
  * \class PyObjWrapper
  * \brief Utility class to properly handle the reference counting required on Python objects.
  */
-class PYINTERP_EXPORT PyObjWrapper
+class PyObjWrapper
 {
   PyObject* myObject;
 public: