Sha256: 7bae950f745a60f52d77a9a5df5a069003d50822bbd80bf869dec615d2646bff

Contents?: true

Size: 907 Bytes

Versions: 16

Compression:

Stored size: 907 Bytes

Contents

// Copyright (c) 2021, Peter Ohler, All rights reserved.

#include "parser.h"

static void
noop(ojParser p) {
}

static VALUE
option(ojParser p, const char *key, VALUE value) {
    rb_raise(rb_eArgError, "%s is not an option for the validate delegate", key);
    return Qnil;
}

static VALUE
result(ojParser p) {
    return Qnil;
}

static void
dfree(ojParser p) {
}

static void
mark(ojParser p) {
}

void oj_set_parser_validator(ojParser p) {
    p->ctx = NULL;
    Funcs	end = p->funcs + 3;
    Funcs f;

    for (f = p->funcs; f < end; f++) {
	f->add_null = noop;
	f->add_true = noop;
	f->add_false = noop;
	f->add_int = noop;
	f->add_float = noop;
	f->add_big = noop;
	f->add_str = noop;
	f->open_array = noop;
	f->close_array = noop;
	f->open_object = noop;
	f->close_object = noop;
    }
    p->option = option;
    p->result = result;
    p->free = dfree;
    p->mark = mark;
    p->start = noop;
}

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
devcycle-ruby-server-sdk-2.0.0 vendor/bundle/ruby/3.0.0/gems/oj-3.13.2/ext/oj/validate.c
oj-3.13.16 ext/oj/validate.c
oj-3.13.15 ext/oj/validate.c
oj-3.13.14 ext/oj/validate.c
oj-3.13.13 ext/oj/validate.c
oj-3.13.12 ext/oj/validate.c
oj-3.13.11 ext/oj/validate.c
oj-3.13.10 ext/oj/validate.c
oj-3.13.9 ext/oj/validate.c
oj-3.13.8 ext/oj/validate.c
oj-3.13.7 ext/oj/validate.c
oj-3.13.6 ext/oj/validate.c
oj-3.13.5 ext/oj/validate.c
oj-3.13.4 ext/oj/validate.c
oj-3.13.3 ext/oj/validate.c
oj-3.13.2 ext/oj/validate.c