mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-07-27 17:27:43 +00:00
fix(python): align QtlEacp export params with Eacp.Batch signature
The NativeAOT export had stale parameter names (period, minPeriod, maxPeriod, useMedian) from an older API. Renamed to match the actual Eacp.Batch(minPeriod, maxPeriod, avgLength, enhance) signature. ABI preserved — same 7 params, same types, no Python-side changes needed.
This commit is contained in:
@@ -1387,13 +1387,13 @@ public static unsafe partial class Exports
|
||||
catch { return StatusCodes.QTL_ERR_INTERNAL; }
|
||||
}
|
||||
|
||||
// Eacp: Pattern A (int period, int min, int max, bool useSimd → int)
|
||||
// Eacp: (int minPeriod, int maxPeriod, int avgLength, bool enhance → int)
|
||||
[UnmanagedCallersOnly(EntryPoint = "qtl_eacp")]
|
||||
public static int QtlEacp(double* src, int n, double* dst, int period, int minPeriod, int maxPeriod, int useMedian)
|
||||
public static int QtlEacp(double* src, int n, double* dst, int minPeriod, int maxPeriod, int avgLength, int enhance)
|
||||
{
|
||||
int v = Chk1(src, dst, n); if (v != 0) return v;
|
||||
v = ChkPeriod(period); if (v != 0) return v;
|
||||
try { Eacp.Batch(Src(src, n), Dst(dst, n), period, minPeriod, maxPeriod, useMedian != 0); return StatusCodes.QTL_OK; }
|
||||
v = ChkPeriod(minPeriod); if (v != 0) return v;
|
||||
try { Eacp.Batch(Src(src, n), Dst(dst, n), minPeriod, maxPeriod, avgLength, enhance != 0); return StatusCodes.QTL_OK; }
|
||||
catch { return StatusCodes.QTL_ERR_INTERNAL; }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user