[PPL-devel] [GIT] ppl/ppl(master): Helper OCaml interface function renamed for consistency.
Enea Zaffanella
zaffanella at cs.unipr.it
Mon Mar 30 12:07:47 CEST 2009
Module: ppl/ppl
Branch: master
Commit: bb9b33148f43dac15831470fd14f4941587f67d1
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=bb9b33148f43dac15831470fd14f4941587f67d1
Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date: Mon Mar 30 13:05:32 2009 +0200
Helper OCaml interface function renamed for consistency.
value_to_unsigned_native --> value_to_unsigned
(to be consistent with similar functions in the Java and Prolog interfaces).
---
.../OCaml/ppl_interface_generator_ocaml_cc_code.m4 | 10 +++++-----
interfaces/OCaml/ppl_ocaml_common.cc | 8 ++++----
interfaces/OCaml/ppl_ocaml_common.defs.hh | 2 +-
interfaces/OCaml/ppl_ocaml_common.inlines.hh | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/interfaces/OCaml/ppl_interface_generator_ocaml_cc_code.m4 b/interfaces/OCaml/ppl_interface_generator_ocaml_cc_code.m4
index 8f96e4b..00da21d 100644
--- a/interfaces/OCaml/ppl_interface_generator_ocaml_cc_code.m4
+++ b/interfaces/OCaml/ppl_interface_generator_ocaml_cc_code.m4
@@ -602,7 +602,7 @@ ppl_ at CLASS@_ at WIDEN@_widening_assign_with_tokens
CAMLparam3(ph1, ph2, tokens);
@CPP_CLASS@& pph1 = *p_ at CLASS@_val(ph1);
@CPP_CLASS@& pph2 = *p_ at CLASS@_val(ph2);
- unsigned u_tokens = value_to_unsigned_native<unsigned>(tokens);
+ unsigned u_tokens = value_to_unsigned<unsigned>(tokens);
pph1. at WIDEN@_widening_assign(pph2, &u_tokens);
CAMLreturn(Val_long(u_tokens));
}
@@ -635,7 +635,7 @@ ppl_ at CLASS@_widening_assign_with_tokens
CAMLparam3(ph1, ph2, tokens);
@CPP_CLASS@& pph1 = *p_ at CLASS@_val(ph1);
@CPP_CLASS@& pph2 = *p_ at CLASS@_val(ph2);
- unsigned u_tokens = value_to_unsigned_native<unsigned>(tokens);
+ unsigned u_tokens = value_to_unsigned<unsigned>(tokens);
pph1.widening_assign(pph2, &u_tokens);
CAMLreturn(Val_long(u_tokens));
}
@@ -653,7 +653,7 @@ ppl_ at CLASS@_ at LIMITEDBOUNDED@_ at WIDENEXPN@_extrapolation_assign_with_tokens
@CPP_CLASS@& pph1 = *p_ at CLASS@_val(ph1);
@CPP_CLASS@& pph2 = *p_ at CLASS@_val(ph2);
@!CONSTRAINER at _System ppl_cs = build_ppl_@!CONSTRAINER at _System(caml_cs);
- unsigned u_tokens = value_to_unsigned_native<unsigned>(tokens);
+ unsigned u_tokens = value_to_unsigned<unsigned>(tokens);
pph1. at LIMITEDBOUNDED@_ at WIDENEXPN@_extrapolation_assign(pph2, ppl_cs,
&u_tokens);
CAMLreturn(Val_long(u_tokens));
@@ -870,7 +870,7 @@ ppl_ at CLASS@_ at EXTRAPOLATION@_extrapolation_assign_with_tokens
CAMLparam3(ph1, ph2, tokens);
@CPP_CLASS@& pph1 = *p_ at CLASS@_val(ph1);
@CPP_CLASS@& pph2 = *p_ at CLASS@_val(ph2);
- unsigned u_tokens = value_to_unsigned_native<unsigned>(tokens);
+ unsigned u_tokens = value_to_unsigned<unsigned>(tokens);
pph1. at EXTRAPOLATION@_extrapolation_assign(pph2, &u_tokens);
CAMLreturn(Val_long(u_tokens));
}
@@ -1083,7 +1083,7 @@ ppl_ at CLASS@_BGP99_ at DISJUNCT_WIDEN@_extrapolation_assign
@CPP_CLASS@& pph1 = *p_ at CLASS@_val(ph1);
@CPP_CLASS@& pph2 = *p_ at CLASS@_val(ph2);
unsigned cpp_max_disj
- = value_to_unsigned_native<unsigned>(max_disj);
+ = value_to_unsigned<unsigned>(max_disj);
pph1.BGP99_extrapolation_assign
(pph2,
widen_fun_ref(&@DISJUNCT_TOPOLOGY@@A_DISJUNCT@::@DISJUNCT_WIDEN at _widening_assign),
diff --git a/interfaces/OCaml/ppl_ocaml_common.cc b/interfaces/OCaml/ppl_ocaml_common.cc
index c623139..a705ffd 100644
--- a/interfaces/OCaml/ppl_ocaml_common.cc
+++ b/interfaces/OCaml/ppl_ocaml_common.cc
@@ -1135,11 +1135,11 @@ ppl_io_wrap_string(value src,
CAMLparam4(src, indent_depth, preferred_first_line_length,
preferred_line_length);
unsigned cpp_indent_depth
- = value_to_unsigned_native<unsigned>(indent_depth);
+ = value_to_unsigned<unsigned>(indent_depth);
unsigned cpp_preferred_first_line_length
- = value_to_unsigned_native<unsigned>(preferred_first_line_length);
+ = value_to_unsigned<unsigned>(preferred_first_line_length);
unsigned cpp_preferred_line_length
- = value_to_unsigned_native<unsigned>(preferred_line_length);
+ = value_to_unsigned<unsigned>(preferred_line_length);
using IO_Operators::wrap_string;
CAMLreturn(caml_copy_string(wrap_string(String_val(src),
cpp_indent_depth,
@@ -1222,7 +1222,7 @@ ppl_set_timeout(value time) try {
#else
// In case a timeout was already set.
reset_timeout();
- unsigned cpp_time = value_to_unsigned_native<unsigned>(time);
+ unsigned cpp_time = value_to_unsigned<unsigned>(time);
static timeout_exception e;
using Parma_Watchdog_Library::Watchdog;
p_timeout_object = new Watchdog(cpp_time, abandon_expensive_computations, e);
diff --git a/interfaces/OCaml/ppl_ocaml_common.defs.hh b/interfaces/OCaml/ppl_ocaml_common.defs.hh
index 05d87de..294cf82 100644
--- a/interfaces/OCaml/ppl_ocaml_common.defs.hh
+++ b/interfaces/OCaml/ppl_ocaml_common.defs.hh
@@ -51,7 +51,7 @@ namespace Interfaces {
namespace OCaml {
template <typename U_Int>
-U_Int value_to_unsigned_native(value v);
+U_Int value_to_unsigned(value v);
value
ppl_dimension_to_value(dimension_type dim);
diff --git a/interfaces/OCaml/ppl_ocaml_common.inlines.hh b/interfaces/OCaml/ppl_ocaml_common.inlines.hh
index 95579af..7951f11 100644
--- a/interfaces/OCaml/ppl_ocaml_common.inlines.hh
+++ b/interfaces/OCaml/ppl_ocaml_common.inlines.hh
@@ -31,7 +31,7 @@ namespace OCaml {
template <typename U_Int>
U_Int
-value_to_unsigned_native(value v) {
+value_to_unsigned(value v) {
// FIXME: check the following at compile time.
assert(std::numeric_limits<U_Int>::is_integer
&& !std::numeric_limits<U_Int>::is_signed);
@@ -57,7 +57,7 @@ value_to_unsigned_native(value v) {
inline dimension_type
value_to_ppl_dimension(value v) {
- return value_to_unsigned_native<dimension_type>(v);
+ return value_to_unsigned<dimension_type>(v);
}
inline value
More information about the PPL-devel
mailing list