Mercurial > octave
changeset 23578:7b47b7c2d6c7
maint: Deprecate is_java and replace with isjava.
* ov.h (is_java): Use OCTAVE_DEPRECATED macro around function.
* ov.h (isjava): New function.
* variables.cc, ov-base.h, ov-java.cc, ov-java.h:
Replace occurrences of is_java with isjava.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 12 Jun 2017 13:41:35 -0700 |
parents | 80c42f4cca13 |
children | c20a0fa91c0c |
files | libinterp/corefcn/variables.cc libinterp/octave-value/ov-base.h libinterp/octave-value/ov-java.cc libinterp/octave-value/ov-java.h libinterp/octave-value/ov.h |
diffstat | 5 files changed, 15 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/variables.cc Sun Jun 11 22:14:09 2017 -0700 +++ b/libinterp/corefcn/variables.cc Mon Jun 12 13:41:35 2017 -0700 @@ -283,7 +283,7 @@ frame.run (); if (tmp.is_defined () - && (tmp.is_map () || tmp.is_java () || tmp.is_classdef_object ())) + && (tmp.is_map () || tmp.isjava () || tmp.is_classdef_object ())) names = tmp.map_keys (); } catch (const octave::execution_exception&)
--- a/libinterp/octave-value/ov-base.h Sun Jun 11 22:14:09 2017 -0700 +++ b/libinterp/octave-value/ov-base.h Mon Jun 12 13:41:35 2017 -0700 @@ -373,7 +373,7 @@ virtual bool is_classdef_object (void) const { return false; } - virtual bool is_java (void) const { return false; } + virtual bool isjava (void) const { return false; } virtual bool is_cs_list (void) const { return false; }
--- a/libinterp/octave-value/ov-java.cc Sun Jun 11 22:14:09 2017 -0700 +++ b/libinterp/octave-value/ov-java.cc Mon Jun 12 13:41:35 2017 -0700 @@ -1390,7 +1390,7 @@ octave_value retval = box (jni_env, jobj, jcls); - if (retval.is_java ()) + if (retval.isjava ()) { retval = octave_value (); @@ -1489,7 +1489,7 @@ { bool found = true; - if (val.is_java ()) + if (val.isjava ()) { octave_java *ovj = TO_JAVA (val); jobj = TO_JOBJECT (ovj->to_java ()); @@ -2914,7 +2914,7 @@ for (int i=2; i<args.length (); i++) tmp(i-2) = args(i); - if (args(1).is_java ()) + if (args(1).isjava ()) { octave_java *jobj = TO_JAVA (args(1)); retval = jobj->do_javaMethod (current_env, methodname, tmp); @@ -2980,7 +2980,7 @@ octave_value retval; - if (args(0).is_java ()) + if (args(0).isjava ()) { octave_java *jobj = TO_JAVA (args(0)); retval = jobj->do_java_get (current_env, name); @@ -3040,7 +3040,7 @@ octave_value retval; - if (args(0).is_java ()) + if (args(0).isjava ()) { octave_java *jobj = TO_JAVA (args(0)); retval = jobj->do_java_set (current_env, name, args(2)); @@ -3081,7 +3081,7 @@ octave_value_list retval; - if (args(0).is_java ()) + if (args(0).isjava ()) { octave_java *jobj = TO_JAVA (args(0)); retval = ovl (box_more (current_env, jobj->to_java (), 0)); @@ -3204,7 +3204,7 @@ if (args.length () != 1) print_usage (); - return ovl (args(0).is_java ()); + return ovl (args(0).isjava ()); } /*
--- a/libinterp/octave-value/ov-java.h Sun Jun 11 22:14:09 2017 -0700 +++ b/libinterp/octave-value/ov-java.h Mon Jun 12 13:41:35 2017 -0700 @@ -62,7 +62,7 @@ bool is_map (void) const { return false; } - bool is_java (void) const { return true; } + bool isjava (void) const { return true; } string_vector map_keys (void) const;
--- a/libinterp/octave-value/ov.h Sun Jun 11 22:14:09 2017 -0700 +++ b/libinterp/octave-value/ov.h Mon Jun 12 13:41:35 2017 -0700 @@ -594,8 +594,12 @@ bool is_classdef_object (void) const { return rep->is_classdef_object (); } + bool isjava (void) const + { return rep->isjava (); } + + OCTAVE_DEPRECATED ("use 'isjava' instead") bool is_java (void) const - { return rep->is_java (); } + { return isjava (); } bool is_cs_list (void) const { return rep->is_cs_list (); }