# limitations under the License.
import end
-intrude import standard::kernel
-private import standard::string
+intrude import core::kernel
+private import core::text
`{`}
printf( "received msg: %s, of length = %d\n", c_msg, msg_len );
/* A_my_attr is a callback to the getter of self.my_attr */
- printf( "old attr %d\n", A_my_attr(recv) );
+ printf( "old attr %d\n", A_my_attr(self) );
if(chose)
truc;
chose;
/* A_my_attr is a callback to the setter of self.my_attr= */
- A_my_attr__assign( recv, msg_len );
+ A_my_attr__assign( self, msg_len );
`}
end
extern class TimeT `{time_t`}
new `{ return time(NULL); `}
new from_i(i: Int) `{ return i; `}
- fun update `{ time(&recv); `}
+ fun update `{ time(&self); `}
- fun ctime: String import NativeString.to_s_with_copy `{
- return NativeString_to_s_with_copy( ctime(&recv) );
+ fun ctime: String import CString.to_s `{
+ return CString_to_s( ctime(&self) );
`}
# Difference in secondes from start (self if the end time)
- fun difftime(start: TimeT): Float `{ return difftime(recv, start); `}
+ fun difftime(start: TimeT): Float `{ return difftime(self, start); `}
private fun intern_poll(in_fds: Array[Int], out_fds: Array[Int]): nullable Int is
extern import Array[Int].length, Array[Int].[], Int.as(nullable Int) `{`}
fun address_is_null: Bool is extern "address_is_null"
-fun free `{ free(recv); `}
+fun free `{ free(self); `}