Sha256: e1e3cf29a0b13072f964103568cdf8b063731a8554380a7804ed60f262b784cb

Contents?: true

Size: 1.6 KB

Versions: 39

Compression:

Stored size: 1.6 KB

Contents

/* -*- coding: utf-8; mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
  Copyright (C) 2016  Kouhei Sutou <kou@clear-code.com>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License version 2.1 as published by the Free Software Foundation.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General Public
  License along with this library; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
*/

#include "rb-grn.h"

/*
 * Document-class: Groonga::RequestTimerID
 *
 * This class represents request timer ID. It's used with request timer.
 */

VALUE rb_cGrnRequestTimerID;

static rb_data_type_t data_type = {
    "Groonga::RequestTimeID",
    {
        NULL,
        NULL,
        NULL,
    },
    NULL,
    NULL,
    0
};

void *
rb_grn_request_timer_id_from_ruby_object (VALUE rb_id)
{
    if (NIL_P(rb_id)) {
        return NULL;
    } else {
        void *id;
        TypedData_Get_Struct(rb_id, void *, &data_type, id);
        return id;
    }
}

VALUE
rb_grn_request_timer_id_to_ruby_object (void *id)
{
    return TypedData_Wrap_Struct(rb_cGrnRequestTimerID, &data_type, id);
}

void
rb_grn_init_request_timer_id (VALUE mGrn)
{
    rb_cGrnRequestTimerID =
        rb_define_class_under(mGrn, "RequestTimerID", rb_cData);
}

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
rroonga-10.0.6 ext/groonga/rb-grn-request-timer-id.c
rroonga-10.0.2 ext/groonga/rb-grn-request-timer-id.c
rroonga-10.0.1 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.7-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.7-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.7 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.3-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.3-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.3 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.2-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.2-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-9.0.2 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.1.1-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.1.1-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.1.1 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.0.2-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.0.2-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-7.0.2 ext/groonga/rb-grn-request-timer-id.c
rroonga-6.1.3-x64-mingw32 ext/groonga/rb-grn-request-timer-id.c
rroonga-6.1.3-x86-mingw32 ext/groonga/rb-grn-request-timer-id.c