cbc-wrapper 2.9.9.4 → 2.9.9.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bca684c17d92a3b6d542eee04439dc74acbade2d919781dd6271ec1e414a86bf
4
- data.tar.gz: cb864b4a0a3069b1601eb0e57e42ef51f80f01ea5553a584d27e03d9033687da
3
+ metadata.gz: 79f98579bdbf303fb8b3f8db626f8c1e0ae523ce35cdb78b68585e0d7a4295d6
4
+ data.tar.gz: 0bb70972a2a91a316752dde8375110196f7522b19b90336d2db201804095a0a7
5
5
  SHA512:
6
- metadata.gz: 9d99b8c6f5caa89fe61647ed34239e22529776eb05eebe6194da68ddbadc80ef53921d1947ee1dc25d31cfc10ff47b89bec2961c3d34572f751ab7991107da2a
7
- data.tar.gz: 668e7b649e8ba559caef3192f77892f8bdcebf915001f39e12817e4fd7a377af96c5af8689aecbd2fd86d01dec1421db7a7fb8adc6a89f7769fa34532ebc30a5
6
+ metadata.gz: 59b0e6f7d93e60f02462c1a6811c306d8ee0f117a483250d19c9a973aa6ad46689c5e834e8d8af487153e87464f51cb3f8d4990470f170fc38e2e0e7eac2c106
7
+ data.tar.gz: 4e44129dc6a061a070c13fab6b52d68cc19231f77bd79bfb67d11190fa984bf54095eae241fb4ebf793f90b896d20cd2f041a5489301af958eac51027f3fc4bb
data/README.md CHANGED
@@ -7,6 +7,10 @@ It uses the version 2.9.9 of Cbc.
7
7
 
8
8
  This gem requires you to have Cbc installed on your system first.
9
9
 
10
+ - On a mac, you can execute `brew install cbc`
11
+ - On Debian and Ubuntu, use `apt-get install coinor-libcbc-dev`
12
+ - On Archlinux, use `pacman -S coin-or-cbc`
13
+
10
14
  Add this line to your application's Gemfile:
11
15
 
12
16
  ```ruby
@@ -24,10 +28,26 @@ Or install it yourself as:
24
28
  WARNING: if you want the gem to download and compile the library sources when installing the gem,
25
29
  you will need to use a lesser version of it (2.9.9.3).
26
30
 
31
+ ### Heroku
32
+
33
+ On Heroku, you will need to tweak your installation a bit: you can install the cbc library with
34
+ the [Apt](https://github.com/heroku/heroku-buildpack-apt) buildpack with an Aptfile of:
35
+
36
+ ```
37
+ coinor-libcbc-dev
38
+ ```
39
+
40
+ You will need to set LD_LIBRARY_PATH so it can find LAPACK and BLAS (see this [issue](https://github.com/heroku/heroku-buildpack-apt/issues/35)).
41
+
42
+ ```
43
+ heroku config:set LD_LIBRARY_PATH=/app/.apt/usr/lib/x86_64-linux-gnu/lapack:/app/.apt/usr/lib/x86_64-linux-gnu/blas
44
+ ```
45
+
27
46
  ## Usage
28
47
 
29
48
  All functions defined in Cbc_C_interface.h are wrapped. You can use any function named
30
- `func_name` with
49
+ `func_name` with
50
+
31
51
  ```ruby
32
52
  Cbc_wrapper.func_name
