File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -341,3 +341,31 @@ pub unsafe fn RTYPEDDATA_TYPE(obj: VALUE) -> *const rb_data_type_t {
341341pub unsafe fn RTYPEDDATA_GET_DATA ( obj : VALUE ) -> * mut c_void {
342342 api ( ) . rtypeddata_get_data ( obj)
343343}
344+
345+ /// Checks if the bignum is positive.
346+ ///
347+ /// @param[in] b An object of RBignum.
348+ /// @retval false `b` is less than zero.
349+ /// @retval true Otherwise.
350+ ///
351+ /// # Safety
352+ /// This function is unsafe because it could dereference a raw pointer when
353+ /// accessing the underlying bignum structure.
354+ #[ inline]
355+ pub unsafe fn RBIGNUM_POSITIVE_P ( b : VALUE ) -> bool {
356+ api ( ) . bignum_positive_p ( b)
357+ }
358+
359+ /// Checks if the bignum is negative.
360+ ///
361+ /// @param[in] b An object of RBignum.
362+ /// @retval true `b` is less than zero.
363+ /// @retval false Otherwise.
364+ ///
365+ /// # Safety
366+ /// This function is unsafe because it could dereference a raw pointer when
367+ /// accessing the underlying bignum structure.
368+ #[ inline]
369+ pub unsafe fn RBIGNUM_NEGATIVE_P ( b : VALUE ) -> bool {
370+ api ( ) . bignum_negative_p ( b)
371+ }
You can’t perform that action at this time.
0 commit comments