changeset 901:e4f918ebd927

fix AtomicTImpl.cbc
author anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp>
date Wed, 27 Jan 2021 16:31:41 +0900
parents 600340b6c03b
children 58037271d763
files src/parallel_execution/examples/DPPMC/AtomicTImpl.cbc src/parallel_execution/generate_stub.pl
diffstat 2 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/parallel_execution/examples/DPPMC/AtomicTImpl.cbc	Wed Jan 27 16:22:19 2021 +0900
+++ b/src/parallel_execution/examples/DPPMC/AtomicTImpl.cbc	Wed Jan 27 16:31:41 2021 +0900
@@ -6,8 +6,8 @@
     struct AtomicT_int* atomicT_int  = new AtomicT_int();
     struct AtomicT_intImpl_int* atomic_t_impl = new AtomicT_intImpl_int();
     atomicT_int->atomicT_int = (union Data*)atomic_t_impl;
-    atomicT_int->checkAndSet = C_checkAndSet_AtomicT_intImpl;
-    atomicT_int->set = C_set_AtomicT_intImpl;
+    atomicT_int->checkAndSet = C_checkAndSetAtomicT_intImpl_int;
+    atomicT_int->set = C_setAtomicT_intImpl_int;
     atomic_t_impl->atomic = init;
     atomic_t_impl->init = init;
     return atomicT_int;
--- a/src/parallel_execution/generate_stub.pl	Wed Jan 27 16:22:19 2021 +0900
+++ b/src/parallel_execution/generate_stub.pl	Wed Jan 27 16:31:41 2021 +0900
@@ -156,10 +156,13 @@
                 $generic{$name}  = [];
             } elsif (/^(\w+)(\*)+ create(\w+)\(/) { # this case implementation constructor
                 debug_print("getDataGear",__LINE__, $_) if $opt_debug;
-                #if (defined $implInterfaceInfo->{interface} ) {
-                #   die "duplicate interface $implInterfaceInfo->{interface}\n";
-                #}
                 my $interfaceName = $1;
+
+                # create.* function is constructor
+                # However, other create.* function  may not be a constructor
+                # this case skip , other create.* function
+                # But, I'm not thinking of a case with multiple constructors
+                # (I think use array or hash...)
                 if ($implInterfaceInfo->{interface}) {
                   if ($implInterfaceInfo->{interface} ne $interfaceName) {
                     next;