File: intern.h

package info (click to toggle)
ruby-ox 2.14.23-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,504 kB
  • sloc: xml: 39,683; ansic: 9,626; ruby: 6,441; sh: 47; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) 2011, 2021 Peter Ohler. All rights reserved.
// Licensed under the MIT License. See LICENSE file in the project root for license details.
#ifndef OX_INTERN_H
#define OX_INTERN_H

#include <ruby.h>
#include <ruby/encoding.h>

struct _parseInfo;

extern void ox_hash_init();

extern VALUE ox_str_intern(const char *key, size_t len, const char **keyp);
extern VALUE ox_sym_intern(const char *key, size_t len, const char **keyp);
extern ID    ox_attr_intern(const char *key, size_t len);
extern ID    ox_id_intern(const char *key, size_t len);

extern char *ox_strndup(const char *s, size_t len);

extern VALUE ox_utf8_name(const char *str, size_t len, rb_encoding *encoding, const char **strp);
extern VALUE ox_utf8_sym(const char *str, size_t len, rb_encoding *encoding, const char **strp);
extern VALUE ox_enc_sym(const char *str, size_t len, rb_encoding *encoding, const char **strp);
extern VALUE ox_enc_name(const char *str, size_t len, rb_encoding *encoding, const char **strp);

#endif /* OX_INTERN_H */