@@ -221,15 +221,6 @@ enum SwigMemFlags {
221
221
" as a reference" , RETURNNULL); \
222
222
}
223
223
224
-
225
- namespace swig {
226
- enum AssignmentType {
227
- ASSIGNMENT_DEFAULT,
228
- ASSIGNMENT_NODESTRUCT,
229
- ASSIGNMENT_SMARTPTR
230
- };
231
- }
232
-
233
224
#define SWIGPOLICY_std_mt19937 swig::ASSIGNMENT_DEFAULT
234
225
#define SWIGPOLICY_std_mt19937_64 swig::ASSIGNMENT_DEFAULT
235
226
@@ -475,123 +466,6 @@ SWIGINTERN SwigClassWrapper SwigClassWrapper_uninitialized() {
475
466
return result;
476
467
}
477
468
478
-
479
- namespace swig {
480
-
481
- template <class T , AssignmentType A>
482
- struct DestructorPolicy {
483
- static SwigClassWrapper destroy (SwigClassWrapper self) {
484
- delete static_cast <T*>(self.cptr );
485
- return SwigClassWrapper_uninitialized ();
486
- }
487
- };
488
- template <class T >
489
- struct DestructorPolicy <T, ASSIGNMENT_NODESTRUCT> {
490
- static SwigClassWrapper destroy (SwigClassWrapper) {
491
- SWIG_exception_impl (" assignment" , SWIG_TypeError, " Invalid assignment: class type has private destructor" , return SwigClassWrapper_uninitialized ());
492
- }
493
- };
494
- }
495
-
496
-
497
- namespace swig {
498
-
499
- SWIGINTERN SwigClassWrapper capture (SwigClassWrapper other) {
500
- other.cmemflags &= ~SWIG_MEM_RVALUE;
501
- return other;
502
- }
503
-
504
- template <class T , AssignmentType A>
505
- struct AssignmentPolicy {
506
- static SwigClassWrapper destroy (SwigClassWrapper self) {
507
- return DestructorPolicy<T, A>::destroy (self);
508
- }
509
- static SwigClassWrapper alias (SwigClassWrapper other) {
510
- SwigClassWrapper self = other;
511
- self.cmemflags &= ~SWIG_MEM_OWN;
512
- return self;
513
- }
514
- static SwigClassWrapper move_alias (SwigClassWrapper self, SwigClassWrapper other) {
515
- if (self.cmemflags & SWIG_MEM_OWN) {
516
- destroy (self);
517
- }
518
- return capture (other);
519
- }
520
- static SwigClassWrapper copy_alias (SwigClassWrapper self, SwigClassWrapper other) {
521
- if (self.cmemflags & SWIG_MEM_OWN) {
522
- destroy (self);
523
- }
524
- return capture (other);
525
- }
526
- };
527
-
528
- template <class T >
529
- struct AssignmentPolicy <T, ASSIGNMENT_SMARTPTR> {
530
- static SwigClassWrapper destroy (SwigClassWrapper self) {
531
- return DestructorPolicy<T, ASSIGNMENT_SMARTPTR>::destroy (self);
532
- }
533
- static SwigClassWrapper alias (SwigClassWrapper other) {
534
- SwigClassWrapper self;
535
- self.cptr = new T (*static_cast <T*>(other.cptr ));
536
- self.cmemflags = other.cmemflags | SWIG_MEM_OWN;
537
- return self;
538
- }
539
- static SwigClassWrapper move_alias (SwigClassWrapper self, SwigClassWrapper other) {
540
- self = copy_alias (self, other);
541
- self.cmemflags = other.cmemflags & ~SWIG_MEM_RVALUE;
542
- destroy (other);
543
- return self;
544
- }
545
- static SwigClassWrapper copy_alias (SwigClassWrapper self, SwigClassWrapper other) {
546
- // LHS and RHS should both 'own' their shared pointers
547
- T *pself = static_cast <T*>(self.cptr );
548
- T *pother = static_cast <T*>(other.cptr );
549
- *pself = *pother;
550
- return self;
551
- }
552
- };
553
-
554
- } // end namespace swig
555
-
556
- template <class T , swig::AssignmentType A>
557
- SWIGINTERN void SWIG_assign (SwigClassWrapper* self, SwigClassWrapper other) {
558
- typedef swig::AssignmentPolicy<T, A> Policy_t;
559
-
560
- if (self->cptr == NULL ) {
561
- /* LHS is unassigned */
562
- if (other.cmemflags & SWIG_MEM_RVALUE) {
563
- /* Capture pointer from RHS, clear 'moving' flag */
564
- *self = swig::capture (other);
565
- } else {
566
- /* Aliasing another class; clear ownership or copy smart pointer */
567
- *self = Policy_t::alias (other);
568
- }
569
- } else if (other.cptr == NULL ) {
570
- /* Replace LHS with a null pointer */
571
- *self = Policy_t::destroy (*self);
572
- } else if (self->cptr == other.cptr ) {
573
- /* Self-assignment: ignore */
574
- } else if (other.cmemflags & SWIG_MEM_RVALUE) {
575
- /* Transferred ownership from a variable that's about to be lost.
576
- * Move-assign and delete the transient data */
577
- *self = Policy_t::move_alias (*self, other);
578
- } else {
579
- /* RHS shouldn't be deleted, alias to LHS */
580
- *self = Policy_t::copy_alias (*self, other);
581
- }
582
- }
583
-
584
- template <class T , swig::AssignmentType A>
585
- SWIGINTERN void SWIG_free_rvalue (SwigClassWrapper other) {
586
- typedef swig::AssignmentPolicy<T, A> Policy_t;
587
- if (other.cmemflags & SWIG_MEM_RVALUE
588
- && other.cmemflags & SWIG_MEM_OWN) {
589
- /* We own *and* are being passed an expiring value */
590
- Policy_t::destroy (other);
591
- }
592
- }
593
-
594
-
595
469
extern " C" {
596
470
SWIGEXPORT void _wrap_sort__SWIG_1 (SwigArrayWrapper *farg1) {
597
471
int32_t *arg1 = (int32_t *) 0 ;
@@ -1373,7 +1247,6 @@ SWIGEXPORT void _wrap_shuffle__SWIG_1(SwigClassWrapper *farg1, SwigArrayWrapper
1373
1247
arg2 = (int32_t *)farg2->data ;
1374
1248
arg3 = farg2->size ;
1375
1249
shuffle< int32_t >(*arg1,arg2,arg3);
1376
- SWIG_free_rvalue< std::mt19937, SWIGPOLICY_std_mt19937 >(*farg1);
1377
1250
}
1378
1251
1379
1252
@@ -1387,7 +1260,6 @@ SWIGEXPORT void _wrap_shuffle__SWIG_2(SwigClassWrapper *farg1, SwigArrayWrapper
1387
1260
arg2 = (int64_t *)farg2->data ;
1388
1261
arg3 = farg2->size ;
1389
1262
shuffle< int64_t >(*arg1,arg2,arg3);
1390
- SWIG_free_rvalue< std::mt19937, SWIGPOLICY_std_mt19937 >(*farg1);
1391
1263
}
1392
1264
1393
1265
@@ -1401,7 +1273,6 @@ SWIGEXPORT void _wrap_shuffle__SWIG_3(SwigClassWrapper *farg1, SwigArrayWrapper
1401
1273
arg2 = (double *)farg2->data ;
1402
1274
arg3 = farg2->size ;
1403
1275
shuffle< double >(*arg1,arg2,arg3);
1404
- SWIG_free_rvalue< std::mt19937, SWIGPOLICY_std_mt19937 >(*farg1);
1405
1276
}
1406
1277
1407
1278
@@ -1415,7 +1286,6 @@ SWIGEXPORT void _wrap_shuffle__SWIG_4(SwigClassWrapper *farg1, SwigArrayWrapper
1415
1286
arg2 = (void **)farg2->data ;
1416
1287
arg3 = farg2->size ;
1417
1288
shuffle< void * >(*arg1,arg2,arg3);
1418
- SWIG_free_rvalue< std::mt19937, SWIGPOLICY_std_mt19937 >(*farg1);
1419
1289
}
1420
1290
1421
1291
0 commit comments