-
Notifications
You must be signed in to change notification settings - Fork 0
/
http:__192.168.5.61:20000_report-9d23eb.html#EndPath.html
1189 lines (1152 loc) · 173 KB
/
http:__192.168.5.61:20000_report-9d23eb.html#EndPath.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html>
<head>
<title>build/src.linux-x86_64-3.8/scipy/optimize/cobyla/_cobylamodule.c</title>
<style type="text/css">
body { color:#000000; background-color:#ffffff }
body { font-family:Helvetica, sans-serif; font-size:10pt }
h1 { font-size:14pt }
.FileName { margin-top: 5px; margin-bottom: 5px; display: inline; }
.FileNav { margin-left: 5px; margin-right: 5px; display: inline; }
.FileNav a { text-decoration:none; font-size: larger; }
.divider { margin-top: 30px; margin-bottom: 30px; height: 15px; }
.divider { background-color: gray; }
.code { border-collapse:collapse; width:100%; }
.code { font-family: "Monospace", monospace; font-size:10pt }
.code { line-height: 1.2em }
.comment { color: green; font-style: oblique }
.keyword { color: blue }
.string_literal { color: red }
.directive { color: darkmagenta }
/* Macros and variables could have pop-up notes hidden by default.
- Macro pop-up: expansion of the macro
- Variable pop-up: value (table) of the variable */
.macro_popup, .variable_popup { display: none; }
/* Pop-up appears on mouse-hover event. */
.macro:hover .macro_popup, .variable:hover .variable_popup {
display: block;
padding: 2px;
-webkit-border-radius:5px;
-webkit-box-shadow:1px 1px 7px #000;
border-radius:5px;
box-shadow:1px 1px 7px #000;
position: absolute;
top: -1em;
left:10em;
z-index: 1
}
.macro_popup {
border: 2px solid red;
background-color:#FFF0F0;
font-weight: normal;
}
.variable_popup {
border: 2px solid blue;
background-color:#F0F0FF;
font-weight: bold;
font-family: Helvetica, sans-serif;
font-size: 9pt;
}
/* Pop-up notes needs a relative position as a base where they pops up. */
.macro, .variable {
background-color: PaleGoldenRod;
position: relative;
}
.macro { color: DarkMagenta; }
#tooltiphint {
position: fixed;
width: 50em;
margin-left: -25em;
left: 50%;
padding: 10px;
border: 1px solid #b0b0b0;
border-radius: 2px;
box-shadow: 1px 1px 7px black;
background-color: #c0c0c0;
z-index: 2;
}
.num { width:2.5em; padding-right:2ex; background-color:#eeeeee }
.num { text-align:right; font-size:8pt }
.num { color:#444444 }
.line { padding-left: 1ex; border-left: 3px solid #ccc }
.line { white-space: pre }
.msg { -webkit-box-shadow:1px 1px 7px #000 }
.msg { box-shadow:1px 1px 7px #000 }
.msg { -webkit-border-radius:5px }
.msg { border-radius:5px }
.msg { font-family:Helvetica, sans-serif; font-size:8pt }
.msg { float:left }
.msg { padding:0.25em 1ex 0.25em 1ex }
.msg { margin-top:10px; margin-bottom:10px }
.msg { font-weight:bold }
.msg { max-width:60em; word-wrap: break-word; white-space: pre-wrap }
.msgT { padding:0x; spacing:0x }
.msgEvent { background-color:#fff8b4; color:#000000 }
.msgControl { background-color:#bbbbbb; color:#000000 }
.msgNote { background-color:#ddeeff; color:#000000 }
.mrange { background-color:#dfddf3 }
.mrange { border-bottom:1px solid #6F9DBE }
.PathIndex { font-weight: bold; padding:0px 5px; margin-right:5px; }
.PathIndex { -webkit-border-radius:8px }
.PathIndex { border-radius:8px }
.PathIndexEvent { background-color:#bfba87 }
.PathIndexControl { background-color:#8c8c8c }
.PathIndexPopUp { background-color: #879abc; }
.PathNav a { text-decoration:none; font-size: larger }
.CodeInsertionHint { font-weight: bold; background-color: #10dd10 }
.CodeRemovalHint { background-color:#de1010 }
.CodeRemovalHint { border-bottom:1px solid #6F9DBE }
.selected{ background-color:orange !important; }
table.simpletable {
padding: 5px;
font-size:12pt;
margin:20px;
border-collapse: collapse; border-spacing: 0px;
}
td.rowname {
text-align: right;
vertical-align: top;
font-weight: bold;
color:#444444;
padding-right:2ex;
}
/* Hidden text. */
input.spoilerhider + label {
cursor: pointer;
text-decoration: underline;
display: block;
}
input.spoilerhider {
display: none;
}
input.spoilerhider ~ .spoiler {
overflow: hidden;
margin: 10px auto 0;
height: 0;
opacity: 0;
}
input.spoilerhider:checked + label + .spoiler{
height: auto;
opacity: 1;
}
</style>
</head>
<body>
<!-- BUGDESC PyObject ownership leak with reference count of 1 -->
<!-- BUGTYPE Non-Zero Dead Object -->
<!-- BUGCATEGORY Python Memory Error -->
<!-- BUGFILE /home/alan/workspace/canalyze/test/python/scipy/build/src.linux-x86_64-3.8/scipy/optimize/cobyla/_cobylamodule.c -->
<!-- FILENAME _cobylamodule.c -->
<!-- FUNCTIONNAME cb_calcfc_in__cobyla__user__routines -->
<!-- ISSUEHASHCONTENTOFLINEINCONTEXT c99d279b51f8d605c5bb19c5e4a59958 -->
<!-- BUGLINE 380 -->
<!-- BUGCOLUMN 39 -->
<!-- BUGPATHLENGTH 22 -->
<!-- BUGMETAEND -->
<!-- REPORTHEADER -->
<h3>Bug Summary</h3>
<table class="simpletable">
<tr><td class="rowname">File:</td><td>home/alan/workspace/canalyze/test/python/scipy/build/src.linux-x86_64-3.8/scipy/optimize/cobyla/_cobylamodule.c</td></tr>
<tr><td class="rowname">Warning:</td><td><a href="#EndPath">line 380, column 39</a><br />PyObject ownership leak with reference count of 1</td></tr>
</table>
<!-- REPORTSUMMARYEXTRA -->
<h3>Annotated Source Code</h3>
<p>Press <a href="#" onclick="toggleHelp(); return false;">'?'</a>
to see keyboard shortcuts</p>
<input type="checkbox" class="spoilerhider" id="showinvocation" />
<label for="showinvocation" >Show analyzer invocation</label>
<div class="spoiler">clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name _cobylamodule.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -analyzer-output=html -analyzer-checker=python -analyzer-disable-checker=deadcode -analyzer-config prune-paths=true,suppress-c++-stdlib=true,suppress-null-return-paths=false,crosscheck-with-z3=true,model-path=/home/alan/temp/cpython/Python-3.8.5/Doc/build/models -analyzer-config experimental-enable-naive-ctu-analysis=true,ctu-dir=/home/alan/workspace/canalyze/test/python/scipy/csa-scan,ctu-index-name=/home/alan/workspace/canalyze/test/python/scipy/csa-scan/externalDefMap.txt,ctu-invocation-list=/home/alan/workspace/canalyze/test/python/scipy/csa-scan/invocations.yaml,display-ctu-progress=false -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model pic -pic-level 2 -fhalf-no-semantic-interposition -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -tune-cpu generic -debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb -fcoverage-compilation-dir=/home/alan/workspace/canalyze/test/python/scipy -resource-dir /home/alan/workspace/llvm-project/build/NATIVE/lib/clang/13.0.0 -isystem /home/alan/temp/cpython/Python-3.8.5/Doc/build/python3.8 -D NDEBUG -D _FORTIFY_SOURCE=2 -D NPY_NO_DEPRECATED_API=NPY_1_9_API_VERSION -I build/src.linux-x86_64-3.8/build/src.linux-x86_64-3.8/scipy/optimize/cobyla -I /usr/lib/python3/dist-packages/numpy/core/include -internal-isystem /home/alan/workspace/llvm-project/build/NATIVE/lib/clang/13.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/x86_64-linux-gnu/10/../../../../x86_64-linux-gnu/include -internal-externc-isystem /usr/include/x86_64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-unused-result -Wsign-compare -Wall -Wformat -Werror=format-security -Wformat -Werror=format-security -Wdate-time -fdebug-compilation-dir=/home/alan/workspace/canalyze/test/python/scipy -ferror-limit 19 -fwrapv -pthread -stack-protector 2 -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/alan/workspace/canalyze/test/python/scipy/csa-scan/reports -x c build/src.linux-x86_64-3.8/scipy/optimize/cobyla/_cobylamodule.c
</div>
<div id='tooltiphint' hidden="true">
<p>Keyboard shortcuts: </p>
<ul>
<li>Use 'j/k' keys for keyboard navigation</li>
<li>Use 'Shift+S' to show/hide relevant lines</li>
<li>Use '?' to toggle this window</li>
</ul>
<a href="#" onclick="toggleHelp(); return false;">Close</a>
</div>
<script type='text/javascript'>
var relevant_lines = {"1": {"344": 1, "345": 1, "346": 1, "347": 1, "348": 1, "349": 1, "350": 1, "352": 1, "353": 1, "354": 1, "355": 1, "356": 1, "362": 1, "366": 1, "370": 1, "376": 1, "377": 1, "378": 1, "379": 1, "380": 1, "381": 1, "390": 1, "395": 1, "396": 1, "405": 1, "416": 1, "442": 1}, "36623": {"5": 1}, "36658": {"5": 1}, "36660": {"5": 1, "6": 1}};
var filterCounterexample = function (hide) {
var tables = document.getElementsByClassName("code");
for (var t=0; t<tables.length; t++) {
var table = tables[t];
var file_id = table.getAttribute("data-fileid");
var lines_in_fid = relevant_lines[file_id];
if (!lines_in_fid) {
lines_in_fid = {};
}
var lines = table.getElementsByClassName("codeline");
for (var i=0; i<lines.length; i++) {
var el = lines[i];
var lineNo = el.getAttribute("data-linenumber");
if (!lines_in_fid[lineNo]) {
if (hide) {
el.setAttribute("hidden", "");
} else {
el.removeAttribute("hidden");
}
}
}
}
}
window.addEventListener("keydown", function (event) {
if (event.defaultPrevented) {
return;
}
if (event.key == "S") {
var checked = document.getElementsByName("showCounterexample")[0].checked;
filterCounterexample(!checked);
document.getElementsByName("showCounterexample")[0].checked = !checked;
} else {
return;
}
event.preventDefault();
}, true);
document.addEventListener("DOMContentLoaded", function() {
document.querySelector('input[name="showCounterexample"]').onchange=
function (event) {
filterCounterexample(this.checked);
};
});
</script>
<form>
<input type="checkbox" name="showCounterexample" id="showCounterexample" />
<label for="showCounterexample">
Show only relevant lines
</label>
</form>
<script type='text/javascript'>
var digitMatcher = new RegExp("[0-9]+");
var querySelectorAllArray = function(selector) {
return Array.prototype.slice.call(
document.querySelectorAll(selector));
}
document.addEventListener("DOMContentLoaded", function() {
querySelectorAllArray(".PathNav > a").forEach(
function(currentValue, currentIndex) {
var hrefValue = currentValue.getAttribute("href");
currentValue.onclick = function() {
scrollTo(document.querySelector(hrefValue));
return false;
};
});
});
var findNum = function() {
var s = document.querySelector(".selected");
if (!s || s.id == "EndPath") {
return 0;
}
var out = parseInt(digitMatcher.exec(s.id)[0]);
return out;
};
var scrollTo = function(el) {
querySelectorAllArray(".selected").forEach(function(s) {
s.classList.remove("selected");
});
el.classList.add("selected");
window.scrollBy(0, el.getBoundingClientRect().top -
(window.innerHeight / 2));
}
var move = function(num, up, numItems) {
if (num == 1 && up || num == numItems - 1 && !up) {
return 0;
} else if (num == 0 && up) {
return numItems - 1;
} else if (num == 0 && !up) {
return 1 % numItems;
}
return up ? num - 1 : num + 1;
}
var numToId = function(num) {
if (num == 0) {
return document.getElementById("EndPath")
}
return document.getElementById("Path" + num);
};
var navigateTo = function(up) {
var numItems = document.querySelectorAll(
".line > .msgEvent, .line > .msgControl").length;
var currentSelected = findNum();
var newSelected = move(currentSelected, up, numItems);
var newEl = numToId(newSelected, numItems);
// Scroll element into center.
scrollTo(newEl);
};
window.addEventListener("keydown", function (event) {
if (event.defaultPrevented) {
return;
}
if (event.key == "j") {
navigateTo(/*up=*/false);
} else if (event.key == "k") {
navigateTo(/*up=*/true);
} else {
return;
}
event.preventDefault();
}, true);
</script>
<script type='text/javascript'>
var toggleHelp = function() {
var hint = document.querySelector("#tooltiphint");
var attributeName = "hidden";
if (hint.hasAttribute(attributeName)) {
hint.removeAttribute(attributeName);
} else {
hint.setAttribute("hidden", "true");
}
};
window.addEventListener("keydown", function (event) {
if (event.defaultPrevented) {
return;
}
if (event.key == "?") {
toggleHelp();
} else {
return;
}
event.preventDefault();
});
</script>
<div id=File1>
<h4 class=FileName>build/src.linux-x86_64-3.8/scipy/optimize/cobyla/_cobylamodule.c</h4>
<div class=FileNav><a href="#File36660">→</a></div></div>
<table class="code" data-fileid="1">
<tr class="codeline" data-linenumber="1"><td class="num" id="LN1">1</td><td class="line"><span class='comment'>/* File: _cobylamodule.c</span></td></tr>
<tr class="codeline" data-linenumber="2"><td class="num" id="LN2">2</td><td class="line"> <span class='comment'>* This file is auto-generated with f2py (version:2).</span></td></tr>
<tr class="codeline" data-linenumber="3"><td class="num" id="LN3">3</td><td class="line"> <span class='comment'>* f2py is a Fortran to Python Interface Generator (FPIG), Second Edition,</span></td></tr>
<tr class="codeline" data-linenumber="4"><td class="num" id="LN4">4</td><td class="line"> <span class='comment'>* written by Pearu Peterson <[email protected]>.</span></td></tr>
<tr class="codeline" data-linenumber="5"><td class="num" id="LN5">5</td><td class="line"> <span class='comment'>* Generation date: Wed Jul 14 03:02:03 2021</span></td></tr>
<tr class="codeline" data-linenumber="6"><td class="num" id="LN6">6</td><td class="line"> <span class='comment'>* Do not edit this file directly unless you know what you are doing!!!</span></td></tr>
<tr class="codeline" data-linenumber="7"><td class="num" id="LN7">7</td><td class="line"> <span class='comment'>*/</span></td></tr>
<tr class="codeline" data-linenumber="8"><td class="num" id="LN8">8</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="9"><td class="num" id="LN9">9</td><td class="line"><span class='directive'>#ifdef __cplusplus</span></td></tr>
<tr class="codeline" data-linenumber="10"><td class="num" id="LN10">10</td><td class="line"><span class='keyword'>extern</span> <span class='string_literal'>"C"</span> {</td></tr>
<tr class="codeline" data-linenumber="11"><td class="num" id="LN11">11</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="12"><td class="num" id="LN12">12</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="13"><td class="num" id="LN13">13</td><td class="line"><span class='comment'>/*********************** See f2py2e/cfuncs.py: includes ***********************/</span></td></tr>
<tr class="codeline" data-linenumber="14"><td class="num" id="LN14">14</td><td class="line"><span class='directive'>#include "Python.h"</span></td></tr>
<tr class="codeline" data-linenumber="15"><td class="num" id="LN15">15</td><td class="line"><span class='directive'>#include <stdarg.h></span></td></tr>
<tr class="codeline" data-linenumber="16"><td class="num" id="LN16">16</td><td class="line"><span class='directive'>#include "fortranobject.h"</span></td></tr>
<tr class="codeline" data-linenumber="17"><td class="num" id="LN17">17</td><td class="line"><span class='directive'>#include <setjmp.h></span></td></tr>
<tr class="codeline" data-linenumber="18"><td class="num" id="LN18">18</td><td class="line"><span class='directive'>#include <math.h></span></td></tr>
<tr class="codeline" data-linenumber="19"><td class="num" id="LN19">19</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="20"><td class="num" id="LN20">20</td><td class="line"><span class='comment'>/**************** See f2py2e/rules.py: mod_rules['modulebody'] ****************/</span></td></tr>
<tr class="codeline" data-linenumber="21"><td class="num" id="LN21">21</td><td class="line"><span class='keyword'>static</span> PyObject *_cobyla_error;</td></tr>
<tr class="codeline" data-linenumber="22"><td class="num" id="LN22">22</td><td class="line"><span class='keyword'>static</span> PyObject *_cobyla_module;</td></tr>
<tr class="codeline" data-linenumber="23"><td class="num" id="LN23">23</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="24"><td class="num" id="LN24">24</td><td class="line"><span class='comment'>/*********************** See f2py2e/cfuncs.py: typedefs ***********************/</span></td></tr>
<tr class="codeline" data-linenumber="25"><td class="num" id="LN25">25</td><td class="line"><span class='comment'>/*need_typedefs*/</span></td></tr>
<tr class="codeline" data-linenumber="26"><td class="num" id="LN26">26</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="27"><td class="num" id="LN27">27</td><td class="line"><span class='comment'>/****************** See f2py2e/cfuncs.py: typedefs_generated ******************/</span></td></tr>
<tr class="codeline" data-linenumber="28"><td class="num" id="LN28">28</td><td class="line"><span class='keyword'>typedef</span> <span class='keyword'>void</span>(*cb_calcfc_in__cobyla__user__routines_typedef)(<span class='keyword'>int</span> *,<span class='keyword'>int</span> *,<span class='keyword'>double</span> *,<span class='keyword'>double</span> *,<span class='keyword'>double</span> *);</td></tr>
<tr class="codeline" data-linenumber="29"><td class="num" id="LN29">29</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="30"><td class="num" id="LN30">30</td><td class="line"><span class='comment'>/********************** See f2py2e/cfuncs.py: cppmacros **********************/</span></td></tr>
<tr class="codeline" data-linenumber="31"><td class="num" id="LN31">31</td><td class="line"><span class='directive'>#ifndef max</span></td></tr>
<tr class="codeline" data-linenumber="32"><td class="num" id="LN32">32</td><td class="line"><span class='directive'>#define <span class='macro'>max(a,b)<span class='macro_popup'>((a > b) ? (a) : (b))</span></span> ((a > b) ? (a) : (b))</span></td></tr>
<tr class="codeline" data-linenumber="33"><td class="num" id="LN33">33</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="34"><td class="num" id="LN34">34</td><td class="line"><span class='directive'>#ifndef min</span></td></tr>
<tr class="codeline" data-linenumber="35"><td class="num" id="LN35">35</td><td class="line"><span class='directive'>#define <span class='macro'>min(a,b)<span class='macro_popup'>((a < b) ? (a) : (b))</span></span> ((a < b) ? (a) : (b))</span></td></tr>
<tr class="codeline" data-linenumber="36"><td class="num" id="LN36">36</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="37"><td class="num" id="LN37">37</td><td class="line"><span class='directive'>#ifndef MAX</span></td></tr>
<tr class="codeline" data-linenumber="38"><td class="num" id="LN38">38</td><td class="line"><span class='directive'>#define <span class='macro'>MAX(a,b)<span class='macro_popup'>((a > b) ? (a) : (b))</span></span> ((a > b) ? (a) : (b))</span></td></tr>
<tr class="codeline" data-linenumber="39"><td class="num" id="LN39">39</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="40"><td class="num" id="LN40">40</td><td class="line"><span class='directive'>#ifndef MIN</span></td></tr>
<tr class="codeline" data-linenumber="41"><td class="num" id="LN41">41</td><td class="line"><span class='directive'>#define <span class='macro'>MIN(a,b)<span class='macro_popup'>((a < b) ? (a) : (b))</span></span> ((a < b) ? (a) : (b))</span></td></tr>
<tr class="codeline" data-linenumber="42"><td class="num" id="LN42">42</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="43"><td class="num" id="LN43">43</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="44"><td class="num" id="LN44">44</td><td class="line"><span class='directive'>#define <span class='macro'>PRINTPYOBJERR(obj)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "_cobyla.error is related to ")<br>; PyObject_Print((PyObject *)obj,stderr,1); __fprintf_chk (stderr<br>, 2 - 1, "\n");</span></span>\</span></td></tr>
<tr class="codeline" data-linenumber="45"><td class="num" id="LN45">45</td><td class="line"> <span class='directive'><span class='macro'>fprintf(stderr,"_cobyla.error is related to ")<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "_cobyla.error is related to ")</span></span>;\</span></td></tr>
<tr class="codeline" data-linenumber="46"><td class="num" id="LN46">46</td><td class="line"> <span class='directive'>PyObject_Print((PyObject *)obj,<span class='macro'>stderr<span class='macro_popup'>stderr</span></span>,<span class='macro'>Py_PRINT_RAW<span class='macro_popup'>1</span></span>);\</span></td></tr>
<tr class="codeline" data-linenumber="47"><td class="num" id="LN47">47</td><td class="line"> <span class='directive'><span class='macro'>fprintf(stderr,"\n")<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "\n")</span></span>;</span></td></tr>
<tr class="codeline" data-linenumber="48"><td class="num" id="LN48">48</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="49"><td class="num" id="LN49">49</td><td class="line"><span class='directive'>#define <span class='macro'>GETSCALARFROMPYTUPLE(tuple,index,var,ctype,mess)<span class='macro_popup'>{ if ((capi_tmp = PyTuple_GetItem((tuple),(index)))==((void*)<br>0)) goto capi_fail; if (!(ctype_from_pyobj((var),capi_tmp,mess<br>))) goto capi_fail; }</span></span> {\</span></td></tr>
<tr class="codeline" data-linenumber="50"><td class="num" id="LN50">50</td><td class="line"> <span class='directive'>if ((capi_tmp = PyTuple_GetItem((tuple),(index)))==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) goto capi_fail;\</span></td></tr>
<tr class="codeline" data-linenumber="51"><td class="num" id="LN51">51</td><td class="line"> <span class='directive'>if (!(ctype ## _from_pyobj((var),capi_tmp,mess)))\</span></td></tr>
<tr class="codeline" data-linenumber="52"><td class="num" id="LN52">52</td><td class="line"> <span class='directive'>goto capi_fail;\</span></td></tr>
<tr class="codeline" data-linenumber="53"><td class="num" id="LN53">53</td><td class="line"> <span class='directive'>}</span></td></tr>
<tr class="codeline" data-linenumber="54"><td class="num" id="LN54">54</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="55"><td class="num" id="LN55">55</td><td class="line"><span class='directive'>#ifdef DEBUGCFUNCS</span></td></tr>
<tr class="codeline" data-linenumber="56"><td class="num" id="LN56">56</td><td class="line"><span class='directive'>#define CFUNCSMESS(mess) <span class='macro'>fprintf(stderr,"debug-capi:"mess)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "debug-capi:"mess)</span></span>;</span></td></tr>
<tr class="codeline" data-linenumber="57"><td class="num" id="LN57">57</td><td class="line"><span class='directive'>#define CFUNCSMESSPY(mess,obj) CFUNCSMESS(mess) \</span></td></tr>
<tr class="codeline" data-linenumber="58"><td class="num" id="LN58">58</td><td class="line"> <span class='directive'>PyObject_Print((PyObject *)obj,<span class='macro'>stderr<span class='macro_popup'>stderr</span></span>,<span class='macro'>Py_PRINT_RAW<span class='macro_popup'>1</span></span>);\</span></td></tr>
<tr class="codeline" data-linenumber="59"><td class="num" id="LN59">59</td><td class="line"> <span class='directive'><span class='macro'>fprintf(stderr,"\n")<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "\n")</span></span>;</span></td></tr>
<tr class="codeline" data-linenumber="60"><td class="num" id="LN60">60</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="61"><td class="num" id="LN61">61</td><td class="line"><span class='directive'>#define CFUNCSMESS(mess)</span></td></tr>
<tr class="codeline" data-linenumber="62"><td class="num" id="LN62">62</td><td class="line"><span class='directive'>#define CFUNCSMESSPY(mess,obj)</span></td></tr>
<tr class="codeline" data-linenumber="63"><td class="num" id="LN63">63</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="64"><td class="num" id="LN64">64</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="65"><td class="num" id="LN65">65</td><td class="line"><span class='directive'>#if defined(PREPEND_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="66"><td class="num" id="LN66">66</td><td class="line"><span class='directive'>#if defined(NO_APPEND_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="67"><td class="num" id="LN67">67</td><td class="line"><span class='directive'>#if defined(UPPERCASE_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="68"><td class="num" id="LN68">68</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> _##F</span></td></tr>
<tr class="codeline" data-linenumber="69"><td class="num" id="LN69">69</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="70"><td class="num" id="LN70">70</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> _##f</span></td></tr>
<tr class="codeline" data-linenumber="71"><td class="num" id="LN71">71</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="72"><td class="num" id="LN72">72</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="73"><td class="num" id="LN73">73</td><td class="line"><span class='directive'>#if defined(UPPERCASE_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="74"><td class="num" id="LN74">74</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> _##F##_</span></td></tr>
<tr class="codeline" data-linenumber="75"><td class="num" id="LN75">75</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="76"><td class="num" id="LN76">76</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> _##f##_</span></td></tr>
<tr class="codeline" data-linenumber="77"><td class="num" id="LN77">77</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="78"><td class="num" id="LN78">78</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="79"><td class="num" id="LN79">79</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="80"><td class="num" id="LN80">80</td><td class="line"><span class='directive'>#if defined(NO_APPEND_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="81"><td class="num" id="LN81">81</td><td class="line"><span class='directive'>#if defined(UPPERCASE_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="82"><td class="num" id="LN82">82</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> F</span></td></tr>
<tr class="codeline" data-linenumber="83"><td class="num" id="LN83">83</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="84"><td class="num" id="LN84">84</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> f</span></td></tr>
<tr class="codeline" data-linenumber="85"><td class="num" id="LN85">85</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="86"><td class="num" id="LN86">86</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="87"><td class="num" id="LN87">87</td><td class="line"><span class='directive'>#if defined(UPPERCASE_FORTRAN)</span></td></tr>
<tr class="codeline" data-linenumber="88"><td class="num" id="LN88">88</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> F##_</span></td></tr>
<tr class="codeline" data-linenumber="89"><td class="num" id="LN89">89</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="90"><td class="num" id="LN90">90</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span> f##_</span></td></tr>
<tr class="codeline" data-linenumber="91"><td class="num" id="LN91">91</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="92"><td class="num" id="LN92">92</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="93"><td class="num" id="LN93">93</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="94"><td class="num" id="LN94">94</td><td class="line"><span class='directive'>#if defined(UNDERSCORE_G77)</span></td></tr>
<tr class="codeline" data-linenumber="95"><td class="num" id="LN95">95</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC_US(f,F)<span class='macro_popup'>f_</span></span> <span class='macro'>F_FUNC(f##_,F##_)<span class='macro_popup'>f##__</span></span></span></td></tr>
<tr class="codeline" data-linenumber="96"><td class="num" id="LN96">96</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="97"><td class="num" id="LN97">97</td><td class="line"><span class='directive'>#define <span class='macro'>F_FUNC_US(f,F)<span class='macro_popup'>f_</span></span> <span class='macro'>F_FUNC(f,F)<span class='macro_popup'>f_</span></span></span></td></tr>
<tr class="codeline" data-linenumber="98"><td class="num" id="LN98">98</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="99"><td class="num" id="LN99">99</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="100"><td class="num" id="LN100">100</td><td class="line"><span class='directive'>#define <span class='macro'>rank(var)<span class='macro_popup'>var_Rank</span></span> var ## _Rank</span></td></tr>
<tr class="codeline" data-linenumber="101"><td class="num" id="LN101">101</td><td class="line"><span class='directive'>#define <span class='macro'>shape(var,dim)<span class='macro_popup'>var_Dims[dim]</span></span> var ## _Dims[dim]</span></td></tr>
<tr class="codeline" data-linenumber="102"><td class="num" id="LN102">102</td><td class="line"><span class='directive'>#define <span class='macro'>old_rank(var)<span class='macro_popup'>(PyArray_NDIM((PyArrayObject *)(capi_var_tmp)))</span></span> (PyArray_NDIM((PyArrayObject *)(capi_ ## var ## _tmp)))</span></td></tr>
<tr class="codeline" data-linenumber="103"><td class="num" id="LN103">103</td><td class="line"><span class='directive'>#define <span class='macro'>old_shape(var,dim)<span class='macro_popup'>PyArray_DIM(((PyArrayObject *)(capi_var_tmp)),dim)</span></span> PyArray_DIM(((PyArrayObject *)(capi_ ## var ## _tmp)),dim)</span></td></tr>
<tr class="codeline" data-linenumber="104"><td class="num" id="LN104">104</td><td class="line"><span class='directive'>#define <span class='macro'>fshape(var,dim)<span class='macro_popup'>var_Dims[var_Rank-dim-1]</span></span> <span class='macro'>shape(var,rank(var)-dim-1)<span class='macro_popup'>var_Dims[var_Rank-dim-1]</span></span></span></td></tr>
<tr class="codeline" data-linenumber="105"><td class="num" id="LN105">105</td><td class="line"><span class='directive'>#define <span class='macro'>len(var)<span class='macro_popup'>var_Dims[0]</span></span> <span class='macro'>shape(var,0)<span class='macro_popup'>var_Dims[0]</span></span></span></td></tr>
<tr class="codeline" data-linenumber="106"><td class="num" id="LN106">106</td><td class="line"><span class='directive'>#define <span class='macro'>flen(var)<span class='macro_popup'>var_Dims[var_Rank-0 -1]</span></span> <span class='macro'>fshape(var,0)<span class='macro_popup'>var_Dims[var_Rank-0 -1]</span></span></span></td></tr>
<tr class="codeline" data-linenumber="107"><td class="num" id="LN107">107</td><td class="line"><span class='directive'>#define <span class='macro'>old_size(var)<span class='macro_popup'>(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158<br>])(PyArray_DIMS((PyArrayObject *)(capi_var_tmp)), PyArray_NDIM<br>((PyArrayObject *)(capi_var_tmp)))</span></span> <span class='macro'>PyArray_SIZE((PyArrayObject *)(capi_ ## var ## _tmp))<span class='macro_popup'>(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158<br>])(PyArray_DIMS((PyArrayObject *)(capi_ ## var ## _tmp)), PyArray_NDIM<br>((PyArrayObject *)(capi_ ## var ## _tmp)))</span></span></span></td></tr>
<tr class="codeline" data-linenumber="108"><td class="num" id="LN108">108</td><td class="line"><span class='comment'>/* #define index(i) capi_i ## i */</span></td></tr>
<tr class="codeline" data-linenumber="109"><td class="num" id="LN109">109</td><td class="line"><span class='directive'>#define <span class='macro'>slen(var)<span class='macro_popup'>capi_var_len</span></span> capi_ ## var ## _len</span></td></tr>
<tr class="codeline" data-linenumber="110"><td class="num" id="LN110">110</td><td class="line"><span class='directive'>#define <span class='macro'>size(var, ...)<span class='macro_popup'>f2py_size((PyArrayObject *)(capi_var_tmp), ..., -1)</span></span> f2py_size((PyArrayObject *)(capi_ ## var ## _tmp), ## __VA_ARGS__, -1)</span></td></tr>
<tr class="codeline" data-linenumber="111"><td class="num" id="LN111">111</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="112"><td class="num" id="LN112">112</td><td class="line"><span class='directive'>#define <span class='macro'>SWAP(a,b,t)<span class='macro_popup'>{ t *c; c = a; a = b; b = c;}</span></span> {\</span></td></tr>
<tr class="codeline" data-linenumber="113"><td class="num" id="LN113">113</td><td class="line"> <span class='directive'>t *c;\</span></td></tr>
<tr class="codeline" data-linenumber="114"><td class="num" id="LN114">114</td><td class="line"> <span class='directive'>c = a;\</span></td></tr>
<tr class="codeline" data-linenumber="115"><td class="num" id="LN115">115</td><td class="line"> <span class='directive'>a = b;\</span></td></tr>
<tr class="codeline" data-linenumber="116"><td class="num" id="LN116">116</td><td class="line"> <span class='directive'>b = c;}</span></td></tr>
<tr class="codeline" data-linenumber="117"><td class="num" id="LN117">117</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="118"><td class="num" id="LN118">118</td><td class="line"><span class='directive'>#define <span class='macro'>CHECKSCALAR(check,tcheck,name,show,var)<span class='macro_popup'>if (!(check)) { char errstring[256]; __builtin___sprintf_chk (<br>errstring, 2 - 1, __builtin_object_size (errstring, 2 > 1)<br>, "%s: "show, "("tcheck") failed for "name, var); PyErr_SetString<br>(_cobyla_error,errstring); } else</span></span>\</span></td></tr>
<tr class="codeline" data-linenumber="119"><td class="num" id="LN119">119</td><td class="line"> <span class='directive'>if (!(check)) {\</span></td></tr>
<tr class="codeline" data-linenumber="120"><td class="num" id="LN120">120</td><td class="line"> <span class='directive'>char errstring[256];\</span></td></tr>
<tr class="codeline" data-linenumber="121"><td class="num" id="LN121">121</td><td class="line"> <span class='directive'><span class='macro'>sprintf(errstring, "%s: "show, "("tcheck") failed for "name, var)<span class='macro_popup'>__builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size<br> (errstring, 2 > 1), "%s: "show, "("tcheck") failed for "name<br>, var)</span></span>;\</span></td></tr>
<tr class="codeline" data-linenumber="122"><td class="num" id="LN122">122</td><td class="line"> <span class='directive'>PyErr_SetString(_cobyla_error,errstring);\</span></td></tr>
<tr class="codeline" data-linenumber="123"><td class="num" id="LN123">123</td><td class="line"> <span class='directive'>/*goto capi_fail;*/\</span></td></tr>
<tr class="codeline" data-linenumber="124"><td class="num" id="LN124">124</td><td class="line"> <span class='directive'>} else</span> </td></tr>
<tr class="codeline" data-linenumber="125"><td class="num" id="LN125">125</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="126"><td class="num" id="LN126">126</td><td class="line"><span class='comment'>/************************ See f2py2e/cfuncs.py: cfuncs ************************/</span></td></tr>
<tr class="codeline" data-linenumber="127"><td class="num" id="LN127">127</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>int</span> f2py_size(PyArrayObject* var, ...)</td></tr>
<tr class="codeline" data-linenumber="128"><td class="num" id="LN128">128</td><td class="line">{</td></tr>
<tr class="codeline" data-linenumber="129"><td class="num" id="LN129">129</td><td class="line"> npy_int sz = 0;</td></tr>
<tr class="codeline" data-linenumber="130"><td class="num" id="LN130">130</td><td class="line"> npy_int dim;</td></tr>
<tr class="codeline" data-linenumber="131"><td class="num" id="LN131">131</td><td class="line"> npy_int rank;</td></tr>
<tr class="codeline" data-linenumber="132"><td class="num" id="LN132">132</td><td class="line"> va_list argp;</td></tr>
<tr class="codeline" data-linenumber="133"><td class="num" id="LN133">133</td><td class="line"> <span class='macro'>va_start(argp, var)<span class='macro_popup'>__builtin_va_start(argp, var)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="134"><td class="num" id="LN134">134</td><td class="line"> dim = <span class='macro'>va_arg(argp, npy_int)<span class='macro_popup'>__builtin_va_arg(argp, npy_int)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="135"><td class="num" id="LN135">135</td><td class="line"> <span class='keyword'>if</span> (dim==-1)</td></tr>
<tr class="codeline" data-linenumber="136"><td class="num" id="LN136">136</td><td class="line"> {</td></tr>
<tr class="codeline" data-linenumber="137"><td class="num" id="LN137">137</td><td class="line"> sz = <span class='macro'>PyArray_SIZE(var)<span class='macro_popup'>(*(npy_intp (*)(npy_intp const *, int)) _npy_f2py_ARRAY_API[158<br>])(PyArray_DIMS(var), PyArray_NDIM(var))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="138"><td class="num" id="LN138">138</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="139"><td class="num" id="LN139">139</td><td class="line"> <span class='keyword'>else</span></td></tr>
<tr class="codeline" data-linenumber="140"><td class="num" id="LN140">140</td><td class="line"> {</td></tr>
<tr class="codeline" data-linenumber="141"><td class="num" id="LN141">141</td><td class="line"> rank = PyArray_NDIM(var);</td></tr>
<tr class="codeline" data-linenumber="142"><td class="num" id="LN142">142</td><td class="line"> <span class='keyword'>if</span> (dim>=1 && dim<=rank)</td></tr>
<tr class="codeline" data-linenumber="143"><td class="num" id="LN143">143</td><td class="line"> sz = PyArray_DIM(var, dim-1);</td></tr>
<tr class="codeline" data-linenumber="144"><td class="num" id="LN144">144</td><td class="line"> <span class='keyword'>else</span></td></tr>
<tr class="codeline" data-linenumber="145"><td class="num" id="LN145">145</td><td class="line"> <span class='macro'>fprintf(stderr, <span class='string_literal'>"f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n"</span>, dim, rank)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "f2py_size: 2nd argument value=%d fails to satisfy 1<=value<=%d. Result will be 0.\n"<br>, dim, rank)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="146"><td class="num" id="LN146">146</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="147"><td class="num" id="LN147">147</td><td class="line"> <span class='macro'>va_end(argp)<span class='macro_popup'>__builtin_va_end(argp)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="148"><td class="num" id="LN148">148</td><td class="line"> <span class='keyword'>return</span> sz;</td></tr>
<tr class="codeline" data-linenumber="149"><td class="num" id="LN149">149</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="150"><td class="num" id="LN150">150</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="151"><td class="num" id="LN151">151</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>int</span> double_from_pyobj(<span class='keyword'>double</span>* v,PyObject *obj,<span class='keyword'>const</span> <span class='keyword'>char</span> *errmess) {</td></tr>
<tr class="codeline" data-linenumber="152"><td class="num" id="LN152">152</td><td class="line"> PyObject* tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="153"><td class="num" id="LN153">153</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyFloat_Check(obj)<span class='macro_popup'>((((PyObject*)(obj))->ob_type) == (&PyFloat_Type) || PyType_IsSubtype<br>((((PyObject*)(obj))->ob_type), (&PyFloat_Type)))</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="154"><td class="num" id="LN154">154</td><td class="line"><span class='directive'>#ifdef __sgi</span></td></tr>
<tr class="codeline" data-linenumber="155"><td class="num" id="LN155">155</td><td class="line"> *v = PyFloat_AsDouble(obj);</td></tr>
<tr class="codeline" data-linenumber="156"><td class="num" id="LN156">156</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="157"><td class="num" id="LN157">157</td><td class="line"> *v = <span class='macro'>PyFloat_AS_DOUBLE(obj)<span class='macro_popup'>(((PyFloatObject *)(obj))->ob_fval)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="158"><td class="num" id="LN158">158</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="159"><td class="num" id="LN159">159</td><td class="line"> <span class='keyword'>return</span> 1;</td></tr>
<tr class="codeline" data-linenumber="160"><td class="num" id="LN160">160</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="161"><td class="num" id="LN161">161</td><td class="line"> tmp = PyNumber_Float(obj);</td></tr>
<tr class="codeline" data-linenumber="162"><td class="num" id="LN162">162</td><td class="line"> <span class='keyword'>if</span> (tmp) {</td></tr>
<tr class="codeline" data-linenumber="163"><td class="num" id="LN163">163</td><td class="line"><span class='directive'>#ifdef __sgi</span></td></tr>
<tr class="codeline" data-linenumber="164"><td class="num" id="LN164">164</td><td class="line"> *v = PyFloat_AsDouble(tmp);</td></tr>
<tr class="codeline" data-linenumber="165"><td class="num" id="LN165">165</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="166"><td class="num" id="LN166">166</td><td class="line"> *v = <span class='macro'>PyFloat_AS_DOUBLE(tmp)<span class='macro_popup'>(((PyFloatObject *)(tmp))->ob_fval)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="167"><td class="num" id="LN167">167</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="168"><td class="num" id="LN168">168</td><td class="line"> <span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="169"><td class="num" id="LN169">169</td><td class="line"> <span class='keyword'>return</span> 1;</td></tr>
<tr class="codeline" data-linenumber="170"><td class="num" id="LN170">170</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="171"><td class="num" id="LN171">171</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyComplex_Check(obj)<span class='macro_popup'>((((PyObject*)(obj))->ob_type) == (&PyComplex_Type) ||<br> PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyComplex_Type<br>)))</span></span>)</td></tr>
<tr class="codeline" data-linenumber="172"><td class="num" id="LN172">172</td><td class="line"> tmp = PyObject_GetAttrString(obj,<span class='string_literal'>"real"</span>);</td></tr>
<tr class="codeline" data-linenumber="173"><td class="num" id="LN173">173</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (<span class='macro'>PyString_Check(obj)<span class='macro_popup'>((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL<br> << 27))) != 0)</span></span> || <span class='macro'>PyUnicode_Check(obj)<span class='macro_popup'>((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL<br> << 28))) != 0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="174"><td class="num" id="LN174">174</td><td class="line"> <span class='comment'>/*pass*/</span>;</td></tr>
<tr class="codeline" data-linenumber="175"><td class="num" id="LN175">175</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (PySequence_Check(obj))</td></tr>
<tr class="codeline" data-linenumber="176"><td class="num" id="LN176">176</td><td class="line"> tmp = PySequence_GetItem(obj,0);</td></tr>
<tr class="codeline" data-linenumber="177"><td class="num" id="LN177">177</td><td class="line"> <span class='keyword'>if</span> (tmp) {</td></tr>
<tr class="codeline" data-linenumber="178"><td class="num" id="LN178">178</td><td class="line"> PyErr_Clear();</td></tr>
<tr class="codeline" data-linenumber="179"><td class="num" id="LN179">179</td><td class="line"> <span class='keyword'>if</span> (double_from_pyobj(v,tmp,errmess)) {<span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>; <span class='keyword'>return</span> 1;}</td></tr>
<tr class="codeline" data-linenumber="180"><td class="num" id="LN180">180</td><td class="line"> <span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="181"><td class="num" id="LN181">181</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="182"><td class="num" id="LN182">182</td><td class="line"> {</td></tr>
<tr class="codeline" data-linenumber="183"><td class="num" id="LN183">183</td><td class="line"> PyObject* err = PyErr_Occurred();</td></tr>
<tr class="codeline" data-linenumber="184"><td class="num" id="LN184">184</td><td class="line"> <span class='keyword'>if</span> (err==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) err = _cobyla_error;</td></tr>
<tr class="codeline" data-linenumber="185"><td class="num" id="LN185">185</td><td class="line"> PyErr_SetString(err,errmess);</td></tr>
<tr class="codeline" data-linenumber="186"><td class="num" id="LN186">186</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="187"><td class="num" id="LN187">187</td><td class="line"> <span class='keyword'>return</span> 0;</td></tr>
<tr class="codeline" data-linenumber="188"><td class="num" id="LN188">188</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="189"><td class="num" id="LN189">189</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="190"><td class="num" id="LN190">190</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>int</span> create_cb_arglist(PyObject* fun,PyTupleObject* xa,<span class='keyword'>const</span> <span class='keyword'>int</span> maxnofargs,<span class='keyword'>const</span> <span class='keyword'>int</span> nofoptargs,<span class='keyword'>int</span> *nofargs,PyTupleObject **args,<span class='keyword'>const</span> <span class='keyword'>char</span> *errmess) {</td></tr>
<tr class="codeline" data-linenumber="191"><td class="num" id="LN191">191</td><td class="line"> PyObject *tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="192"><td class="num" id="LN192">192</td><td class="line"> PyObject *tmp_fun = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="193"><td class="num" id="LN193">193</td><td class="line"> <span class='keyword'>int</span> tot,opt,ext,siz,i,di=0;</td></tr>
<tr class="codeline" data-linenumber="194"><td class="num" id="LN194">194</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"create_cb_arglist\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="195"><td class="num" id="LN195">195</td><td class="line"> tot=opt=ext=siz=0;</td></tr>
<tr class="codeline" data-linenumber="196"><td class="num" id="LN196">196</td><td class="line"> <span class='comment'>/* Get the total number of arguments */</span></td></tr>
<tr class="codeline" data-linenumber="197"><td class="num" id="LN197">197</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyFunction_Check(fun)<span class='macro_popup'>((((PyObject*)(fun))->ob_type) == &PyFunction_Type)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="198"><td class="num" id="LN198">198</td><td class="line"> tmp_fun = fun;</td></tr>
<tr class="codeline" data-linenumber="199"><td class="num" id="LN199">199</td><td class="line"> <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="200"><td class="num" id="LN200">200</td><td class="line"> di = 1;</td></tr>
<tr class="codeline" data-linenumber="201"><td class="num" id="LN201">201</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(fun,<span class='string_literal'>"im_func"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="202"><td class="num" id="LN202">202</td><td class="line"> tmp_fun = PyObject_GetAttrString(fun,<span class='string_literal'>"im_func"</span>);</td></tr>
<tr class="codeline" data-linenumber="203"><td class="num" id="LN203">203</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="204"><td class="num" id="LN204">204</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (PyObject_HasAttrString(fun,<span class='string_literal'>"__call__"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="205"><td class="num" id="LN205">205</td><td class="line"> tmp = PyObject_GetAttrString(fun,<span class='string_literal'>"__call__"</span>);</td></tr>
<tr class="codeline" data-linenumber="206"><td class="num" id="LN206">206</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp,<span class='string_literal'>"im_func"</span>))</td></tr>
<tr class="codeline" data-linenumber="207"><td class="num" id="LN207">207</td><td class="line"> tmp_fun = PyObject_GetAttrString(tmp,<span class='string_literal'>"im_func"</span>);</td></tr>
<tr class="codeline" data-linenumber="208"><td class="num" id="LN208">208</td><td class="line"> <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="209"><td class="num" id="LN209">209</td><td class="line"> tmp_fun = fun; <span class='comment'>/* built-in function */</span></td></tr>
<tr class="codeline" data-linenumber="210"><td class="num" id="LN210">210</td><td class="line"> tot = maxnofargs;</td></tr>
<tr class="codeline" data-linenumber="211"><td class="num" id="LN211">211</td><td class="line"> <span class='keyword'>if</span> (xa != <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="212"><td class="num" id="LN212">212</td><td class="line"> tot += PyTuple_Size((PyObject *)xa);</td></tr>
<tr class="codeline" data-linenumber="213"><td class="num" id="LN213">213</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="214"><td class="num" id="LN214">214</td><td class="line"> <span class='macro'>Py_XDECREF(tmp)<span class='macro_popup'>_Py_XDECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="215"><td class="num" id="LN215">215</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="216"><td class="num" id="LN216">216</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (<span class='macro'>PyFortran_Check(fun)<span class='macro_popup'>((((PyObject*)(fun))->ob_type) == &PyFortran_Type)</span></span> || <span class='macro'>PyFortran_Check1(fun)<span class='macro_popup'>(0==strcmp((((PyObject*)(fun))->ob_type)->tp_name,"fortran"<br>))</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="217"><td class="num" id="LN217">217</td><td class="line"> tot = maxnofargs;</td></tr>
<tr class="codeline" data-linenumber="218"><td class="num" id="LN218">218</td><td class="line"> <span class='keyword'>if</span> (xa != <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="219"><td class="num" id="LN219">219</td><td class="line"> tot += PyTuple_Size((PyObject *)xa);</td></tr>
<tr class="codeline" data-linenumber="220"><td class="num" id="LN220">220</td><td class="line"> tmp_fun = fun;</td></tr>
<tr class="codeline" data-linenumber="221"><td class="num" id="LN221">221</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="222"><td class="num" id="LN222">222</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (F2PyCapsule_Check(fun)) {</td></tr>
<tr class="codeline" data-linenumber="223"><td class="num" id="LN223">223</td><td class="line"> tot = maxnofargs;</td></tr>
<tr class="codeline" data-linenumber="224"><td class="num" id="LN224">224</td><td class="line"> <span class='keyword'>if</span> (xa != <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="225"><td class="num" id="LN225">225</td><td class="line"> ext = PyTuple_Size((PyObject *)xa);</td></tr>
<tr class="codeline" data-linenumber="226"><td class="num" id="LN226">226</td><td class="line"> <span class='keyword'>if</span>(ext>0) {</td></tr>
<tr class="codeline" data-linenumber="227"><td class="num" id="LN227">227</td><td class="line"> <span class='macro'>fprintf(stderr,<span class='string_literal'>"extra arguments tuple cannot be used with CObject call-back\n"</span>)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "extra arguments tuple cannot be used with CObject call-back\n"<br>)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="228"><td class="num" id="LN228">228</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="229"><td class="num" id="LN229">229</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="230"><td class="num" id="LN230">230</td><td class="line"> tmp_fun = fun;</td></tr>
<tr class="codeline" data-linenumber="231"><td class="num" id="LN231">231</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="232"><td class="num" id="LN232">232</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="233"><td class="num" id="LN233">233</td><td class="line"><span class='keyword'>if</span> (tmp_fun==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="234"><td class="num" id="LN234">234</td><td class="line"><span class='macro'>fprintf(stderr,<span class='string_literal'>"Call-back argument must be function|instance|instance.__call__|f2py-function but got %s.\n"</span>,(fun==NULL?<span class='string_literal'>"NULL"</span>:Py_TYPE(fun)->tp_name))<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "Call-back argument must be function|instance|instance.__call__|f2py-function but got %s.\n"<br>,(fun==((void*)0)?"NULL":(((PyObject*)(fun))->ob_type)-><br>tp_name))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="235"><td class="num" id="LN235">235</td><td class="line"><span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="236"><td class="num" id="LN236">236</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="237"><td class="num" id="LN237">237</td><td class="line"><span class='directive'>#if <span class='macro'>PY_VERSION_HEX<span class='macro_popup'>((3 << 24) | (8 << 16) | (5 << 8) | (0xF <<<br> 4) | (0 << 0))</span></span> >= 0x03000000</span></td></tr>
<tr class="codeline" data-linenumber="238"><td class="num" id="LN238">238</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp_fun,<span class='string_literal'>"__code__"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="239"><td class="num" id="LN239">239</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp = PyObject_GetAttrString(tmp_fun,<span class='string_literal'>"__code__"</span>),<span class='string_literal'>"co_argcount"</span>))</td></tr>
<tr class="codeline" data-linenumber="240"><td class="num" id="LN240">240</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="241"><td class="num" id="LN241">241</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp_fun,<span class='string_literal'>"func_code"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="242"><td class="num" id="LN242">242</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp = PyObject_GetAttrString(tmp_fun,<span class='string_literal'>"func_code"</span>),<span class='string_literal'>"co_argcount"</span>))</td></tr>
<tr class="codeline" data-linenumber="243"><td class="num" id="LN243">243</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="244"><td class="num" id="LN244">244</td><td class="line"> tot = <span class='macro'>PyInt_AsLong<span class='macro_popup'>PyLong_AsLong</span></span>(PyObject_GetAttrString(tmp,<span class='string_literal'>"co_argcount"</span>)) - di;</td></tr>
<tr class="codeline" data-linenumber="245"><td class="num" id="LN245">245</td><td class="line"> <span class='macro'>Py_XDECREF(tmp)<span class='macro_popup'>_Py_XDECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="246"><td class="num" id="LN246">246</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="247"><td class="num" id="LN247">247</td><td class="line"> <span class='comment'>/* Get the number of optional arguments */</span></td></tr>
<tr class="codeline" data-linenumber="248"><td class="num" id="LN248">248</td><td class="line"><span class='directive'>#if <span class='macro'>PY_VERSION_HEX<span class='macro_popup'>((3 << 24) | (8 << 16) | (5 << 8) | (0xF <<<br> 4) | (0 << 0))</span></span> >= 0x03000000</span></td></tr>
<tr class="codeline" data-linenumber="249"><td class="num" id="LN249">249</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp_fun,<span class='string_literal'>"__defaults__"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="250"><td class="num" id="LN250">250</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyTuple_Check(tmp = PyObject_GetAttrString(tmp_fun,<span class='string_literal'>"__defaults__"</span>))<span class='macro_popup'>((((((PyObject*)(tmp = PyObject_GetAttrString(tmp_fun,"__defaults__"<br>)))->ob_type))->tp_flags & ((1UL << 26))) != 0<br>)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="251"><td class="num" id="LN251">251</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="252"><td class="num" id="LN252">252</td><td class="line"> <span class='keyword'>if</span> (PyObject_HasAttrString(tmp_fun,<span class='string_literal'>"func_defaults"</span>)) {</td></tr>
<tr class="codeline" data-linenumber="253"><td class="num" id="LN253">253</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyTuple_Check(tmp = PyObject_GetAttrString(tmp_fun,<span class='string_literal'>"func_defaults"</span>))<span class='macro_popup'>((((((PyObject*)(tmp = PyObject_GetAttrString(tmp_fun,"func_defaults"<br>)))->ob_type))->tp_flags & ((1UL << 26))) != 0<br>)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="254"><td class="num" id="LN254">254</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="255"><td class="num" id="LN255">255</td><td class="line"> opt = PyTuple_Size(tmp);</td></tr>
<tr class="codeline" data-linenumber="256"><td class="num" id="LN256">256</td><td class="line"> <span class='macro'>Py_XDECREF(tmp)<span class='macro_popup'>_Py_XDECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="257"><td class="num" id="LN257">257</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="258"><td class="num" id="LN258">258</td><td class="line"> <span class='comment'>/* Get the number of extra arguments */</span></td></tr>
<tr class="codeline" data-linenumber="259"><td class="num" id="LN259">259</td><td class="line"> <span class='keyword'>if</span> (xa != <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="260"><td class="num" id="LN260">260</td><td class="line"> ext = PyTuple_Size((PyObject *)xa);</td></tr>
<tr class="codeline" data-linenumber="261"><td class="num" id="LN261">261</td><td class="line"> <span class='comment'>/* Calculate the size of call-backs argument list */</span></td></tr>
<tr class="codeline" data-linenumber="262"><td class="num" id="LN262">262</td><td class="line"> siz = <span class='macro'>MIN(maxnofargs+ext,tot)<span class='macro_popup'>((maxnofargs+ext < tot) ? (maxnofargs+ext) : (tot))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="263"><td class="num" id="LN263">263</td><td class="line"> *nofargs = <span class='macro'>MAX(0,siz-ext)<span class='macro_popup'>((0 > siz-ext) ? (0) : (siz-ext))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="264"><td class="num" id="LN264">264</td><td class="line"><span class='directive'>#ifdef DEBUGCFUNCS</span></td></tr>
<tr class="codeline" data-linenumber="265"><td class="num" id="LN265">265</td><td class="line"> <span class='macro'>fprintf(stderr,<span class='string_literal'>"debug-capi:create_cb_arglist:maxnofargs(-nofoptargs),tot,opt,ext,siz,nofargs=%d(-%d),%d,%d,%d,%d,%d\n"</span>,maxnofargs,nofoptargs,tot,opt,ext,siz,*nofargs)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "debug-capi:create_cb_arglist:maxnofargs(-nofoptargs),tot,opt,ext,siz,nofargs=%d(-%d),%d,%d,%d,%d,%d\n"<br>,maxnofargs,nofoptargs,tot,opt,ext,siz,*nofargs)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="266"><td class="num" id="LN266">266</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="267"><td class="num" id="LN267">267</td><td class="line"> <span class='keyword'>if</span> (siz<tot-opt) {</td></tr>
<tr class="codeline" data-linenumber="268"><td class="num" id="LN268">268</td><td class="line"> <span class='macro'>fprintf(stderr,<span class='string_literal'>"create_cb_arglist: Failed to build argument list (siz) with enough arguments (tot-opt) required by user-supplied function (siz,tot,opt=%d,%d,%d).\n"</span>,siz,tot,opt)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "create_cb_arglist: Failed to build argument list (siz) with enough arguments (tot-opt) required by user-supplied function (siz,tot,opt=%d,%d,%d).\n"<br>,siz,tot,opt)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="269"><td class="num" id="LN269">269</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="270"><td class="num" id="LN270">270</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="271"><td class="num" id="LN271">271</td><td class="line"> <span class='comment'>/* Initialize argument list */</span></td></tr>
<tr class="codeline" data-linenumber="272"><td class="num" id="LN272">272</td><td class="line"> *args = (PyTupleObject *)PyTuple_New(siz);</td></tr>
<tr class="codeline" data-linenumber="273"><td class="num" id="LN273">273</td><td class="line"> <span class='keyword'>for</span> (i=0;i<*nofargs;i++) {</td></tr>
<tr class="codeline" data-linenumber="274"><td class="num" id="LN274">274</td><td class="line"> <span class='macro'>Py_INCREF(Py_None)<span class='macro_popup'>_Py_INCREF(((PyObject*)((&_Py_NoneStruct))))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="275"><td class="num" id="LN275">275</td><td class="line"> <span class='macro'>PyTuple_SET_ITEM((PyObject *)(*args),i,Py_None)<span class='macro_popup'>PyTuple_SetItem((PyObject *)(*args), i, (&_Py_NoneStruct)<br>)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="276"><td class="num" id="LN276">276</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="277"><td class="num" id="LN277">277</td><td class="line"> <span class='keyword'>if</span> (xa != <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="278"><td class="num" id="LN278">278</td><td class="line"> <span class='keyword'>for</span> (i=(*nofargs);i<siz;i++) {</td></tr>
<tr class="codeline" data-linenumber="279"><td class="num" id="LN279">279</td><td class="line"> tmp = PyTuple_GetItem((PyObject *)xa,i-(*nofargs));</td></tr>
<tr class="codeline" data-linenumber="280"><td class="num" id="LN280">280</td><td class="line"> <span class='macro'>Py_INCREF(tmp)<span class='macro_popup'>_Py_INCREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="281"><td class="num" id="LN281">281</td><td class="line"> <span class='macro'>PyTuple_SET_ITEM(*args,i,tmp)<span class='macro_popup'>PyTuple_SetItem(*args, i, tmp)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="282"><td class="num" id="LN282">282</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="283"><td class="num" id="LN283">283</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"create_cb_arglist-end\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="284"><td class="num" id="LN284">284</td><td class="line"> <span class='keyword'>return</span> 1;</td></tr>
<tr class="codeline" data-linenumber="285"><td class="num" id="LN285">285</td><td class="line">capi_fail:</td></tr>
<tr class="codeline" data-linenumber="286"><td class="num" id="LN286">286</td><td class="line"> <span class='keyword'>if</span> ((PyErr_Occurred())==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="287"><td class="num" id="LN287">287</td><td class="line"> PyErr_SetString(_cobyla_error,errmess);</td></tr>
<tr class="codeline" data-linenumber="288"><td class="num" id="LN288">288</td><td class="line"> <span class='keyword'>return</span> 0;</td></tr>
<tr class="codeline" data-linenumber="289"><td class="num" id="LN289">289</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="290"><td class="num" id="LN290">290</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="291"><td class="num" id="LN291">291</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>int</span> int_from_pyobj(<span class='keyword'>int</span>* v,PyObject *obj,<span class='keyword'>const</span> <span class='keyword'>char</span> *errmess) {</td></tr>
<tr class="codeline" data-linenumber="292"><td class="num" id="LN292">292</td><td class="line"> PyObject* tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="293"><td class="num" id="LN293">293</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyInt_Check(obj)<span class='macro_popup'>((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL<br> << 24))) != 0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="294"><td class="num" id="LN294">294</td><td class="line"> *v = (<span class='keyword'>int</span>)<span class='macro'>PyInt_AS_LONG<span class='macro_popup'>PyLong_AsLong</span></span>(obj);</td></tr>
<tr class="codeline" data-linenumber="295"><td class="num" id="LN295">295</td><td class="line"> <span class='keyword'>return</span> 1;</td></tr>
<tr class="codeline" data-linenumber="296"><td class="num" id="LN296">296</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="297"><td class="num" id="LN297">297</td><td class="line"> tmp = <span class='macro'>PyNumber_Int<span class='macro_popup'>PyNumber_Long</span></span>(obj);</td></tr>
<tr class="codeline" data-linenumber="298"><td class="num" id="LN298">298</td><td class="line"> <span class='keyword'>if</span> (tmp) {</td></tr>
<tr class="codeline" data-linenumber="299"><td class="num" id="LN299">299</td><td class="line"> *v = <span class='macro'>PyInt_AS_LONG<span class='macro_popup'>PyLong_AsLong</span></span>(tmp);</td></tr>
<tr class="codeline" data-linenumber="300"><td class="num" id="LN300">300</td><td class="line"> <span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="301"><td class="num" id="LN301">301</td><td class="line"> <span class='keyword'>return</span> 1;</td></tr>
<tr class="codeline" data-linenumber="302"><td class="num" id="LN302">302</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="303"><td class="num" id="LN303">303</td><td class="line"> <span class='keyword'>if</span> (<span class='macro'>PyComplex_Check(obj)<span class='macro_popup'>((((PyObject*)(obj))->ob_type) == (&PyComplex_Type) ||<br> PyType_IsSubtype((((PyObject*)(obj))->ob_type), (&PyComplex_Type<br>)))</span></span>)</td></tr>
<tr class="codeline" data-linenumber="304"><td class="num" id="LN304">304</td><td class="line"> tmp = PyObject_GetAttrString(obj,<span class='string_literal'>"real"</span>);</td></tr>
<tr class="codeline" data-linenumber="305"><td class="num" id="LN305">305</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (<span class='macro'>PyString_Check(obj)<span class='macro_popup'>((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL<br> << 27))) != 0)</span></span> || <span class='macro'>PyUnicode_Check(obj)<span class='macro_popup'>((((((PyObject*)(obj))->ob_type))->tp_flags & ((1UL<br> << 28))) != 0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="306"><td class="num" id="LN306">306</td><td class="line"> <span class='comment'>/*pass*/</span>;</td></tr>
<tr class="codeline" data-linenumber="307"><td class="num" id="LN307">307</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (PySequence_Check(obj))</td></tr>
<tr class="codeline" data-linenumber="308"><td class="num" id="LN308">308</td><td class="line"> tmp = PySequence_GetItem(obj,0);</td></tr>
<tr class="codeline" data-linenumber="309"><td class="num" id="LN309">309</td><td class="line"> <span class='keyword'>if</span> (tmp) {</td></tr>
<tr class="codeline" data-linenumber="310"><td class="num" id="LN310">310</td><td class="line"> PyErr_Clear();</td></tr>
<tr class="codeline" data-linenumber="311"><td class="num" id="LN311">311</td><td class="line"> <span class='keyword'>if</span> (int_from_pyobj(v,tmp,errmess)) {<span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>; <span class='keyword'>return</span> 1;}</td></tr>
<tr class="codeline" data-linenumber="312"><td class="num" id="LN312">312</td><td class="line"> <span class='macro'>Py_DECREF(tmp)<span class='macro_popup'>_Py_DECREF(((PyObject*)(tmp)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="313"><td class="num" id="LN313">313</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="314"><td class="num" id="LN314">314</td><td class="line"> {</td></tr>
<tr class="codeline" data-linenumber="315"><td class="num" id="LN315">315</td><td class="line"> PyObject* err = PyErr_Occurred();</td></tr>
<tr class="codeline" data-linenumber="316"><td class="num" id="LN316">316</td><td class="line"> <span class='keyword'>if</span> (err==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) err = _cobyla_error;</td></tr>
<tr class="codeline" data-linenumber="317"><td class="num" id="LN317">317</td><td class="line"> PyErr_SetString(err,errmess);</td></tr>
<tr class="codeline" data-linenumber="318"><td class="num" id="LN318">318</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="319"><td class="num" id="LN319">319</td><td class="line"> <span class='keyword'>return</span> 0;</td></tr>
<tr class="codeline" data-linenumber="320"><td class="num" id="LN320">320</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="321"><td class="num" id="LN321">321</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="322"><td class="num" id="LN322">322</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="323"><td class="num" id="LN323">323</td><td class="line"><span class='comment'>/********************* See f2py2e/cfuncs.py: userincludes *********************/</span></td></tr>
<tr class="codeline" data-linenumber="324"><td class="num" id="LN324">324</td><td class="line"><span class='comment'>/*need_userincludes*/</span></td></tr>
<tr class="codeline" data-linenumber="325"><td class="num" id="LN325">325</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="326"><td class="num" id="LN326">326</td><td class="line"><span class='comment'>/********************* See f2py2e/capi_rules.py: usercode *********************/</span></td></tr>
<tr class="codeline" data-linenumber="327"><td class="num" id="LN327">327</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="328"><td class="num" id="LN328">328</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="329"><td class="num" id="LN329">329</td><td class="line"><span class='comment'>/* See f2py2e/rules.py */</span></td></tr>
<tr class="codeline" data-linenumber="330"><td class="num" id="LN330">330</td><td class="line"><span class='keyword'>extern</span> <span class='keyword'>void</span> <span class='macro'>F_FUNC(cobyla ,COBYLA )<span class='macro_popup'>cobyla_</span></span>(cb_calcfc_in__cobyla__user__routines_typedef,<span class='keyword'>int</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*,<span class='keyword'>double</span>*,<span class='keyword'>double</span>*,<span class='keyword'>int</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*);</td></tr>
<tr class="codeline" data-linenumber="331"><td class="num" id="LN331">331</td><td class="line"><span class='comment'>/*eof externroutines*/</span></td></tr>
<tr class="codeline" data-linenumber="332"><td class="num" id="LN332">332</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="333"><td class="num" id="LN333">333</td><td class="line"><span class='comment'>/******************** See f2py2e/capi_rules.py: usercode1 ********************/</span></td></tr>
<tr class="codeline" data-linenumber="334"><td class="num" id="LN334">334</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="335"><td class="num" id="LN335">335</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="336"><td class="num" id="LN336">336</td><td class="line"><span class='comment'>/******************* See f2py2e/cb_rules.py: buildcallback *******************/</span></td></tr>
<tr class="codeline" data-linenumber="337"><td class="num" id="LN337">337</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="338"><td class="num" id="LN338">338</td><td class="line"><span class='comment'>/******************** cb_calcfc_in__cobyla__user__routines ********************/</span></td></tr>
<tr class="codeline" data-linenumber="339"><td class="num" id="LN339">339</td><td class="line">PyObject *cb_calcfc_in__cobyla__user__routines_capi = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;<span class='comment'>/*was Py_None*/</span></td></tr>
<tr class="codeline" data-linenumber="340"><td class="num" id="LN340">340</td><td class="line">PyTupleObject *cb_calcfc_in__cobyla__user__routines_args_capi = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="341"><td class="num" id="LN341">341</td><td class="line"><span class='keyword'>int</span> cb_calcfc_in__cobyla__user__routines_nofargs = 0;</td></tr>
<tr class="codeline" data-linenumber="342"><td class="num" id="LN342">342</td><td class="line">jmp_buf cb_calcfc_in__cobyla__user__routines_jmpbuf;</td></tr>
<tr class="codeline" data-linenumber="343"><td class="num" id="LN343">343</td><td class="line"><span class='comment'>/*typedef void(*cb_calcfc_in__cobyla__user__routines_typedef)(int *,int *,double *,double *,double *);*/</span></td></tr>
<tr class="codeline" data-linenumber="344"><td class="num" id="LN344">344</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>void</span> cb_calcfc_in__cobyla__user__routines (<span class='keyword'>int</span> *n_cb_capi,<span class='keyword'>int</span> *m_cb_capi,<span class='keyword'>double</span> *x,<span class='keyword'>double</span> *f_cb_capi,<span class='keyword'>double</span> *con) {</td></tr>
<tr class="codeline" data-linenumber="345"><td class="num" id="LN345">345</td><td class="line"> PyTupleObject *capi_arglist = cb_calcfc_in__cobyla__user__routines_args_capi;</td></tr>
<tr class="codeline" data-linenumber="346"><td class="num" id="LN346">346</td><td class="line"> PyObject *capi_return = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="347"><td class="num" id="LN347">347</td><td class="line"> PyObject *capi_tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="348"><td class="num" id="LN348">348</td><td class="line"> PyObject *capi_arglist_list = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="349"><td class="num" id="LN349">349</td><td class="line"> <span class='keyword'>int</span> capi_j,capi_i = 0;</td></tr>
<tr class="codeline" data-linenumber="350"><td class="num" id="LN350">350</td><td class="line"> <span class='keyword'>int</span> capi_longjmp_ok = 1;</td></tr>
<tr class="codeline" data-linenumber="351"><td class="num" id="LN351">351</td><td class="line"><span class='comment'>/*decl*/</span></td></tr>
<tr class="codeline" data-linenumber="352"><td class="num" id="LN352">352</td><td class="line"> <span class='keyword'>int</span> n=(*n_cb_capi);</td></tr>
<tr class="codeline" data-linenumber="353"><td class="num" id="LN353">353</td><td class="line"> <span class='keyword'>int</span> m=(*m_cb_capi);</td></tr>
<tr class="codeline" data-linenumber="354"><td class="num" id="LN354">354</td><td class="line"> <span class='keyword'>double</span> f=(*f_cb_capi);</td></tr>
<tr class="codeline" data-linenumber="355"><td class="num" id="LN355">355</td><td class="line"> npy_intp x_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="356"><td class="num" id="LN356">356</td><td class="line"> npy_intp con_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="357"><td class="num" id="LN357">357</td><td class="line"><span class='directive'>#ifdef F2PY_REPORT_ATEXIT</span></td></tr>
<tr class="codeline" data-linenumber="358"><td class="num" id="LN358">358</td><td class="line">f2py_cb_start_clock();</td></tr>
<tr class="codeline" data-linenumber="359"><td class="num" id="LN359">359</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="360"><td class="num" id="LN360">360</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"cb:Call-back function cb_calcfc_in__cobyla__user__routines (maxnofargs=2(-0))\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="361"><td class="num" id="LN361">361</td><td class="line"> CFUNCSMESSPY(<span class='string_literal'>"cb:cb_calcfc_in__cobyla__user__routines_capi="</span>,cb_calcfc_in__cobyla__user__routines_capi);</td></tr>
<tr class="codeline" data-linenumber="362"><td class="num" id="LN362">362</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">cb_calcfc_in__cobyla__user__routines_capi==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span></span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path1" class="msg msgEvent" style="margin-left:7ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">1</div></td><td>Assuming 'cb_calcfc_in__cobyla__user__routines_capi' is not equal to NULL</td><td><div class="PathNav"><a href="#Path2" title="Next event (2)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path2" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">2</div></td><td><div class="PathNav"><a href="#Path1" title="Previous event (1)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path3" title="Next event (3)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="363"><td class="num" id="LN363">363</td><td class="line"> capi_longjmp_ok = 0;</td></tr>
<tr class="codeline" data-linenumber="364"><td class="num" id="LN364">364</td><td class="line"> cb_calcfc_in__cobyla__user__routines_capi = PyObject_GetAttrString(_cobyla_module,<span class='string_literal'>"calcfc"</span>);</td></tr>
<tr class="codeline" data-linenumber="365"><td class="num" id="LN365">365</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="366"><td class="num" id="LN366">366</td><td class="line"> <span class='keyword'>if</span> (<span class='variable'><span class='variable'>cb_calcfc_in__cobyla__user__routines_capi<table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>2.1</div></td><td>'cb_calcfc_in__cobyla__user__routines_capi' is not equal to NULL</td></tr></tbody></table></span><table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>2.1</div></td><td>'cb_calcfc_in__cobyla__user__routines_capi' is not equal to NULL</td></tr></tbody></table></span>==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path3" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">3</div></td><td><div class="PathNav"><a href="#Path2" title="Previous event (2)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path4" title="Next event (4)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="367"><td class="num" id="LN367">367</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"cb: Callback calcfc not defined (as an argument or module _cobyla attribute).\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="368"><td class="num" id="LN368">368</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="369"><td class="num" id="LN369">369</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="370"><td class="num" id="LN370">370</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">F2PyCapsule_Check(cb_calcfc_in__cobyla__user__routines_capi)</span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path4" class="msg msgEvent" style="margin-left:7ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">4</div></td><td><div class="PathNav"><a href="#Path3" title="Previous event (3)">←</a></div></td><td>Assuming the condition is false</td><td><div class="PathNav"><a href="#Path5" title="Next event (5)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path5" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">5</div></td><td><div class="PathNav"><a href="#Path4" title="Previous event (4)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path6" title="Next event (6)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="371"><td class="num" id="LN371">371</td><td class="line"> cb_calcfc_in__cobyla__user__routines_typedef cb_calcfc_in__cobyla__user__routines_cptr;</td></tr>
<tr class="codeline" data-linenumber="372"><td class="num" id="LN372">372</td><td class="line"> cb_calcfc_in__cobyla__user__routines_cptr = F2PyCapsule_AsVoidPtr(cb_calcfc_in__cobyla__user__routines_capi);</td></tr>
<tr class="codeline" data-linenumber="373"><td class="num" id="LN373">373</td><td class="line"> (*cb_calcfc_in__cobyla__user__routines_cptr)(n_cb_capi,m_cb_capi,x,f_cb_capi,con);</td></tr>
<tr class="codeline" data-linenumber="374"><td class="num" id="LN374">374</td><td class="line"> <span class='keyword'>return</span>;</td></tr>
<tr class="codeline" data-linenumber="375"><td class="num" id="LN375">375</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="376"><td class="num" id="LN376">376</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">capi_arglist==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span></span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path6" class="msg msgEvent" style="margin-left:7ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">6</div></td><td><div class="PathNav"><a href="#Path5" title="Previous event (5)">←</a></div></td><td>Assuming 'capi_arglist' is equal to NULL</td><td><div class="PathNav"><a href="#Path7" title="Next event (7)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path7" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">7</div></td><td><div class="PathNav"><a href="#Path6" title="Previous event (6)">←</a></div></td><td>Taking true branch</td><td><div class="PathNav"><a href="#Path8" title="Next event (8)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="377"><td class="num" id="LN377">377</td><td class="line"> capi_longjmp_ok = 0;</td></tr>
<tr class="codeline" data-linenumber="378"><td class="num" id="LN378">378</td><td class="line"> capi_tmp = PyObject_GetAttrString(_cobyla_module,<span class='string_literal'>"calcfc_extra_args"</span>);</td></tr>
<tr class="codeline" data-linenumber="379"><td class="num" id="LN379">379</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">capi_tmp</span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path8" class="msg msgEvent" style="margin-left:9ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">8</div></td><td><div class="PathNav"><a href="#Path7" title="Previous event (7)">←</a></div></td><td>Assuming 'capi_tmp' is non-null</td><td><div class="PathNav"><a href="#Path9" title="Next event (9)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path9" class="msg msgControl" style="margin-left:5ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">9</div></td><td><div class="PathNav"><a href="#Path8" title="Previous event (8)">←</a></div></td><td>Taking true branch</td><td><div class="PathNav"><a href="#Path10" title="Next event (10)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="380"><td class="num" id="LN380">380</td><td class="line"> capi_arglist = (PyTupleObject *)<span class="mrange"><span class="mrange">PySequence_Tuple(capi_tmp)</span></span>;</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path10" class="msg msgEvent" style="margin-left:39ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">10</div></td><td><div class="PathNav"><a href="#Path9" title="Previous event (9)">←</a></div></td><td>Calling 'PySequence_Tuple'</td><td><div class="PathNav"><a href="#Path11" title="Next event (11)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path12" class="msg msgEvent" style="margin-left:39ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">12</div></td><td><div class="PathNav"><a href="#Path11" title="Previous event (11)">←</a></div></td><td>Returning from 'PySequence_Tuple'</td><td><div class="PathNav"><a href="#Path13" title="Next event (13)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="EndPath" class="msg msgEvent" style="margin-left:39ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">19</div></td><td><div class="PathNav"><a href="#Path18" title="Previous event (18)">←</a></div></td><td>PyObject ownership leak with reference count of 1</td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="381"><td class="num" id="LN381">381</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">capi_arglist==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span></span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path13" class="msg msgEvent" style="margin-left:11ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">13</div></td><td><div class="PathNav"><a href="#Path12" title="Previous event (12)">←</a></div></td><td>Assuming 'capi_arglist' is not equal to NULL</td><td><div class="PathNav"><a href="#Path14" title="Next event (14)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path14" class="msg msgControl" style="margin-left:7ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">14</div></td><td><div class="PathNav"><a href="#Path13" title="Previous event (13)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path15" title="Next event (15)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="382"><td class="num" id="LN382">382</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"Failed to convert _cobyla.calcfc_extra_args to tuple.\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="383"><td class="num" id="LN383">383</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="384"><td class="num" id="LN384">384</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="385"><td class="num" id="LN385">385</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="386"><td class="num" id="LN386">386</td><td class="line"> PyErr_Clear();</td></tr>
<tr class="codeline" data-linenumber="387"><td class="num" id="LN387">387</td><td class="line"> capi_arglist = (PyTupleObject *)Py_BuildValue(<span class='string_literal'>"()"</span>);</td></tr>
<tr class="codeline" data-linenumber="388"><td class="num" id="LN388">388</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="389"><td class="num" id="LN389">389</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="390"><td class="num" id="LN390">390</td><td class="line"> <span class='keyword'>if</span> (<span class='variable'><span class='variable'>capi_arglist<table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>14.1</div></td><td>'capi_arglist' is not equal to NULL</td></tr></tbody></table></span><table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>14.1</div></td><td>'capi_arglist' is not equal to NULL</td></tr></tbody></table></span> == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path15" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">15</div></td><td><div class="PathNav"><a href="#Path14" title="Previous event (14)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path16" title="Next event (16)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="391"><td class="num" id="LN391">391</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"Callback calcfc argument list is not set.\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="392"><td class="num" id="LN392">392</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="393"><td class="num" id="LN393">393</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="394"><td class="num" id="LN394">394</td><td class="line"><span class='comment'>/*setdims*/</span></td></tr>
<tr class="codeline" data-linenumber="395"><td class="num" id="LN395">395</td><td class="line"> x_Dims[0]=n;</td></tr>
<tr class="codeline" data-linenumber="396"><td class="num" id="LN396">396</td><td class="line"> con_Dims[0]=m;</td></tr>
<tr class="codeline" data-linenumber="397"><td class="num" id="LN397">397</td><td class="line"><span class='directive'>#ifdef PYPY_VERSION</span></td></tr>
<tr class="codeline" data-linenumber="398"><td class="num" id="LN398">398</td><td class="line"><span class='directive'>#define CAPI_ARGLIST_SETITEM(idx, value) PyList_SetItem((PyObject *)capi_arglist_list, idx, value)</span></td></tr>
<tr class="codeline" data-linenumber="399"><td class="num" id="LN399">399</td><td class="line"> capi_arglist_list = PySequence_List(capi_arglist);</td></tr>
<tr class="codeline" data-linenumber="400"><td class="num" id="LN400">400</td><td class="line"> <span class='keyword'>if</span> (capi_arglist_list == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="401"><td class="num" id="LN401">401</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="402"><td class="num" id="LN402">402</td><td class="line"><span class='directive'>#define CAPI_ARGLIST_SETITEM(idx, value) PyTuple_SetItem((PyObject *)capi_arglist, idx, value)</span></td></tr>
<tr class="codeline" data-linenumber="403"><td class="num" id="LN403">403</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="404"><td class="num" id="LN404">404</td><td class="line"><span class='comment'>/*pyobjfrom*/</span></td></tr>
<tr class="codeline" data-linenumber="405"><td class="num" id="LN405">405</td><td class="line"> <span class='keyword'>if</span> (<span class="mrange">cb_calcfc_in__cobyla__user__routines_nofargs>capi_i</span>) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path16" class="msg msgEvent" style="margin-left:7ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexEvent">16</div></td><td><div class="PathNav"><a href="#Path15" title="Previous event (15)">←</a></div></td><td>Assuming 'cb_calcfc_in__cobyla__user__routines_nofargs' is <= 'capi_i'</td><td><div class="PathNav"><a href="#Path17" title="Next event (17)">→</a></div></td></tr></table></div></td></tr>
<tr><td class="num"></td><td class="line"><div id="Path17" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">17</div></td><td><div class="PathNav"><a href="#Path16" title="Previous event (16)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#Path18" title="Next event (18)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="406"><td class="num" id="LN406">406</td><td class="line"> <span class='keyword'>int</span> itemsize_ = NPY_DOUBLE == NPY_STRING ? 1 : 0;</td></tr>
<tr class="codeline" data-linenumber="407"><td class="num" id="LN407">407</td><td class="line"> <span class='comment'>/*XXX: Hmm, what will destroy this array??? */</span></td></tr>
<tr class="codeline" data-linenumber="408"><td class="num" id="LN408">408</td><td class="line"> PyArrayObject *tmp_arr = (PyArrayObject *)<span class='macro'>PyArray_New<span class='macro_popup'>(*(PyObject * (*)(PyTypeObject *, int, npy_intp const *, int,<br> npy_intp const *, void *, int, int, PyObject *)) _npy_f2py_ARRAY_API<br>[93])</span></span>(&<span class='macro'>PyArray_Type<span class='macro_popup'>(*(PyTypeObject *)_npy_f2py_ARRAY_API[2])</span></span>,1,x_Dims,NPY_DOUBLE,<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>,(<span class='keyword'>char</span>*)x,itemsize_,<span class='macro'>NPY_ARRAY_FARRAY<span class='macro_popup'>(0x0002 | (0x0100 | 0x0400))</span></span>,<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
<tr class="codeline" data-linenumber="409"><td class="num" id="LN409">409</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="410"><td class="num" id="LN410">410</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="411"><td class="num" id="LN411">411</td><td class="line"> <span class='keyword'>if</span> (tmp_arr==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="412"><td class="num" id="LN412">412</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="413"><td class="num" id="LN413">413</td><td class="line"> <span class='keyword'>if</span> (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr))</td></tr>
<tr class="codeline" data-linenumber="414"><td class="num" id="LN414">414</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="415"><td class="num" id="LN415">415</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="416"><td class="num" id="LN416">416</td><td class="line"> <span class='keyword'>if</span> (<span class='variable'><span class='variable'>cb_calcfc_in__cobyla__user__routines_nofargs<table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>17.1</div></td><td>'cb_calcfc_in__cobyla__user__routines_nofargs' is <= 'capi_i'</td></tr></tbody></table></span><table class='variable_popup'><tbody><tr><td valign='top'><div class='PathIndex PathIndexPopUp'>17.1</div></td><td>'cb_calcfc_in__cobyla__user__routines_nofargs' is <= 'capi_i'</td></tr></tbody></table></span>>capi_i) {</td></tr>
<tr><td class="num"></td><td class="line"><div id="Path18" class="msg msgControl" style="margin-left:3ex"><table class="msgT"><tr><td valign="top"><div class="PathIndex PathIndexControl">18</div></td><td><div class="PathNav"><a href="#Path17" title="Previous event (17)">←</a></div></td><td>Taking false branch</td><td><div class="PathNav"><a href="#EndPath" title="Next event (19)">→</a></div></td></tr></table></div></td></tr>
<tr class="codeline" data-linenumber="417"><td class="num" id="LN417">417</td><td class="line"> <span class='keyword'>int</span> itemsize_ = NPY_DOUBLE == NPY_STRING ? 1 : 0;</td></tr>
<tr class="codeline" data-linenumber="418"><td class="num" id="LN418">418</td><td class="line"> <span class='comment'>/*XXX: Hmm, what will destroy this array??? */</span></td></tr>
<tr class="codeline" data-linenumber="419"><td class="num" id="LN419">419</td><td class="line"> PyArrayObject *tmp_arr = (PyArrayObject *)<span class='macro'>PyArray_New<span class='macro_popup'>(*(PyObject * (*)(PyTypeObject *, int, npy_intp const *, int,<br> npy_intp const *, void *, int, int, PyObject *)) _npy_f2py_ARRAY_API<br>[93])</span></span>(&<span class='macro'>PyArray_Type<span class='macro_popup'>(*(PyTypeObject *)_npy_f2py_ARRAY_API[2])</span></span>,1,con_Dims,NPY_DOUBLE,<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>,(<span class='keyword'>char</span>*)con,itemsize_,<span class='macro'>NPY_ARRAY_FARRAY<span class='macro_popup'>(0x0002 | (0x0100 | 0x0400))</span></span>,<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>);</td></tr>
<tr class="codeline" data-linenumber="420"><td class="num" id="LN420">420</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="421"><td class="num" id="LN421">421</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="422"><td class="num" id="LN422">422</td><td class="line"> <span class='keyword'>if</span> (tmp_arr==<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>)</td></tr>
<tr class="codeline" data-linenumber="423"><td class="num" id="LN423">423</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="424"><td class="num" id="LN424">424</td><td class="line"> <span class='keyword'>if</span> (CAPI_ARGLIST_SETITEM(capi_i++,(PyObject *)tmp_arr))</td></tr>
<tr class="codeline" data-linenumber="425"><td class="num" id="LN425">425</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="426"><td class="num" id="LN426">426</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="427"><td class="num" id="LN427">427</td><td class="line"><span class='directive'>#undef CAPI_ARGLIST_SETITEM</span></td></tr>
<tr class="codeline" data-linenumber="428"><td class="num" id="LN428">428</td><td class="line"><span class='directive'>#ifdef PYPY_VERSION</span></td></tr>
<tr class="codeline" data-linenumber="429"><td class="num" id="LN429">429</td><td class="line"> CFUNCSMESSPY(<span class='string_literal'>"cb:capi_arglist="</span>,capi_arglist_list);</td></tr>
<tr class="codeline" data-linenumber="430"><td class="num" id="LN430">430</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="431"><td class="num" id="LN431">431</td><td class="line"> CFUNCSMESSPY(<span class='string_literal'>"cb:capi_arglist="</span>,capi_arglist);</td></tr>
<tr class="codeline" data-linenumber="432"><td class="num" id="LN432">432</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="433"><td class="num" id="LN433">433</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"cb:Call-back calling Python function calcfc.\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="434"><td class="num" id="LN434">434</td><td class="line"><span class='directive'>#ifdef F2PY_REPORT_ATEXIT</span></td></tr>
<tr class="codeline" data-linenumber="435"><td class="num" id="LN435">435</td><td class="line">f2py_cb_start_call_clock();</td></tr>
<tr class="codeline" data-linenumber="436"><td class="num" id="LN436">436</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="437"><td class="num" id="LN437">437</td><td class="line"><span class='directive'>#ifdef PYPY_VERSION</span></td></tr>
<tr class="codeline" data-linenumber="438"><td class="num" id="LN438">438</td><td class="line"> capi_return = PyObject_CallObject(cb_calcfc_in__cobyla__user__routines_capi,(PyObject *)capi_arglist_list);</td></tr>
<tr class="codeline" data-linenumber="439"><td class="num" id="LN439">439</td><td class="line"> <span class='macro'>Py_DECREF(capi_arglist_list)<span class='macro_popup'>_Py_DECREF(((PyObject*)(capi_arglist_list)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="440"><td class="num" id="LN440">440</td><td class="line"> capi_arglist_list = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="441"><td class="num" id="LN441">441</td><td class="line"><span class='directive'>#else</span></td></tr>
<tr class="codeline" data-linenumber="442"><td class="num" id="LN442">442</td><td class="line"> capi_return = PyObject_CallObject(cb_calcfc_in__cobyla__user__routines_capi,(PyObject *)capi_arglist);</td></tr>
<tr class="codeline" data-linenumber="443"><td class="num" id="LN443">443</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="444"><td class="num" id="LN444">444</td><td class="line"><span class='directive'>#ifdef F2PY_REPORT_ATEXIT</span></td></tr>
<tr class="codeline" data-linenumber="445"><td class="num" id="LN445">445</td><td class="line">f2py_cb_stop_call_clock();</td></tr>
<tr class="codeline" data-linenumber="446"><td class="num" id="LN446">446</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="447"><td class="num" id="LN447">447</td><td class="line"> CFUNCSMESSPY(<span class='string_literal'>"cb:capi_return="</span>,capi_return);</td></tr>
<tr class="codeline" data-linenumber="448"><td class="num" id="LN448">448</td><td class="line"> <span class='keyword'>if</span> (capi_return == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="449"><td class="num" id="LN449">449</td><td class="line"> <span class='macro'>fprintf(stderr,<span class='string_literal'>"capi_return is NULL\n"</span>)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "capi_return is NULL\n")</span></span>;</td></tr>
<tr class="codeline" data-linenumber="450"><td class="num" id="LN450">450</td><td class="line"> <span class='keyword'>goto</span> capi_fail;</td></tr>
<tr class="codeline" data-linenumber="451"><td class="num" id="LN451">451</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="452"><td class="num" id="LN452">452</td><td class="line"> <span class='keyword'>if</span> (capi_return == <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="453"><td class="num" id="LN453">453</td><td class="line"> <span class='macro'>Py_DECREF(capi_return)<span class='macro_popup'>_Py_DECREF(((PyObject*)(capi_return)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="454"><td class="num" id="LN454">454</td><td class="line"> capi_return = Py_BuildValue(<span class='string_literal'>"()"</span>);</td></tr>
<tr class="codeline" data-linenumber="455"><td class="num" id="LN455">455</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="456"><td class="num" id="LN456">456</td><td class="line"> <span class='keyword'>else</span> <span class='keyword'>if</span> (!<span class='macro'>PyTuple_Check(capi_return)<span class='macro_popup'>((((((PyObject*)(capi_return))->ob_type))->tp_flags &<br> ((1UL << 26))) != 0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="457"><td class="num" id="LN457">457</td><td class="line"> capi_return = Py_BuildValue(<span class='string_literal'>"(N)"</span>,capi_return);</td></tr>
<tr class="codeline" data-linenumber="458"><td class="num" id="LN458">458</td><td class="line"> }</td></tr>
<tr class="codeline" data-linenumber="459"><td class="num" id="LN459">459</td><td class="line"> capi_j = PyTuple_Size(capi_return);</td></tr>
<tr class="codeline" data-linenumber="460"><td class="num" id="LN460">460</td><td class="line"> capi_i = 0;</td></tr>
<tr class="codeline" data-linenumber="461"><td class="num" id="LN461">461</td><td class="line"><span class='comment'>/*frompyobj*/</span></td></tr>
<tr class="codeline" data-linenumber="462"><td class="num" id="LN462">462</td><td class="line"> <span class='keyword'>if</span> (capi_j>capi_i)</td></tr>
<tr class="codeline" data-linenumber="463"><td class="num" id="LN463">463</td><td class="line"> <span class='macro'>GETSCALARFROMPYTUPLE(capi_return,capi_i++,f_cb_capi,<span class='keyword'>double</span>,<span class='string_literal'>"double_from_pyobj failed in converting argument f of call-back function cb_calcfc_in__cobyla__user__routines to C double\n"</span>)<span class='macro_popup'>{ if ((capi_tmp = PyTuple_GetItem((capi_return),(capi_i++)))==<br>((void*)0)) goto capi_fail; if (!(double_from_pyobj((f_cb_capi<br>),capi_tmp,"double_from_pyobj failed in converting argument f of call-back function cb_calcfc_in__cobyla__user__routines to C double\n"<br>))) goto capi_fail; }</span></span>;</td></tr>
<tr class="codeline" data-linenumber="464"><td class="num" id="LN464">464</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"cb:cb_calcfc_in__cobyla__user__routines:successful\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="465"><td class="num" id="LN465">465</td><td class="line"> <span class='macro'>Py_DECREF(capi_return)<span class='macro_popup'>_Py_DECREF(((PyObject*)(capi_return)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="466"><td class="num" id="LN466">466</td><td class="line"><span class='directive'>#ifdef F2PY_REPORT_ATEXIT</span></td></tr>
<tr class="codeline" data-linenumber="467"><td class="num" id="LN467">467</td><td class="line">f2py_cb_stop_clock();</td></tr>
<tr class="codeline" data-linenumber="468"><td class="num" id="LN468">468</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="469"><td class="num" id="LN469">469</td><td class="line"> <span class='keyword'>goto</span> capi_return_pt;</td></tr>
<tr class="codeline" data-linenumber="470"><td class="num" id="LN470">470</td><td class="line">capi_fail:</td></tr>
<tr class="codeline" data-linenumber="471"><td class="num" id="LN471">471</td><td class="line"> <span class='macro'>fprintf(stderr,<span class='string_literal'>"Call-back cb_calcfc_in__cobyla__user__routines failed.\n"</span>)<span class='macro_popup'>__fprintf_chk (stderr, 2 - 1, "Call-back cb_calcfc_in__cobyla__user__routines failed.\n"<br>)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="472"><td class="num" id="LN472">472</td><td class="line"> <span class='macro'>Py_XDECREF(capi_return)<span class='macro_popup'>_Py_XDECREF(((PyObject*)(capi_return)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="473"><td class="num" id="LN473">473</td><td class="line"> <span class='macro'>Py_XDECREF(capi_arglist_list)<span class='macro_popup'>_Py_XDECREF(((PyObject*)(capi_arglist_list)))</span></span>;</td></tr>
<tr class="codeline" data-linenumber="474"><td class="num" id="LN474">474</td><td class="line"> <span class='keyword'>if</span> (capi_longjmp_ok)</td></tr>
<tr class="codeline" data-linenumber="475"><td class="num" id="LN475">475</td><td class="line"> longjmp(cb_calcfc_in__cobyla__user__routines_jmpbuf,-1);</td></tr>
<tr class="codeline" data-linenumber="476"><td class="num" id="LN476">476</td><td class="line">capi_return_pt:</td></tr>
<tr class="codeline" data-linenumber="477"><td class="num" id="LN477">477</td><td class="line"> ;</td></tr>
<tr class="codeline" data-linenumber="478"><td class="num" id="LN478">478</td><td class="line"><span class='keyword'>return</span>;</td></tr>
<tr class="codeline" data-linenumber="479"><td class="num" id="LN479">479</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="480"><td class="num" id="LN480">480</td><td class="line"><span class='comment'>/**************** end of cb_calcfc_in__cobyla__user__routines ****************/</span></td></tr>
<tr class="codeline" data-linenumber="481"><td class="num" id="LN481">481</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="482"><td class="num" id="LN482">482</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="483"><td class="num" id="LN483">483</td><td class="line"><span class='comment'>/*********************** See f2py2e/rules.py: buildapi ***********************/</span></td></tr>
<tr class="codeline" data-linenumber="484"><td class="num" id="LN484">484</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="485"><td class="num" id="LN485">485</td><td class="line"><span class='comment'>/********************************** minimize **********************************/</span></td></tr>
<tr class="codeline" data-linenumber="486"><td class="num" id="LN486">486</td><td class="line"><span class='keyword'>static</span> <span class='keyword'>char</span> doc_f2py_rout__cobyla_minimize[] = <span class='string_literal'>"\</span></td></tr>
<tr class="codeline" data-linenumber="487"><td class="num" id="LN487">487</td><td class="line"><span class='string_literal'>x,dinfo = minimize(calcfc,m,x,rhobeg,rhoend,dinfo,[iprint,maxfun,calcfc_extra_args])\n\nWrapper for ``minimize``.\</span></td></tr>
<tr class="codeline" data-linenumber="488"><td class="num" id="LN488">488</td><td class="line"><span class='string_literal'>\n\nParameters\n----------\n"</span></td></tr>
<tr class="codeline" data-linenumber="489"><td class="num" id="LN489">489</td><td class="line"><span class='string_literal'>"calcfc : call-back function\n"</span></td></tr>
<tr class="codeline" data-linenumber="490"><td class="num" id="LN490">490</td><td class="line"><span class='string_literal'>"m : input int\n"</span></td></tr>
<tr class="codeline" data-linenumber="491"><td class="num" id="LN491">491</td><td class="line"><span class='string_literal'>"x : input rank-1 array('d') with bounds (n)\n"</span></td></tr>
<tr class="codeline" data-linenumber="492"><td class="num" id="LN492">492</td><td class="line"><span class='string_literal'>"rhobeg : input float\n"</span></td></tr>
<tr class="codeline" data-linenumber="493"><td class="num" id="LN493">493</td><td class="line"><span class='string_literal'>"rhoend : input float\n"</span></td></tr>
<tr class="codeline" data-linenumber="494"><td class="num" id="LN494">494</td><td class="line"><span class='string_literal'>"dinfo : input rank-1 array('d') with bounds (4)\n"</span></td></tr>
<tr class="codeline" data-linenumber="495"><td class="num" id="LN495">495</td><td class="line"><span class='string_literal'>"\nOther Parameters\n----------------\n"</span></td></tr>
<tr class="codeline" data-linenumber="496"><td class="num" id="LN496">496</td><td class="line"><span class='string_literal'>"calcfc_extra_args : input tuple, optional\n Default: ()\n"</span></td></tr>
<tr class="codeline" data-linenumber="497"><td class="num" id="LN497">497</td><td class="line"><span class='string_literal'>"iprint : input int, optional\n Default: 1\n"</span></td></tr>
<tr class="codeline" data-linenumber="498"><td class="num" id="LN498">498</td><td class="line"><span class='string_literal'>"maxfun : input int, optional\n Default: 100\n"</span></td></tr>
<tr class="codeline" data-linenumber="499"><td class="num" id="LN499">499</td><td class="line"><span class='string_literal'>"\nReturns\n-------\n"</span></td></tr>
<tr class="codeline" data-linenumber="500"><td class="num" id="LN500">500</td><td class="line"><span class='string_literal'>"x : rank-1 array('d') with bounds (n)\n"</span></td></tr>
<tr class="codeline" data-linenumber="501"><td class="num" id="LN501">501</td><td class="line"><span class='string_literal'>"dinfo : rank-1 array('d') with bounds (4)\n"</span></td></tr>
<tr class="codeline" data-linenumber="502"><td class="num" id="LN502">502</td><td class="line"><span class='string_literal'>"\nNotes\n-----\nCall-back functions::\n\n"</span></td></tr>
<tr class="codeline" data-linenumber="503"><td class="num" id="LN503">503</td><td class="line"><span class='string_literal'>" def calcfc(x,con): return f\n\</span></td></tr>
<tr class="codeline" data-linenumber="504"><td class="num" id="LN504">504</td><td class="line"> <span class='string_literal'>Required arguments:\n"</span></td></tr>
<tr class="codeline" data-linenumber="505"><td class="num" id="LN505">505</td><td class="line"><span class='string_literal'>" x : input rank-1 array('d') with bounds (n)\n"</span></td></tr>
<tr class="codeline" data-linenumber="506"><td class="num" id="LN506">506</td><td class="line"><span class='string_literal'>" con : input rank-1 array('d') with bounds (m)\n"</span></td></tr>
<tr class="codeline" data-linenumber="507"><td class="num" id="LN507">507</td><td class="line"><span class='string_literal'>" Return objects:\n"</span></td></tr>
<tr class="codeline" data-linenumber="508"><td class="num" id="LN508">508</td><td class="line"><span class='string_literal'>" f : float"</span>;</td></tr>
<tr class="codeline" data-linenumber="509"><td class="num" id="LN509">509</td><td class="line"><span class='comment'>/* extern void F_FUNC(cobyla ,COBYLA )(cb_calcfc_in__cobyla__user__routines_typedef,int*,int*,double*,double*,double*,int*,int*,double*,int*,double*); */</span></td></tr>
<tr class="codeline" data-linenumber="510"><td class="num" id="LN510">510</td><td class="line"><span class='keyword'>static</span> PyObject *f2py_rout__cobyla_minimize(<span class='keyword'>const</span> PyObject *capi_self,</td></tr>
<tr class="codeline" data-linenumber="511"><td class="num" id="LN511">511</td><td class="line"> PyObject *capi_args,</td></tr>
<tr class="codeline" data-linenumber="512"><td class="num" id="LN512">512</td><td class="line"> PyObject *capi_keywds,</td></tr>
<tr class="codeline" data-linenumber="513"><td class="num" id="LN513">513</td><td class="line"> <span class='keyword'>void</span> (*f2py_func)(cb_calcfc_in__cobyla__user__routines_typedef,<span class='keyword'>int</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*,<span class='keyword'>double</span>*,<span class='keyword'>double</span>*,<span class='keyword'>int</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*,<span class='keyword'>int</span>*,<span class='keyword'>double</span>*)) {</td></tr>
<tr class="codeline" data-linenumber="514"><td class="num" id="LN514">514</td><td class="line"> PyObject * <span class='keyword'>volatile</span> capi_buildvalue = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="515"><td class="num" id="LN515">515</td><td class="line"> <span class='keyword'>volatile</span> <span class='keyword'>int</span> f2py_success = 1;</td></tr>
<tr class="codeline" data-linenumber="516"><td class="num" id="LN516">516</td><td class="line"><span class='comment'>/*decl*/</span></td></tr>
<tr class="codeline" data-linenumber="517"><td class="num" id="LN517">517</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="518"><td class="num" id="LN518">518</td><td class="line"> PyObject *calcfc_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="519"><td class="num" id="LN519">519</td><td class="line"> PyTupleObject *calcfc_xa_capi = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="520"><td class="num" id="LN520">520</td><td class="line"> PyTupleObject *calcfc_args_capi = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="521"><td class="num" id="LN521">521</td><td class="line"> <span class='keyword'>int</span> calcfc_nofargs_capi = 0;</td></tr>
<tr class="codeline" data-linenumber="522"><td class="num" id="LN522">522</td><td class="line"> cb_calcfc_in__cobyla__user__routines_typedef calcfc_cptr;</td></tr>
<tr class="codeline" data-linenumber="523"><td class="num" id="LN523">523</td><td class="line"> <span class='keyword'>int</span> n = 0;</td></tr>
<tr class="codeline" data-linenumber="524"><td class="num" id="LN524">524</td><td class="line"> <span class='keyword'>int</span> m = 0;</td></tr>
<tr class="codeline" data-linenumber="525"><td class="num" id="LN525">525</td><td class="line"> PyObject *m_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="526"><td class="num" id="LN526">526</td><td class="line"> <span class='keyword'>double</span> *x = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="527"><td class="num" id="LN527">527</td><td class="line"> npy_intp x_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="528"><td class="num" id="LN528">528</td><td class="line"> <span class='keyword'>const</span> <span class='keyword'>int</span> x_Rank = 1;</td></tr>
<tr class="codeline" data-linenumber="529"><td class="num" id="LN529">529</td><td class="line"> PyArrayObject *capi_x_tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="530"><td class="num" id="LN530">530</td><td class="line"> <span class='keyword'>int</span> capi_x_intent = 0;</td></tr>
<tr class="codeline" data-linenumber="531"><td class="num" id="LN531">531</td><td class="line"> PyObject *x_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="532"><td class="num" id="LN532">532</td><td class="line"> <span class='keyword'>double</span> rhobeg = 0;</td></tr>
<tr class="codeline" data-linenumber="533"><td class="num" id="LN533">533</td><td class="line"> PyObject *rhobeg_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="534"><td class="num" id="LN534">534</td><td class="line"> <span class='keyword'>double</span> rhoend = 0;</td></tr>
<tr class="codeline" data-linenumber="535"><td class="num" id="LN535">535</td><td class="line"> PyObject *rhoend_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="536"><td class="num" id="LN536">536</td><td class="line"> <span class='keyword'>int</span> iprint = 0;</td></tr>
<tr class="codeline" data-linenumber="537"><td class="num" id="LN537">537</td><td class="line"> PyObject *iprint_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="538"><td class="num" id="LN538">538</td><td class="line"> <span class='keyword'>int</span> maxfun = 0;</td></tr>
<tr class="codeline" data-linenumber="539"><td class="num" id="LN539">539</td><td class="line"> PyObject *maxfun_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="540"><td class="num" id="LN540">540</td><td class="line"> <span class='keyword'>double</span> *w = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="541"><td class="num" id="LN541">541</td><td class="line"> npy_intp w_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="542"><td class="num" id="LN542">542</td><td class="line"> <span class='keyword'>const</span> <span class='keyword'>int</span> w_Rank = 1;</td></tr>
<tr class="codeline" data-linenumber="543"><td class="num" id="LN543">543</td><td class="line"> PyArrayObject *capi_w_tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="544"><td class="num" id="LN544">544</td><td class="line"> <span class='keyword'>int</span> capi_w_intent = 0;</td></tr>
<tr class="codeline" data-linenumber="545"><td class="num" id="LN545">545</td><td class="line"> <span class='keyword'>int</span> *iact = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="546"><td class="num" id="LN546">546</td><td class="line"> npy_intp iact_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="547"><td class="num" id="LN547">547</td><td class="line"> <span class='keyword'>const</span> <span class='keyword'>int</span> iact_Rank = 1;</td></tr>
<tr class="codeline" data-linenumber="548"><td class="num" id="LN548">548</td><td class="line"> PyArrayObject *capi_iact_tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="549"><td class="num" id="LN549">549</td><td class="line"> <span class='keyword'>int</span> capi_iact_intent = 0;</td></tr>
<tr class="codeline" data-linenumber="550"><td class="num" id="LN550">550</td><td class="line"> <span class='keyword'>double</span> *dinfo = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="551"><td class="num" id="LN551">551</td><td class="line"> npy_intp dinfo_Dims[1] = {-1};</td></tr>
<tr class="codeline" data-linenumber="552"><td class="num" id="LN552">552</td><td class="line"> <span class='keyword'>const</span> <span class='keyword'>int</span> dinfo_Rank = 1;</td></tr>
<tr class="codeline" data-linenumber="553"><td class="num" id="LN553">553</td><td class="line"> PyArrayObject *capi_dinfo_tmp = <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="554"><td class="num" id="LN554">554</td><td class="line"> <span class='keyword'>int</span> capi_dinfo_intent = 0;</td></tr>
<tr class="codeline" data-linenumber="555"><td class="num" id="LN555">555</td><td class="line"> PyObject *dinfo_capi = <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="556"><td class="num" id="LN556">556</td><td class="line"> <span class='keyword'>static</span> <span class='keyword'>char</span> *capi_kwlist[] = {<span class='string_literal'>"calcfc"</span>,<span class='string_literal'>"m"</span>,<span class='string_literal'>"x"</span>,<span class='string_literal'>"rhobeg"</span>,<span class='string_literal'>"rhoend"</span>,<span class='string_literal'>"dinfo"</span>,<span class='string_literal'>"iprint"</span>,<span class='string_literal'>"maxfun"</span>,<span class='string_literal'>"calcfc_extra_args"</span>,<span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>};</td></tr>
<tr class="codeline" data-linenumber="557"><td class="num" id="LN557">557</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="558"><td class="num" id="LN558">558</td><td class="line"><span class='comment'>/*routdebugenter*/</span></td></tr>
<tr class="codeline" data-linenumber="559"><td class="num" id="LN559">559</td><td class="line"><span class='directive'>#ifdef F2PY_REPORT_ATEXIT</span></td></tr>
<tr class="codeline" data-linenumber="560"><td class="num" id="LN560">560</td><td class="line">f2py_start_clock();</td></tr>
<tr class="codeline" data-linenumber="561"><td class="num" id="LN561">561</td><td class="line"><span class='directive'>#endif</span></td></tr>
<tr class="codeline" data-linenumber="562"><td class="num" id="LN562">562</td><td class="line"> <span class='keyword'>if</span> (!PyArg_ParseTupleAndKeywords(capi_args,capi_keywds,\</td></tr>
<tr class="codeline" data-linenumber="563"><td class="num" id="LN563">563</td><td class="line"> <span class='string_literal'>"OOOOOO|OOO!:_cobyla.minimize"</span>,\</td></tr>
<tr class="codeline" data-linenumber="564"><td class="num" id="LN564">564</td><td class="line"> capi_kwlist,&calcfc_capi,&m_capi,&x_capi,&rhobeg_capi,&rhoend_capi,&dinfo_capi,&iprint_capi,&maxfun_capi,&PyTuple_Type,&calcfc_xa_capi))</td></tr>
<tr class="codeline" data-linenumber="565"><td class="num" id="LN565">565</td><td class="line"> <span class='keyword'>return</span> <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>;</td></tr>
<tr class="codeline" data-linenumber="566"><td class="num" id="LN566">566</td><td class="line"><span class='comment'>/*frompyobj*/</span></td></tr>
<tr class="codeline" data-linenumber="567"><td class="num" id="LN567">567</td><td class="line"> <span class='comment'>/* Processing variable calcfc */</span></td></tr>
<tr class="codeline" data-linenumber="568"><td class="num" id="LN568">568</td><td class="line"><span class='keyword'>if</span>(F2PyCapsule_Check(calcfc_capi)) {</td></tr>
<tr class="codeline" data-linenumber="569"><td class="num" id="LN569">569</td><td class="line"> calcfc_cptr = F2PyCapsule_AsVoidPtr(calcfc_capi);</td></tr>
<tr class="codeline" data-linenumber="570"><td class="num" id="LN570">570</td><td class="line">} <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="571"><td class="num" id="LN571">571</td><td class="line"> calcfc_cptr = cb_calcfc_in__cobyla__user__routines;</td></tr>
<tr class="codeline" data-linenumber="572"><td class="num" id="LN572">572</td><td class="line">}</td></tr>
<tr class="codeline" data-linenumber="573"><td class="num" id="LN573">573</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="574"><td class="num" id="LN574">574</td><td class="line"> calcfc_nofargs_capi = cb_calcfc_in__cobyla__user__routines_nofargs;</td></tr>
<tr class="codeline" data-linenumber="575"><td class="num" id="LN575">575</td><td class="line"> <span class='keyword'>if</span> (create_cb_arglist(calcfc_capi,calcfc_xa_capi,2,0,&cb_calcfc_in__cobyla__user__routines_nofargs,&calcfc_args_capi,<span class='string_literal'>"failed in processing argument list for call-back calcfc."</span>)) {</td></tr>
<tr class="codeline" data-linenumber="576"><td class="num" id="LN576">576</td><td class="line"> jmp_buf calcfc_jmpbuf;</td></tr>
<tr class="codeline" data-linenumber="577"><td class="num" id="LN577">577</td><td class="line"> CFUNCSMESS(<span class='string_literal'>"Saving jmpbuf for `calcfc`.\n"</span>);</td></tr>
<tr class="codeline" data-linenumber="578"><td class="num" id="LN578">578</td><td class="line"> <span class='macro'>SWAP(calcfc_capi,cb_calcfc_in__cobyla__user__routines_capi,PyObject)<span class='macro_popup'>{ PyObject *c; c = calcfc_capi; calcfc_capi = cb_calcfc_in__cobyla__user__routines_capi<br>; cb_calcfc_in__cobyla__user__routines_capi = c;}</span></span>;</td></tr>
<tr class="codeline" data-linenumber="579"><td class="num" id="LN579">579</td><td class="line"> <span class='macro'>SWAP(calcfc_args_capi,cb_calcfc_in__cobyla__user__routines_args_capi,PyTupleObject)<span class='macro_popup'>{ PyTupleObject *c; c = calcfc_args_capi; calcfc_args_capi = cb_calcfc_in__cobyla__user__routines_args_capi<br>; cb_calcfc_in__cobyla__user__routines_args_capi = c;}</span></span>;</td></tr>
<tr class="codeline" data-linenumber="580"><td class="num" id="LN580">580</td><td class="line"> memcpy(&calcfc_jmpbuf,&cb_calcfc_in__cobyla__user__routines_jmpbuf,<span class='keyword'>sizeof</span>(jmp_buf));</td></tr>
<tr class="codeline" data-linenumber="581"><td class="num" id="LN581">581</td><td class="line"> <span class='comment'>/* Processing variable m */</span></td></tr>
<tr class="codeline" data-linenumber="582"><td class="num" id="LN582">582</td><td class="line"> f2py_success = int_from_pyobj(&m,m_capi,<span class='string_literal'>"_cobyla.minimize() 2nd argument (m) can't be converted to int"</span>);</td></tr>
<tr class="codeline" data-linenumber="583"><td class="num" id="LN583">583</td><td class="line"> <span class='keyword'>if</span> (f2py_success) {</td></tr>
<tr class="codeline" data-linenumber="584"><td class="num" id="LN584">584</td><td class="line"> <span class='comment'>/* Processing variable x */</span></td></tr>
<tr class="codeline" data-linenumber="585"><td class="num" id="LN585">585</td><td class="line"> ;</td></tr>
<tr class="codeline" data-linenumber="586"><td class="num" id="LN586">586</td><td class="line"> capi_x_intent |= <span class='macro'>F2PY_INTENT_IN<span class='macro_popup'>1</span></span>|<span class='macro'>F2PY_INTENT_OUT<span class='macro_popup'>4</span></span>;</td></tr>
<tr class="codeline" data-linenumber="587"><td class="num" id="LN587">587</td><td class="line"> capi_x_tmp = array_from_pyobj(NPY_DOUBLE,x_Dims,x_Rank,capi_x_intent,x_capi);</td></tr>
<tr class="codeline" data-linenumber="588"><td class="num" id="LN588">588</td><td class="line"> <span class='keyword'>if</span> (capi_x_tmp == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="589"><td class="num" id="LN589">589</td><td class="line"> <span class='keyword'>if</span> (!PyErr_Occurred())</td></tr>
<tr class="codeline" data-linenumber="590"><td class="num" id="LN590">590</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"failed in converting 3rd argument `x' of _cobyla.minimize to C/Fortran array"</span> );</td></tr>
<tr class="codeline" data-linenumber="591"><td class="num" id="LN591">591</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="592"><td class="num" id="LN592">592</td><td class="line"> x = (<span class='keyword'>double</span> *)(PyArray_DATA(capi_x_tmp));</td></tr>
<tr class="codeline" data-linenumber="593"><td class="num" id="LN593">593</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="594"><td class="num" id="LN594">594</td><td class="line"> <span class='comment'>/* Processing variable rhobeg */</span></td></tr>
<tr class="codeline" data-linenumber="595"><td class="num" id="LN595">595</td><td class="line"> f2py_success = double_from_pyobj(&rhobeg,rhobeg_capi,<span class='string_literal'>"_cobyla.minimize() 4th argument (rhobeg) can't be converted to double"</span>);</td></tr>
<tr class="codeline" data-linenumber="596"><td class="num" id="LN596">596</td><td class="line"> <span class='keyword'>if</span> (f2py_success) {</td></tr>
<tr class="codeline" data-linenumber="597"><td class="num" id="LN597">597</td><td class="line"> <span class='comment'>/* Processing variable rhoend */</span></td></tr>
<tr class="codeline" data-linenumber="598"><td class="num" id="LN598">598</td><td class="line"> f2py_success = double_from_pyobj(&rhoend,rhoend_capi,<span class='string_literal'>"_cobyla.minimize() 5th argument (rhoend) can't be converted to double"</span>);</td></tr>
<tr class="codeline" data-linenumber="599"><td class="num" id="LN599">599</td><td class="line"> <span class='keyword'>if</span> (f2py_success) {</td></tr>
<tr class="codeline" data-linenumber="600"><td class="num" id="LN600">600</td><td class="line"> <span class='comment'>/* Processing variable iprint */</span></td></tr>
<tr class="codeline" data-linenumber="601"><td class="num" id="LN601">601</td><td class="line"> <span class='keyword'>if</span> (iprint_capi == <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>) iprint = 1; <span class='keyword'>else</span></td></tr>
<tr class="codeline" data-linenumber="602"><td class="num" id="LN602">602</td><td class="line"> f2py_success = int_from_pyobj(&iprint,iprint_capi,<span class='string_literal'>"_cobyla.minimize() 1st keyword (iprint) can't be converted to int"</span>);</td></tr>
<tr class="codeline" data-linenumber="603"><td class="num" id="LN603">603</td><td class="line"> <span class='keyword'>if</span> (f2py_success) {</td></tr>
<tr class="codeline" data-linenumber="604"><td class="num" id="LN604">604</td><td class="line"> <span class='macro'>CHECKSCALAR(0<=iprint && iprint<=3,<span class='string_literal'>"0<=iprint && iprint<=3"</span>,<span class='string_literal'>"1st keyword iprint"</span>,<span class='string_literal'>"minimize:iprint=%d"</span>,iprint)<span class='macro_popup'>if (!(0<=iprint && iprint<=3)) { char errstring<br>[256]; __builtin___sprintf_chk (errstring, 2 - 1, __builtin_object_size<br> (errstring, 2 > 1), "%s: ""minimize:iprint=%d", "(""0<=iprint && iprint<=3"<br>") failed for ""1st keyword iprint", iprint); PyErr_SetString<br>(_cobyla_error,errstring); } else</span></span> {</td></tr>
<tr class="codeline" data-linenumber="605"><td class="num" id="LN605">605</td><td class="line"> <span class='comment'>/* Processing variable maxfun */</span></td></tr>
<tr class="codeline" data-linenumber="606"><td class="num" id="LN606">606</td><td class="line"> <span class='keyword'>if</span> (maxfun_capi == <span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>) maxfun = 100; <span class='keyword'>else</span></td></tr>
<tr class="codeline" data-linenumber="607"><td class="num" id="LN607">607</td><td class="line"> f2py_success = int_from_pyobj(&maxfun,maxfun_capi,<span class='string_literal'>"_cobyla.minimize() 2nd keyword (maxfun) can't be converted to int"</span>);</td></tr>
<tr class="codeline" data-linenumber="608"><td class="num" id="LN608">608</td><td class="line"> <span class='keyword'>if</span> (f2py_success) {</td></tr>
<tr class="codeline" data-linenumber="609"><td class="num" id="LN609">609</td><td class="line"> <span class='comment'>/* Processing variable dinfo */</span></td></tr>
<tr class="codeline" data-linenumber="610"><td class="num" id="LN610">610</td><td class="line"> dinfo_Dims[0]=4;</td></tr>
<tr class="codeline" data-linenumber="611"><td class="num" id="LN611">611</td><td class="line"> capi_dinfo_intent |= <span class='macro'>F2PY_INTENT_IN<span class='macro_popup'>1</span></span>|<span class='macro'>F2PY_INTENT_OUT<span class='macro_popup'>4</span></span>;</td></tr>
<tr class="codeline" data-linenumber="612"><td class="num" id="LN612">612</td><td class="line"> capi_dinfo_tmp = array_from_pyobj(NPY_DOUBLE,dinfo_Dims,dinfo_Rank,capi_dinfo_intent,dinfo_capi);</td></tr>
<tr class="codeline" data-linenumber="613"><td class="num" id="LN613">613</td><td class="line"> <span class='keyword'>if</span> (capi_dinfo_tmp == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="614"><td class="num" id="LN614">614</td><td class="line"> <span class='keyword'>if</span> (!PyErr_Occurred())</td></tr>
<tr class="codeline" data-linenumber="615"><td class="num" id="LN615">615</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"failed in converting 6th argument `dinfo' of _cobyla.minimize to C/Fortran array"</span> );</td></tr>
<tr class="codeline" data-linenumber="616"><td class="num" id="LN616">616</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="617"><td class="num" id="LN617">617</td><td class="line"> dinfo = (<span class='keyword'>double</span> *)(PyArray_DATA(capi_dinfo_tmp));</td></tr>
<tr class="codeline" data-linenumber="618"><td class="num" id="LN618">618</td><td class="line"> </td></tr>
<tr class="codeline" data-linenumber="619"><td class="num" id="LN619">619</td><td class="line"> <span class='comment'>/* Processing variable n */</span></td></tr>
<tr class="codeline" data-linenumber="620"><td class="num" id="LN620">620</td><td class="line"> n = <span class='macro'>len(x)<span class='macro_popup'>x_Dims[0]</span></span>;</td></tr>
<tr class="codeline" data-linenumber="621"><td class="num" id="LN621">621</td><td class="line"> <span class='comment'>/* Processing variable w */</span></td></tr>
<tr class="codeline" data-linenumber="622"><td class="num" id="LN622">622</td><td class="line"> w_Dims[0]=n*(3*n+2*m+11)+4*m+6;</td></tr>
<tr class="codeline" data-linenumber="623"><td class="num" id="LN623">623</td><td class="line"> capi_w_intent |= <span class='macro'>F2PY_INTENT_HIDE<span class='macro_popup'>8</span></span>|<span class='macro'>F2PY_INTENT_CACHE<span class='macro_popup'>16</span></span>;</td></tr>
<tr class="codeline" data-linenumber="624"><td class="num" id="LN624">624</td><td class="line"> capi_w_tmp = array_from_pyobj(NPY_DOUBLE,w_Dims,w_Rank,capi_w_intent,<span class='macro'>Py_None<span class='macro_popup'>(&_Py_NoneStruct)</span></span>);</td></tr>
<tr class="codeline" data-linenumber="625"><td class="num" id="LN625">625</td><td class="line"> <span class='keyword'>if</span> (capi_w_tmp == <span class='macro'>NULL<span class='macro_popup'>((void*)0)</span></span>) {</td></tr>
<tr class="codeline" data-linenumber="626"><td class="num" id="LN626">626</td><td class="line"> <span class='keyword'>if</span> (!PyErr_Occurred())</td></tr>
<tr class="codeline" data-linenumber="627"><td class="num" id="LN627">627</td><td class="line"> PyErr_SetString(_cobyla_error,<span class='string_literal'>"failed in converting hidden `w' of _cobyla.minimize to C/Fortran array"</span> );</td></tr>
<tr class="codeline" data-linenumber="628"><td class="num" id="LN628">628</td><td class="line"> } <span class='keyword'>else</span> {</td></tr>
<tr class="codeline" data-linenumber="629"><td class="num" id="LN629">629</td><td class="line"> w = (<span class='keyword'>double</span> *)(PyArray_DATA(capi_w_tmp));</td></tr>