File: encode.h

package info (click to toggle)
ruby-oj 3.16.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,192 kB
  • sloc: ansic: 19,659; ruby: 11,750; sh: 70; makefile: 17
file content (16 lines) | stat: -rw-r--r-- 388 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright (c) 2011 Peter Ohler. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for license details.

#ifndef OJ_ENCODE_H
#define OJ_ENCODE_H

#include "oj.h"
#include "ruby.h"
#include "ruby/encoding.h"

static inline VALUE oj_encode(VALUE rstr) {
    rb_enc_associate(rstr, oj_utf8_encoding);
    return rstr;
}

#endif /* OJ_ENCODE_H */