From a04dbc90ab4e8f18b6daff2911f9d55edfe5e9c6 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 12 Oct 2024 13:38:25 -0300 Subject: [PATCH] Reorg context.c --- ext/bsdcontrol.rb/context.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ext/bsdcontrol.rb/context.c b/ext/bsdcontrol.rb/context.c index 495279f..39f0c4c 100644 --- a/ext/bsdcontrol.rb/context.c +++ b/ext/bsdcontrol.rb/context.c @@ -19,14 +19,6 @@ bsdcontrol_context_alloc(VALUE klass) return Data_Wrap_Struct(klass, NULL, bsdcontrol_context_free, ctx); } -hbsdctrl_ctx_t * -bsdcontrol_context_unwrap(VALUE rbcontext) -{ - hbsdctrl_ctx_t *ctx; - Data_Get_Struct(rbcontext, hbsdctrl_ctx_t, ctx); - return ctx; -} - static void bsdcontrol_context_free(hbsdctrl_ctx_t *ctx) { @@ -70,3 +62,11 @@ bsdcontrol_context_library_version(VALUE self) ctx = bsdcontrol_context_unwrap(self); return ULONG2NUM(ctx->hc_version); } + +hbsdctrl_ctx_t * +bsdcontrol_context_unwrap(VALUE rbcontext) +{ + hbsdctrl_ctx_t *ctx; + Data_Get_Struct(rbcontext, hbsdctrl_ctx_t, ctx); + return ctx; +}