mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-08-01 03:07:43 +00:00
python wrapper
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace QuanTAlib.Python;
|
||||
|
||||
internal static class ArrayBridge
|
||||
{
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static unsafe bool IsNull(double* ptr) => ptr == null;
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static int ValidateLength(int n) =>
|
||||
n > 0 ? StatusCodes.QTL_OK : StatusCodes.QTL_ERR_INVALID_LENGTH;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
namespace QuanTAlib.Python;
|
||||
|
||||
internal static class StatusCodes
|
||||
{
|
||||
public const int QTL_OK = 0;
|
||||
public const int QTL_ERR_NULL_PTR = 1;
|
||||
public const int QTL_ERR_INVALID_LENGTH = 2;
|
||||
public const int QTL_ERR_INVALID_PARAM = 3;
|
||||
public const int QTL_ERR_INTERNAL = 4;
|
||||
}
|
||||
Reference in New Issue
Block a user