33
53
  ```
@@ -100,7 +120,7 @@ Below is the Cbc_C_interface.h file:
100
120
  COINLIBAPI void COINLINKAGE
101
121
  Cbc_writeMps(Cbc_Model * model, const char *filename)
102
122
  ;
103
- /** Provide an initial feasible solution to accelerate branch-and-bound
123
+ /** Provide an initial feasible solution to accelerate branch-and-bound
104
124
  Note that feasibility of the solution is *not* verified.
105
125
  */
106
126
  COINLIBAPI void COINLINKAGE
@@ -111,7 +131,7 @@ Below is the Cbc_C_interface.h file:
111
131
  Cbc_problemName(Cbc_Model * model, int maxNumberCharacters, char * array)
112
132
  ;
113
133
  /** Sets problem name.
114
-
134
+
115
135
  \p array must be a null-terminated string.
116
136
  */
117
137
  COINLIBAPI int COINLINKAGE
@@ -240,13 +260,13 @@ Below is the Cbc_C_interface.h file:
240
260
  /**@name Solver parameters */
241
261
  /*@{*/
242
262
  /** Set parameter "name" to value "value". Note that this
243
- * translates directly to using "-name value" as a
263
+ * translates directly to using "-name value" as a
244
264
  * command-line argument to Cbc.*/
245
265
  COINLIBAPI void COINLINKAGE
246
266
  Cbc_setParameter(Cbc_Model * model, const char * name, const char * value)
247
267
  ;
248
268
 
249
-
269
+
250
270
  /*@}*/
251
271
  /**@name Message handling. Call backs are handled by ONE function */
252
272
  /*@{*/
@@ -394,4 +414,3 @@ Below is the Cbc_C_interface.h file:
394
414
  ## Contributing
395
415
 
396
416
  Bug reports and pull requests are welcome on GitHub at https://github.com/gverger/cbc-wrapper.
397
-
data/cbc-wrapper.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.require_paths = ["lib", "ext"]
28
28
  spec.extensions << "ext/cbc-wrapper/extconf.rb"
29
29
 
30
- spec.add_development_dependency "bundler", "~> 1.10"
30
+ spec.add_development_dependency "bundler", "~> 2.4"
31
31
  spec.add_development_dependency "rake", "~> 10.0"
32
32
  spec.add_development_dependency "rspec"
33
33
  spec.add_development_dependency "rake-compiler"
@@ -1,18 +1,14 @@
1
1
  /* ----------------------------------------------------------------------------
2
- * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 3.0.8
2
+ * This file was automatically generated by SWIG (https://www.swig.org).
3
+ * Version 4.1.1
4
4
  *
5
- * This file is not intended to be easily readable and contains a number of
6
- * coding conventions designed to improve portability and efficiency. Do not make
7
- * changes to this file unless you know what you are doing--modify the SWIG
8
- * interface file instead.
5
+ * Do not make changes to this file unless you know what you are doing - modify
6
+ * the SWIG interface file instead.
9
7
  * ----------------------------------------------------------------------------- */
10
8
 
11
9
 
12
- #ifndef SWIGRUBY
10
+ #define SWIG_VERSION 0x040101
13
11
  #define SWIGRUBY
14
- #endif
15
-
16
12
 
17
13
  /* -----------------------------------------------------------------------------
18
14
  * This section contains generic SWIG labels for method/variable
@@ -81,9 +77,11 @@
81
77
  #endif
82
78
 
83
79
  /* exporting methods */
84
- #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
85
- # ifndef GCC_HASCLASSVISIBILITY
86
- # define GCC_HASCLASSVISIBILITY
80
+ #if defined(__GNUC__)
81
+ # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
82
+ # ifndef GCC_HASCLASSVISIBILITY
83
+ # define GCC_HASCLASSVISIBILITY
84
+ # endif
87
85
  # endif
88
86
  #endif
89
87
 
@@ -203,9 +201,11 @@
203
201
  #endif
204
202
 
205
203
  /* exporting methods */
206
- #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
207
- # ifndef GCC_HASCLASSVISIBILITY
208
- # define GCC_HASCLASSVISIBILITY
204
+ #if defined(__GNUC__)
205
+ # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
206
+ # ifndef GCC_HASCLASSVISIBILITY
207
+ # define GCC_HASCLASSVISIBILITY
208
+ # endif
209
209
  # endif
210
210
  #endif
211
211
 
@@ -303,6 +303,9 @@
303
303
  /* Flags for pointer conversions */
304
304
  #define SWIG_POINTER_DISOWN 0x1
305
305
  #define SWIG_CAST_NEW_MEMORY 0x2
306
+ #define SWIG_POINTER_NO_NULL 0x4
307
+ #define SWIG_POINTER_CLEAR 0x8
308
+ #define SWIG_POINTER_RELEASE (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)
306
309
 
307
310
  /* Flags for new pointer objects */
308
311
  #define SWIG_POINTER_OWN 0x1
@@ -374,7 +377,7 @@
374
377
  SWIG errors code.
375
378
 
376
379
  Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
377
- allows to return the 'cast rank', for example, if you have this
380
+ allows returning the 'cast rank', for example, if you have this
378
381
 
379
382
  int food(double)
380
383
  int fooi(int);
@@ -388,7 +391,13 @@
388
391
  */
389
392
 
390
393
  #define SWIG_OK (0)
394
+ /* Runtime errors are < 0 */
391
395
  #define SWIG_ERROR (-1)
396
+ /* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
397
+ /* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
398
+ /* Errors < -200 are generic runtime specific errors */
399
+ #define SWIG_ERROR_RELEASE_NOT_OWNED (-200)
400
+
392
401
  #define SWIG_IsOK(r) (r >= 0)
393
402
  #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
394
403
 
@@ -403,7 +412,7 @@
403
412
  #define SWIG_OLDOBJ (SWIG_OK)
404
413
  #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
405
414
  #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
406
- /* Check, add and del mask methods */
415
+ /* Check, add and del object mask methods */
407
416
  #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
408
417
  #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
409
418
  #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
@@ -549,7 +558,7 @@ SWIG_TypeCheck(const char *c, swig_type_info *ty) {
549
558
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
550
559
  */
551
560
  SWIGRUNTIME swig_cast_info *
552
- SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
561
+ SWIG_TypeCheckStruct(const swig_type_info *from, swig_type_info *ty) {
553
562
  if (ty) {
554
563
  swig_cast_info *iter = ty->cast;
555
564
  while (iter) {
@@ -609,9 +618,9 @@ SWIG_TypeName(const swig_type_info *ty) {
609
618
  SWIGRUNTIME const char *
610
619
  SWIG_TypePrettyName(const swig_type_info *type) {
611
620
  /* The "str" field contains the equivalent pretty names of the
612
- type, separated by vertical-bar characters. We choose
613
- to print the last name, as it is often (?) the most
614
- specific. */
621
+ type, separated by vertical-bar characters. Choose the last
622
+ name. It should be the most specific; a fully resolved name
623
+ but not necessarily with default template parameters expanded. */
615
624
  if (!type) return NULL;
616
625
  if (type->str != NULL) {
617
626
  const char *last_name = type->str;
@@ -755,16 +764,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
755
764
  char d = *(c++);
756
765
  unsigned char uu;
757
766
  if ((d >= '0') && (d <= '9'))
758
- uu = ((d - '0') << 4);
767
+ uu = (unsigned char)((d - '0') << 4);
759
768
  else if ((d >= 'a') && (d <= 'f'))
760
- uu = ((d - ('a'-10)) << 4);
769
+ uu = (unsigned char)((d - ('a'-10)) << 4);
761
770
  else
762
771
  return (char *) 0;
763
772
  d = *(c++);
764
773
  if ((d >= '0') && (d <= '9'))
765
- uu |= (d - '0');
774
+ uu |= (unsigned char)(d - '0');
766
775
  else if ((d >= 'a') && (d <= 'f'))
767
- uu |= (d - ('a'-10));
776
+ uu |= (unsigned char)(d - ('a'-10));
768
777
  else
769
778
  return (char *) 0;
770
779
  *u = uu;
@@ -831,7 +840,7 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
831
840
  }
832
841
  #endif
833
842
 
834
- /* Errors in SWIG */
843
+ /* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
835
844
  #define SWIG_UnknownError -1
836
845
  #define SWIG_IOError -2
837
846
  #define SWIG_RuntimeError -3
@@ -847,9 +856,25 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
847
856
  #define SWIG_NullReferenceError -13
848
857
 
849
858
 
859
+ #if __GNUC__ >= 7
860
+ #pragma GCC diagnostic push
861
+ #if defined(__cplusplus)
862
+ #pragma GCC diagnostic ignored "-Wregister"
863
+ #if __GNUC__ >= 10
864
+ #pragma GCC diagnostic ignored "-Wvolatile"
865
+ #if __GNUC__ >= 11
866
+ #pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
867
+ #endif
868
+ #endif
869
+ #endif
870
+ #endif
850
871
 
851
872
  #include <ruby.h>
852
873
 
874
+ #if __GNUC__ >= 7
875
+ #pragma GCC diagnostic pop
876
+ #endif
877
+
853
878
  /* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
854
879
  * breaks using rb_intern as an lvalue, as SWIG does. We work around this
855
880
  * issue for now by disabling this.
@@ -941,42 +966,53 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
941
966
  #ifndef RSTRUCT_PTR
942
967
  # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
943
968
  #endif
969
+ #ifndef RTYPEDDATA_P
970
+ # define RTYPEDDATA_P(x) (TYPE(x) != T_DATA)
971
+ #endif
944
972
 
945
973
 
946
974
 
947
975
  /*
948
- * Need to be very careful about how these macros are defined, especially
949
- * when compiling C++ code or C code with an ANSI C compiler.
976
+ * The following macros are used for providing the correct type of a
977
+ * function pointer to the Ruby C API.
978
+ * Starting with Ruby 2.7 (corresponding to RB_METHOD_DEFINITION_DECL being
979
+ * defined) these macros act transparently due to Ruby's moving away from
980
+ * ANYARGS and instead employing strict function signatures.
981
+ *
982
+ * Note: In case of C (not C++) the macros are transparent even before
983
+ * Ruby 2.7 due to the fact that the Ruby C API used function declarators
984
+ * with empty parentheses, which allows for an unspecified number of
985
+ * arguments.
950
986
  *
951
- * VALUEFUNC(f) is a macro used to typecast a C function that implements
952
- * a Ruby method so that it can be passed as an argument to API functions
953
- * like rb_define_method() and rb_define_singleton_method().
987
+ * PROTECTFUNC(f) is used for the function pointer argument of the Ruby
988
+ * C API function rb_protect().
954
989
  *
955
- * VOIDFUNC(f) is a macro used to typecast a C function that implements
956
- * either the "mark" or "free" stuff for a Ruby Data object, so that it
957
- * can be passed as an argument to API functions like Data_Wrap_Struct()
990
+ * VALUEFUNC(f) is used for the function pointer argument(s) of Ruby C API
991
+ * functions like rb_define_method() and rb_define_singleton_method().
992
+ *
993
+ * VOIDFUNC(f) is used to typecast a C function that implements either
994
+ * the "mark" or "free" stuff for a Ruby Data object, so that it can be
995
+ * passed as an argument to Ruby C API functions like Data_Wrap_Struct()
958
996
  * and Data_Make_Struct().
997
+ *
998
+ * SWIG_RUBY_VOID_ANYARGS_FUNC(f) is used for the function pointer
999
+ * argument(s) of Ruby C API functions like rb_define_virtual_variable().
1000
+ *
1001
+ * SWIG_RUBY_INT_ANYARGS_FUNC(f) is used for the function pointer
1002
+ * argument(s) of Ruby C API functions like st_foreach().
959
1003
  */
960
-
961
- #ifdef __cplusplus
962
- # ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
963
- # define PROTECTFUNC(f) ((VALUE (*)()) f)
964
- # define VALUEFUNC(f) ((VALUE (*)()) f)
965
- # define VOIDFUNC(f) ((void (*)()) f)
966
- # else
967
- # ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
968
- # define PROTECTFUNC(f) ((VALUE (*)()) f)
969
- # define VALUEFUNC(f) ((VALUE (*)()) f)
970
- # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
971
- # else /* These definitions should work for Ruby 1.7+ */
972
- # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
973
- # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
974
- # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
975
- # endif
976
- # endif
1004
+ #if defined(__cplusplus) && !defined(RB_METHOD_DEFINITION_DECL)
1005
+ # define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
1006
+ # define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
1007
+ # define VOIDFUNC(f) ((RUBY_DATA_FUNC) f)
1008
+ # define SWIG_RUBY_VOID_ANYARGS_FUNC(f) ((void (*)(ANYARGS))(f))
1009
+ # define SWIG_RUBY_INT_ANYARGS_FUNC(f) ((int (*)(ANYARGS))(f))
977
1010
  #else
1011
+ # define PROTECTFUNC(f) (f)
978
1012
  # define VALUEFUNC(f) (f)
979
1013
  # define VOIDFUNC(f) (f)
1014
+ # define SWIG_RUBY_VOID_ANYARGS_FUNC(f) (f)
1015
+ # define SWIG_RUBY_INT_ANYARGS_FUNC(f) (f)
980
1016
  #endif
981
1017
 
982
1018
  /* Don't use for expressions have side effect */
@@ -1164,7 +1200,7 @@ void Ruby_Format_OverloadedError(
1164
1200
  /* -----------------------------------------------------------------------------
1165
1201
  * rubytracking.swg
1166
1202
  *
1167
- * This file contains support for tracking mappings from
1203
+ * This file contains support for tracking mappings from
1168
1204
  * Ruby objects to C++ objects. This functionality is needed
1169
1205
  * to implement mark functions for Ruby's mark and sweep
1170
1206
  * garbage collector.
@@ -1191,11 +1227,11 @@ extern "C" {
1191
1227
  #endif
1192
1228
 
1193
1229
  /* Global hash table to store Trackings from C/C++
1194
- structs to Ruby Objects.
1230
+ structs to Ruby Objects.
1195
1231
  */
1196
1232
  static st_table* swig_ruby_trackings = NULL;
1197
1233
 
1198
- static VALUE swig_ruby_trackings_count(ANYARGS) {
1234
+ static VALUE swig_ruby_trackings_count(ID id, VALUE *var) {
1199
1235
  return SWIG2NUM(swig_ruby_trackings->num_entries);
1200
1236
  }
1201
1237
 
@@ -1205,7 +1241,7 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1205
1241
  /* Create a hash table to store Trackings from C++
1206
1242
  objects to Ruby objects. */
1207
1243
 
1208
- /* Try to see if some other .so has already created a
1244
+ /* Try to see if some other .so has already created a
1209
1245
  tracking hash table, which we keep hidden in an instance var
1210
1246
  in the SWIG module.
1211
1247
  This is done to allow multiple DSOs to share the same
@@ -1232,7 +1268,9 @@ SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1232
1268
  swig_ruby_trackings = (st_table*)NUM2SWIG(trackings_value);
1233
1269
  }
1234
1270
 
1235
- rb_define_virtual_variable("SWIG_TRACKINGS_COUNT", swig_ruby_trackings_count, NULL);
1271
+ rb_define_virtual_variable("SWIG_TRACKINGS_COUNT",
1272
+ VALUEFUNC(swig_ruby_trackings_count),
1273
+ SWIG_RUBY_VOID_ANYARGS_FUNC((rb_gvar_setter_t*)NULL));
1236
1274
  }
1237
1275
 
1238
1276
  /* Add a Tracking from a C/C++ struct to a Ruby object */
@@ -1264,13 +1302,14 @@ SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) {
1264
1302
 
1265
1303
  /* This is a helper method that unlinks a Ruby object from its
1266
1304
  underlying C++ object. This is needed if the lifetime of the
1267
- Ruby object is longer than the C++ object */
1305
+ Ruby object is longer than the C++ object. */
1268
1306
  SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1269
1307
  VALUE object = SWIG_RubyInstanceFor(ptr);
1270
1308
 
1271
1309
  if (object != Qnil) {
1272
- if (TYPE(object) != T_DATA)
1273
- abort();
1310
+ // object might have the T_ZOMBIE type, but that's just
1311
+ // because the GC has flagged it as such for a deferred
1312
+ // destruction. Until then, it's still a T_DATA object.
1274
1313
  DATA_PTR(object) = 0;
1275
1314
  }
1276
1315
  }
@@ -1280,13 +1319,15 @@ SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) {
1280
1319
  to the passed callback function. */
1281
1320
 
1282
1321
  /* Proxy method to abstract the internal trackings datatype */
1283
- static int swig_ruby_internal_iterate_callback(void* ptr, VALUE obj, void(*meth)(void* ptr, VALUE obj)) {
1284
- (*meth)(ptr, obj);
1322
+ static int swig_ruby_internal_iterate_callback(st_data_t ptr, st_data_t obj, st_data_t meth) {
1323
+ ((void (*) (void *, VALUE))meth)((void *)ptr, (VALUE)obj);
1285
1324
  return ST_CONTINUE;
1286
1325
  }
1287
1326
 
1288
1327
  SWIGRUNTIME void SWIG_RubyIterateTrackings( void(*meth)(void* ptr, VALUE obj) ) {
1289
- st_foreach(swig_ruby_trackings, (int (*)(ANYARGS))&swig_ruby_internal_iterate_callback, (st_data_t)meth);
1328
+ st_foreach(swig_ruby_trackings,
1329
+ SWIG_RUBY_INT_ANYARGS_FUNC(swig_ruby_internal_iterate_callback),
1330
+ (st_data_t)meth);
1290
1331
  }
1291
1332
 
1292
1333
  #ifdef __cplusplus
@@ -1503,10 +1544,11 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1503
1544
  swig_class *sklass;
1504
1545
  VALUE klass;
1505
1546
  VALUE obj;
1506
-
1547
+
1507
1548
  if (!ptr)
1508
1549
  return Qnil;
1509
-
1550
+
1551
+ assert(type);
1510
1552
  if (type->clientdata) {
1511
1553
  sklass = (swig_class *) type->clientdata;
1512
1554
 
@@ -1514,7 +1556,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1514
1556
  track = sklass->trackObjects;
1515
1557
  if (track) {
1516
1558
  obj = SWIG_RubyInstanceFor(ptr);
1517
-
1559
+
1518
1560
  /* Check the object's type and make sure it has the correct type.
1519
1561
  It might not in cases where methods do things like
1520
1562
  downcast methods. */
@@ -1546,7 +1588,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1546
1588
  obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1547
1589
  }
1548
1590
  rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1549
-
1591
+
1550
1592
  return obj;
1551
1593
  }
1552
1594
 
@@ -1566,6 +1608,8 @@ SWIGRUNTIMEINLINE char *
1566
1608
  SWIG_Ruby_MangleStr(VALUE obj)
1567
1609
  {
1568
1610
  VALUE stype = rb_iv_get(obj, "@__swigtype__");
1611
+ if (NIL_P(stype))
1612
+ return NULL;
1569
1613
  return StringValuePtr(stype);
1570
1614
  }
1571
1615
 
@@ -1578,7 +1622,7 @@ typedef struct {
1578
1622
  SWIGRUNTIME swig_ruby_owntype
1579
1623
  SWIG_Ruby_AcquirePtr(VALUE obj, swig_ruby_owntype own) {
1580
1624
  swig_ruby_owntype oldown = {0, 0};
1581
- if (obj) {
1625
+ if (TYPE(obj) == T_DATA && !RTYPEDDATA_P(obj)) {
1582
1626
  oldown.datafree = RDATA(obj)->dfree;
1583
1627
  RDATA(obj)->dfree = own.datafree;
1584
1628
  }
@@ -1597,9 +1641,9 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1597
1641
  if (NIL_P(obj)) {
1598
1642
  if (ptr)
1599
1643
  *ptr = 0;
1600
- return SWIG_OK;
1644
+ return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
1601
1645
  } else {
1602
- if (TYPE(obj) != T_DATA) {
1646
+ if (TYPE(obj) != T_DATA || (TYPE(obj) == T_DATA && RTYPEDDATA_P(obj))) {
1603
1647
  return SWIG_ERROR;
1604
1648
  }
1605
1649
  Data_Get_Struct(obj, void, vptr);
@@ -1610,6 +1654,11 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1610
1654
  own->own = 0;
1611
1655
  }
1612
1656
 
1657
+ if (((flags & SWIG_POINTER_RELEASE) == SWIG_POINTER_RELEASE)) {
1658
+ if (!RDATA(obj)->dfree)
1659
+ return SWIG_ERROR_RELEASE_NOT_OWNED;
1660
+ }
1661
+
1613
1662
  /* Check to see if the input object is giving up ownership
1614
1663
  of the underlying C struct or C++ object. If so then we
1615
1664
  need to reset the destructor since the Ruby object no
@@ -1621,7 +1670,7 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1621
1670
  swig_class *sklass = (swig_class *) ty->clientdata;
1622
1671
  track = sklass->trackObjects;
1623
1672
  }
1624
-
1673
+
1625
1674
  if (track) {
1626
1675
  /* We are tracking objects for this class. Thus we change the destructor
1627
1676
  * to SWIG_RubyRemoveTracking. This allows us to
@@ -1635,8 +1684,20 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1635
1684
  }
1636
1685
  }
1637
1686
 
1687
+ if (flags & SWIG_POINTER_CLEAR) {
1688
+ DATA_PTR(obj) = 0;
1689
+ }
1690
+
1638
1691
  /* Do type-checking if type info was provided */
1639
1692
  if (ty) {
1693
+ if (ty->clientdata) {
1694
+ if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
1695
+ if (vptr == 0) {
1696
+ /* The object has already been deleted */
1697
+ return SWIG_ObjectPreviouslyDeletedError;
1698
+ }
1699
+ }
1700
+ }
1640
1701
  if ((c = SWIG_MangleStr(obj)) == NULL) {
1641
1702
  return SWIG_ERROR;
1642
1703
  }
@@ -1644,10 +1705,6 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1644
1705
  if (!tc) {
1645
1706
  return SWIG_ERROR;
1646
1707
  } else {
1647
- if (vptr == 0) {
1648
- /* The object has already been deleted */
1649
- return SWIG_ObjectPreviouslyDeletedError;
1650
- }
1651
1708
  if (ptr) {
1652
1709
  if (tc->type == ty) {
1653
1710
  *ptr = vptr;
@@ -1690,7 +1747,7 @@ SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
1690
1747
  return rb_str_new2(result);
1691
1748
  }
1692
1749
 
1693
- /* Convert a packed value value */
1750
+ /* Convert a packed pointer value */
1694
1751
  SWIGRUNTIME int
1695
1752
  SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
1696
1753
  swig_cast_info *tc;
@@ -1738,6 +1795,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1738
1795
  {
1739
1796
  /* register a new class */
1740
1797
  VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
1798
+ rb_undef_alloc_func(cl);
1741
1799
  /* create and store the structure pointer to a global variable */
1742
1800
  swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
1743
1801
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
@@ -1768,7 +1826,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1768
1826
  {
1769
1827
  if ( rb_respond_to( proc, swig_arity_id ) )
1770
1828
  {
1771
- VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1829
+ VALUE num = rb_funcall2( proc, swig_arity_id, 0, 0 );
1772
1830
  int arity = NUM2INT(num);
1773
1831
  if ( arity < 0 && (arity+1) < -minimal ) return 1;
1774
1832
  if ( arity == minimal ) return 1;
@@ -1786,7 +1844,7 @@ int SWIG_Ruby_arity( VALUE proc, int minimal )
1786
1844
 
1787
1845
  #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
1788
1846
 
1789
- #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
1847
+ #define SWIG_contract_assert(expr, msg) do { if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } } while (0)
1790
1848
 
1791
1849
 
1792
1850
 
@@ -1815,10 +1873,6 @@ static VALUE mCbc_wrapper;
1815
1873
  #define SWIG_RUBY_THREAD_END_BLOCK
1816
1874
 
1817
1875
 
1818
- #define SWIGVERSION 0x030008
1819
- #define SWIG_VERSION SWIGVERSION
1820
-
1821
-
1822
1876
  #define SWIG_as_voidptr(a) (void *)((const void *)(a))
1823
1877
  #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
1824
1878
 
@@ -1859,15 +1913,16 @@ typedef int IntArray;
1859
1913
 
1860
1914
 
1861
1915
  SWIGINTERN VALUE
1862
- SWIG_ruby_failed(void)
1916
+ SWIG_ruby_failed(VALUE SWIGUNUSEDPARM(arg1), VALUE SWIGUNUSEDPARM(arg2))
1863
1917
  {
1864
1918
  return Qnil;
1865
1919
  }
1866
1920
 
1867
1921
 
1868
- /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1869
- SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1922
+ /*@SWIG:/usr/local/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1923
+ SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE arg)
1870
1924
  {
1925
+ VALUE *args = (VALUE *)arg;
1871
1926
  VALUE obj = args[0];
1872
1927
  VALUE type = TYPE(obj);
1873
1928
  unsigned long *res = (unsigned long *)(args[1]);
@@ -1885,41 +1940,89 @@ SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val)
1885
1940
  VALUE a[2];
1886
1941
  a[0] = obj;
1887
1942
  a[1] = (VALUE)(&v);
1888
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
1943
+ if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
1944
+ if (val) *val = v;
1945
+ return SWIG_OK;
1946
+ }
1947
+ }
1948
+ return SWIG_TypeError;
1949
+ }
1950
+
1951
+
1952
+ #include <limits.h>
1953
+ #if !defined(SWIG_NO_LLONG_MAX)
1954
+ # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1955
+ # define LLONG_MAX __LONG_LONG_MAX__
1956
+ # define LLONG_MIN (-LLONG_MAX - 1LL)
1957
+ # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1958
+ # endif
1959
+ #endif
1960
+
1961
+
1962
+ #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
1963
+ # define SWIG_LONG_LONG_AVAILABLE
1964
+ #endif
1965
+
1966
+
1967
+ #ifdef SWIG_LONG_LONG_AVAILABLE
1968
+ /*@SWIG:/usr/local/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1969
+ SWIGINTERN VALUE SWIG_AUX_NUM2ULL(VALUE arg)
1970
+ {
1971
+ VALUE *args = (VALUE *)arg;
1972
+ VALUE obj = args[0];
1973
+ VALUE type = TYPE(obj);
1974
+ long long *res = (long long *)(args[1]);
1975
+ *res = type == T_FIXNUM ? NUM2ULL(obj) : rb_big2ull(obj);
1976
+ return obj;
1977
+ }
1978
+ /*@SWIG@*/
1979
+
1980
+ SWIGINTERN int
1981
+ SWIG_AsVal_unsigned_SS_long_SS_long (VALUE obj, unsigned long long *val)
1982
+ {
1983
+ VALUE type = TYPE(obj);
1984
+ if ((type == T_FIXNUM) || (type == T_BIGNUM)) {
1985
+ unsigned long long v;
1986
+ VALUE a[2];
1987
+ a[0] = obj;
1988
+ a[1] = (VALUE)(&v);
1989
+ if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2ULL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
1889
1990
  if (val) *val = v;
1890
1991
  return SWIG_OK;
1891
1992
  }
1892
1993
  }
1893
1994
  return SWIG_TypeError;
1894
1995
  }
1996
+ #endif
1895
1997
 
1896
1998
 
1897
1999
  SWIGINTERNINLINE int
1898
2000
  SWIG_AsVal_size_t (VALUE obj, size_t *val)
1899
2001
  {
1900
- unsigned long v;
1901
- int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
1902
- if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2002
+ int res = SWIG_TypeError;
2003
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2004
+ if (sizeof(size_t) <= sizeof(unsigned long)) {
2005
+ #endif
2006
+ unsigned long v;
2007
+ res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
2008
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2009
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2010
+ } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
2011
+ unsigned long long v;
2012
+ res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
2013
+ if (SWIG_IsOK(res) && val) *val = (size_t)(v);
2014
+ }
2015
+ #endif
1903
2016
  return res;
1904
2017
  }
1905
2018
 
1906
2019
  SWIGINTERN IntArray *new_IntArray(size_t nelements){
1907
- return (int *)malloc((nelements)*sizeof(int));
2020
+ return (int *)calloc(nelements, sizeof(int));
1908
2021
  }
1909
2022
  SWIGINTERN int IntArray___getitem__(IntArray *self,size_t index){
1910
2023
  return self[index];
1911
2024
  }
1912
2025
 
1913
- #include <limits.h>
1914
- #if !defined(SWIG_NO_LLONG_MAX)
1915
- # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1916
- # define LLONG_MAX __LONG_LONG_MAX__
1917
- # define LLONG_MIN (-LLONG_MAX - 1LL)
1918
- # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1919
- # endif
1920
- #endif
1921
-
1922
-
1923
2026
  #define SWIG_From_long LONG2NUM
1924
2027
 
1925
2028
 
@@ -1930,9 +2033,10 @@ SWIG_From_int (int value)
1930
2033
  }
1931
2034
 
1932
2035
 
1933
- /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1934
- SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2036
+ /*@SWIG:/usr/local/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2037
+ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE arg)
1935
2038
  {
2039
+ VALUE *args = (VALUE *)arg;
1936
2040
  VALUE obj = args[0];
1937
2041
  VALUE type = TYPE(obj);
1938
2042
  long *res = (long *)(args[1]);
@@ -1950,7 +2054,7 @@ SWIG_AsVal_long (VALUE obj, long* val)
1950
2054
  VALUE a[2];
1951
2055
  a[0] = obj;
1952
2056
  a[1] = (VALUE)(&v);
1953
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2057
+ if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2LONG), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
1954
2058
  if (val) *val = v;
1955
2059
  return SWIG_OK;
1956
2060
  }
@@ -1987,7 +2091,7 @@ SWIGINTERN IntArray *IntArray_frompointer(int *t){
1987
2091
  typedef double DoubleArray;
1988
2092
 
1989
2093
  SWIGINTERN DoubleArray *new_DoubleArray(size_t nelements){
1990
- return (double *)malloc((nelements)*sizeof(double));
2094
+ return (double *)calloc(nelements, sizeof(double));
1991
2095
  }
1992
2096
  SWIGINTERN double DoubleArray___getitem__(DoubleArray *self,size_t index){
1993
2097
  return self[index];
@@ -1996,9 +2100,10 @@ SWIGINTERN double DoubleArray___getitem__(DoubleArray *self,size_t index){
1996
2100
  #define SWIG_From_double rb_float_new
1997
2101
 
1998
2102
 
1999
- /*@SWIG:/usr/local/Cellar/swig/3.0.8/share/swig/3.0.8/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2000
- SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2103
+ /*@SWIG:/usr/local/share/swig/4.1.1/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2104
+ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE arg)
2001
2105
  {
2106
+ VALUE *args = (VALUE *)arg;
2002
2107
  VALUE obj = args[0];
2003
2108
  VALUE type = TYPE(obj);
2004
2109
  double *res = (double *)(args[1]);
@@ -2016,7 +2121,7 @@ SWIG_AsVal_double (VALUE obj, double *val)
2016
2121
  VALUE a[2];
2017
2122
  a[0] = obj;
2018
2123
  a[1] = (VALUE)(&v);
2019
- if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) {
2124
+ if (rb_rescue(VALUEFUNC(SWIG_AUX_NUM2DBL), (VALUE)a, VALUEFUNC(SWIG_ruby_failed), 0) != Qnil) {
2020
2125
  if (val) *val = v;
2021
2126
  return SWIG_OK;
2022
2127
  }
@@ -2080,7 +2185,7 @@ SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
2080
2185
  if (cptr) {
2081
2186
  if (alloc) {
2082
2187
  if (*alloc == SWIG_NEWOBJ) {
2083
- *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
2188
+ *cptr = (char *)memcpy(malloc((size)*sizeof(char)), cstr, sizeof(char)*(size));
2084
2189
  } else {
2085
2190
  *cptr = cstr;
2086
2191
  *alloc = SWIG_OLDOBJ;
@@ -2115,30 +2220,46 @@ SWIG_From_unsigned_SS_long (unsigned long value)
2115
2220
  }
2116
2221
 
2117
2222
 
2223
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2224
+ SWIGINTERNINLINE VALUE
2225
+ SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
2226
+ {
2227
+ return ULL2NUM(value);
2228
+ }
2229
+ #endif
2230
+
2231
+
2118
2232
  SWIGINTERNINLINE VALUE
2119
2233
  SWIG_From_size_t (size_t value)
2120
2234
  {
2121
- return SWIG_From_unsigned_SS_long ((unsigned long)(value));
2235
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2236
+ if (sizeof(size_t) <= sizeof(unsigned long)) {
2237
+ #endif
2238
+ return SWIG_From_unsigned_SS_long ((unsigned long)(value));
2239
+ #ifdef SWIG_LONG_LONG_AVAILABLE
2240
+ } else {
2241
+ /* assume sizeof(size_t) <= sizeof(unsigned long long) */
2242
+ return SWIG_From_unsigned_SS_long_SS_long ((unsigned long long)(value));
2243
+ }
2244
+ #endif
2122
2245
  }
2123
2246
 
2124
2247
  static swig_class SwigClassIntArray;
2125
2248
 
2126
- #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2127
2249
  SWIGINTERN VALUE
2128
- _wrap_IntArray_allocate(VALUE self) {
2250
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2251
+ _wrap_IntArray_allocate(VALUE self)
2129
2252
  #else
2130
- SWIGINTERN VALUE
2131
- _wrap_IntArray_allocate(int argc, VALUE *argv, VALUE self) {
2253
+ _wrap_IntArray_allocate(int argc, VALUE *argv, VALUE self)
2132
2254
  #endif
2133
-
2134
-
2135
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_IntArray);
2255
+ {
2256
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_IntArray);
2136
2257
  #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2137
- rb_obj_call_init(vresult, argc, argv);
2258
+ rb_obj_call_init(vresult, argc, argv);
2138
2259
  #endif
2139
- return vresult;
2140
- }
2141
-
2260
+ return vresult;
2261
+ }
2262
+
2142
2263
 
2143
2264
  SWIGINTERN VALUE
2144
2265
  _wrap_new_IntArray(int argc, VALUE *argv, VALUE self) {
@@ -2172,7 +2293,6 @@ free_IntArray(void *self) {
2172
2293
  delete_IntArray(arg1);
2173
2294
  }
2174
2295
 
2175
-
2176
2296
  /*
2177
2297
  Document-method: Cbc_wrapper::IntArray.[]
2178
2298
 
@@ -2213,7 +2333,6 @@ fail:
2213
2333
  }
2214
2334
 
2215
2335
 
2216
-
2217
2336
  /*
2218
2337
  Document-method: Cbc_wrapper::IntArray.[]=
2219
2338
 
@@ -2309,22 +2428,20 @@ fail:
2309
2428
 
2310
2429
  static swig_class SwigClassDoubleArray;
2311
2430
 
2312
- #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2313
2431
  SWIGINTERN VALUE
2314
- _wrap_DoubleArray_allocate(VALUE self) {
2432
+ #ifdef HAVE_RB_DEFINE_ALLOC_FUNC
2433
+ _wrap_DoubleArray_allocate(VALUE self)
2315
2434
  #else
2316
- SWIGINTERN VALUE
2317
- _wrap_DoubleArray_allocate(int argc, VALUE *argv, VALUE self) {
2435
+ _wrap_DoubleArray_allocate(int argc, VALUE *argv, VALUE self)
2318
2436
  #endif
2319
-
2320
-
2321
- VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_DoubleArray);
2437
+ {
2438
+ VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_DoubleArray);
2322
2439
  #ifndef HAVE_RB_DEFINE_ALLOC_FUNC
2323
- rb_obj_call_init(vresult, argc, argv);
2440
+ rb_obj_call_init(vresult, argc, argv);
2324
2441
  #endif
2325
- return vresult;
2326
- }
2327
-
2442
+ return vresult;
2443
+ }
2444
+
2328
2445
 
2329
2446
  SWIGINTERN VALUE
2330
2447
  _wrap_new_DoubleArray(int argc, VALUE *argv, VALUE self) {
@@ -2358,7 +2475,6 @@ free_DoubleArray(void *self) {
2358
2475
  delete_DoubleArray(arg1);
2359
2476
  }
2360
2477
 
2361
-
2362
2478
  /*
2363
2479
  Document-method: Cbc_wrapper::DoubleArray.[]
2364
2480
 
@@ -2399,7 +2515,6 @@ fail:
2399
2515
  }
2400
2516
 
2401
2517
 
2402
-
2403
2518
  /*
2404
2519
  Document-method: Cbc_wrapper::DoubleArray.[]=
2405
2520
 
@@ -4244,19 +4359,19 @@ fail:
4244
4359
 
4245
4360
  /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
4246
4361
 
4247
- static void *_p_IntArrayTo_p_int(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4248
- return (void *)((int *) ((IntArray *) x));
4249
- }
4250
4362
  static void *_p_DoubleArrayTo_p_double(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4251
4363
  return (void *)((double *) ((DoubleArray *) x));
4252
4364
  }
4365
+ static void *_p_IntArrayTo_p_int(void *x, int *SWIGUNUSEDPARM(newmemory)) {
4366
+ return (void *)((int *) ((IntArray *) x));
4367
+ }
4253
4368
  static swig_type_info _swigt__p_DoubleArray = {"_p_DoubleArray", "DoubleArray *", 0, 0, (void*)0, 0};
4254
4369
  static swig_type_info _swigt__p_IntArray = {"_p_IntArray", "IntArray *", 0, 0, (void*)0, 0};
4255
4370
  static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
4256
4371
  static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
4257
- static swig_type_info _swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void = {"_p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void", "void (*)(void *,int,int,double const *,int,int const *,int,char **)|cbc_callback", 0, 0, (void*)0, 0};
4258
- static swig_type_info _swigt__p_int = {"_p_int", "int *|CoinBigIndex *", 0, 0, (void*)0, 0};
4259
- static swig_type_info _swigt__p_void = {"_p_void", "Cbc_Model *|Sbb_Model *|Clp_Simplex *|void *", 0, 0, (void*)0, 0};
4372
+ static swig_type_info _swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void = {"_p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void", "cbc_callback|void (*)(void *,int,int,double const *,int,int const *,int,char **)", 0, 0, (void*)0, 0};
4373
+ static swig_type_info _swigt__p_int = {"_p_int", "CoinBigIndex *|int *", 0, 0, (void*)0, 0};
4374
+ static swig_type_info _swigt__p_void = {"_p_void", "Cbc_Model *|Clp_Simplex *|Sbb_Model *|void *", 0, 0, (void*)0, 0};
4260
4375
 
4261
4376
  static swig_type_info *swig_type_initial[] = {
4262
4377
  &_swigt__p_DoubleArray,
@@ -4271,9 +4386,9 @@ static swig_type_info *swig_type_initial[] = {
4271
4386
  static swig_cast_info _swigc__p_DoubleArray[] = { {&_swigt__p_DoubleArray, 0, 0, 0},{0, 0, 0, 0}};
4272
4387
  static swig_cast_info _swigc__p_IntArray[] = { {&_swigt__p_IntArray, 0, 0, 0},{0, 0, 0, 0}};
4273
4388
  static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
4274
- static swig_cast_info _swigc__p_double[] = { {&_swigt__p_DoubleArray, _p_DoubleArrayTo_p_double, 0, 0}, {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
4389
+ static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0}, {&_swigt__p_DoubleArray, _p_DoubleArrayTo_p_double, 0, 0},{0, 0, 0, 0}};
4275
4390
  static swig_cast_info _swigc__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void[] = { {&_swigt__p_f_p_void_int_int_p_q_const__double_int_p_q_const__int_int_p_p_char__void, 0, 0, 0},{0, 0, 0, 0}};
4276
- static swig_cast_info _swigc__p_int[] = { {&_swigt__p_IntArray, _p_IntArrayTo_p_int, 0, 0}, {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
4391
+ static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0}, {&_swigt__p_IntArray, _p_IntArrayTo_p_int, 0, 0},{0, 0, 0, 0}};
4277
4392
  static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
4278
4393
 
4279
4394
  static swig_cast_info *swig_cast_initial[] = {
@@ -4341,9 +4456,12 @@ extern "C" {
4341
4456
  #define SWIGRUNTIME_DEBUG
4342
4457
  #endif
4343
4458
 
4459
+ #ifndef SWIG_INIT_CLIENT_DATA_TYPE
4460
+ #define SWIG_INIT_CLIENT_DATA_TYPE void *
4461
+ #endif
4344
4462
 
4345
4463
  SWIGRUNTIME void
4346
- SWIG_InitializeModule(void *clientdata) {
4464
+ SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
4347
4465
  size_t i;
4348
4466
  swig_module_info *module_head, *iter;
4349
4467
  int init;
@@ -4389,7 +4507,7 @@ SWIG_InitializeModule(void *clientdata) {
4389
4507
 
4390
4508
  /* Now work on filling in swig_module.types */
4391
4509
  #ifdef SWIGRUNTIME_DEBUG
4392
- printf("SWIG_InitializeModule: size %d\n", swig_module.size);
4510
+ printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
4393
4511
  #endif
4394
4512
  for (i = 0; i < swig_module.size; ++i) {
4395
4513
  swig_type_info *type = 0;
@@ -4397,7 +4515,7 @@ SWIG_InitializeModule(void *clientdata) {
4397
4515
  swig_cast_info *cast;
4398
4516
 
4399
4517
  #ifdef SWIGRUNTIME_DEBUG
4400
- printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4518
+ printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4401
4519
  #endif
4402
4520
 
4403
4521
  /* if there is another module already loaded */
@@ -4473,7 +4591,7 @@ SWIG_InitializeModule(void *clientdata) {
4473
4591
  for (i = 0; i < swig_module.size; ++i) {
4474
4592
  int j = 0;
4475
4593
  swig_cast_info *cast = swig_module.cast_initial[i];
4476
- printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
4594
+ printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
4477
4595
  while (cast->type) {
4478
4596
  printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
4479
4597
  cast++;
@@ -1,3 +1,3 @@
1
1
  module CbcWrapper
2
- VERSION = "2.9.9.4"
2
+ VERSION = "2.9.9.5"
3
3
  end
data/lib/cbc-wrapper.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module CbcWrapper
2
2
  end
3
3
 
4
- require File.expand_path("../../ext/cbc-wrapper/cbc_wrapper", __FILE__)
4
+ require File.expand_path("../cbc_wrapper", __FILE__)
5
5
  require File.expand_path("../cbc-wrapper/version", __FILE__)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cbc-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.9.9.4
4
+ version: 2.9.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Verger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-01-05 00:00:00.000000000 Z
11
+ date: 2023-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.10'
19
+ version: '2.4'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.10'
26
+ version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -94,7 +94,7 @@ files:
94
94
  homepage: https://github.com/gverger/cbc-wrapper
95
95
  licenses: []
96
96
  metadata: {}
97
- post_install_message:
97
+ post_install_message:
98
98
  rdoc_options: []
99
99
  require_paths:
100
100
  - lib
@@ -110,8 +110,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  - !ruby/object:Gem::Version
111
111
  version: '0'
112
112
  requirements: []
113
- rubygems_version: 3.0.3
114
- signing_key:
113
+ rubygems_version: 3.3.7
114
+ signing_key:
115
115
  specification_version: 4
116
116
  summary: Bare wrapper around Cbc Linear Programming Solver made with SWIG
117
117
  test_files: []