mirror of
https://github.com/mihakralj/QuanTAlib.git
synced 2026-07-29 10:07:43 +00:00
14 lines
416 B
C#
14 lines
416 B
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
|
|
namespace QuanTAlib.Python;
|
|
|
|
internal static class ArrayBridge
|
|
{
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static bool IsNull(IntPtr ptr) => ptr == IntPtr.Zero;
|
|
|
|
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
|
public static int ValidateLength(int n) =>
|
|
n > 0 ? StatusCodes.QTL_OK : StatusCodes.QTL_ERR_INVALID_LENGTH;
|
|
} |