Mercurial > mxe-octave
comparison src/of-sparsersb-1-dev.patch @ 6270:b4d2434e7153
Add patch for of-sparsersb in dev octave
* src/of-sparsersb-1-dev.patch: new file
* dist-files.mk: add ref to new file
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Thu, 23 Jun 2022 15:04:22 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
6269:23d1f6a961b3 | 6270:b4d2434e7153 |
---|---|
1 # HG changeset patch | |
2 # User John Donoghue <john.donoghue@ieee.org> | |
3 # Date 1656010713 14400 | |
4 # Thu Jun 23 14:58:33 2022 -0400 | |
5 # Node ID d96dbe7f078ca2753533cdea59778ce8468a4906 | |
6 # Parent bba813604edfb3d2d50a679d6515a23c482db7c2 | |
7 * src/sparsersb.cc: check for version 8 octave changes for __get_type_info__ | |
8 | |
9 diff -r bba813604edf -r d96dbe7f078c src/sparsersb.cc | |
10 --- a/src/sparsersb.cc Thu Jun 23 14:25:16 2022 -0400 | |
11 +++ b/src/sparsersb.cc Thu Jun 23 14:58:33 2022 -0400 | |
12 @@ -69,6 +69,7 @@ | |
13 #define RSBOI_WANT_PRINT_PCT_OCTAVE_STYLE 1 | |
14 | |
15 #include <octave/oct.h> | |
16 +#define RSBOI_USE_PATCH_OCT80 (OCTAVE_MAJOR_VERSION>=8) | |
17 #define RSBOI_USE_PATCH_OCT44 (OCTAVE_MAJOR_VERSION>=5) || ( (OCTAVE_MAJOR_VERSION==4) && (OCTAVE_MINOR_VERSION>=4)) | |
18 #if RSBOI_USE_PATCH_OCT44 | |
19 #include <octave/variables.h> | |
20 @@ -2571,6 +2572,19 @@ | |
21 } | |
22 #endif /* RSBOI_WANT_DOUBLE_COMPLEX */ | |
23 | |
24 +#if RSBOI_USE_PATCH_OCT80 | |
25 +#define RSBOI_INSTALL_BINOP(op, t1, t2, f) { \ | |
26 + octave::type_info& type_info = octave::__get_type_info__ ();\ | |
27 + type_info.register_binary_op(octave_value::op, t1::static_type_id (), t2::static_type_id (), CONCAT2 (oct_binop_, f)); } | |
28 + | |
29 +#define RSBOI_INSTALL_ASSIGNOP(op, t1, t2, f) { \ | |
30 + octave::type_info& type_info = octave::__get_type_info__ ();\ | |
31 + type_info.register_assign_op(octave_value::op, t1::static_type_id (), t2::static_type_id (), CONCAT2 (oct_assignop_, f)); } | |
32 + | |
33 +#define RSBOI_INSTALL_UNOP(op, t1, f) { \ | |
34 + octave::type_info& type_info = octave::__get_type_info__ ();\ | |
35 + type_info.register_unary_op(octave_value::op, t1::static_type_id (), CONCAT2 (oct_unop_, f)); } | |
36 +#else | |
37 #if RSBOI_USE_PATCH_OCT44 | |
38 #define RSBOI_INSTALL_BINOP(op, t1, t2, f) { \ | |
39 octave::type_info& type_info = octave::__get_type_info__ ("");\ | |
40 @@ -2593,6 +2607,7 @@ | |
41 // deprecated; need a wrapper using octave::typeinfo::register_unary_op | |
42 #define RSBOI_INSTALL_UNOP INSTALL_UNOP | |
43 #endif /* RSBOI_USE_PATCH_OCT44 */ | |
44 +#endif /* RSBOI_USE_PATCH_OCT88 */ | |
45 | |
46 static void install_sparsersb_ops (void) | |
47 { |