Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[win+java] fix the name of libwinpthread-1.dll
[simgrid.git] / src / bindings / java / surf.i
index a9e121e..2332cbc 100644 (file)
@@ -16,6 +16,8 @@ import org.simgrid.NativeLib;
 %}
 %pragma(java) jniclasscode=%{
   static {
+    if (System.getProperty("os.name").toLowerCase().startsWith("win"))
+        NativeLib.nativeInit("winpthread-1");
     NativeLib.nativeInit("simgrid");
     NativeLib.nativeInit("surf-java");
     Runtime.getRuntime().addShutdownHook(
@@ -121,7 +123,7 @@ JAVA_ARRAYSOFCLASSES(Action);
   jlong *elts = jenv->GetLongArrayElements($result, NULL);
   l = 0;
   for(ActionList::iterator it($1->begin()), itend($1->end()); it != itend ; ++it) {
-    elts[l++] = (jlong)static_cast<ActionPtr>(&*it);
+    elts[l++] = (jlong)static_cast<Action*>(&*it);
   }
   jenv->ReleaseLongArrayElements($result, elts, 0);
 }
@@ -236,8 +238,8 @@ struct tmgr_trace_event {
 %nodefaultctor Model;
 class Model {
 public:
-  Model(const char *name);
-  const char *getName();
+  Model();
+  
   virtual double shareResources(double now);
   virtual double shareResourcesLazy(double now);
   virtual double shareResourcesFull(double now);
@@ -254,7 +256,7 @@ public:
 %feature("director") CpuModel;
 class CpuModel : public Model {
 public:
-  CpuModel(const char *name);
+  CpuModel();
   virtual ~CpuModel();
   virtual Cpu *createCpu(const char *name, DoubleDynar power_peak,
                               int pstate, double power_scale,