Ruby: internal/util.h Source File

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

util.h
Go to the documentation of this file.
1#ifndef INTERNAL_UTIL_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_UTIL_H
13#include "ruby/internal/config.h"
14#include <stddef.h> /* for size_t */
15
16#ifdef HAVE_SYS_TYPES_H
17# include <sys/types.h> /* for ssize_t (note: on Windows ssize_t is */
18#endif /* `#define`d in ruby/config.h) */
19
20/* util.c */
21 char *ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve);
22 char *ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve);
23
24RUBY_SYMBOL_EXPORT_BEGIN
25/* util.c (export) */
26extern const signed char ruby_digit36_to_number_table[];
27extern const char ruby_hexdigits[];
28extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow);
29RUBY_SYMBOL_EXPORT_END
30
31#endif /* INTERNAL_UTIL_H */
len
uint8_t len
Definition: escape.c:17
str
char str[HTML_ESCAPE_MAX_LEN+1]
Definition: escape.c:18
config.h
Thin wrapper to ruby/config.h.
ruby_digit36_to_number_table
const signed char ruby_digit36_to_number_table[]
Definition: util.c:79
ruby_hexdigits
const char ruby_hexdigits[]
Definition: util.c:34
ruby_scan_digits
unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)
Definition: util.c:101
ruby_dtoa
char * ruby_dtoa(double d_, int mode, int ndigits, int *decpt, int *sign, char **rve)
ruby_hdtoa
char * ruby_hdtoa(double d, const char *xdigs, int ndigits, int *decpt, int *sign, char **rve)
mode
const char int mode
Definition: ioapi.h:137