xrb 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/ext/extconf.rb +0 -1
- data/ext/xrb/escape.c +1 -1
- data/ext/xrb/escape.h +1 -1
- data/ext/xrb/tag.c +4 -4
- data/ext/xrb/tag.h +1 -1
- data/ext/xrb/xrb.c +3 -3
- data/ext/xrb/xrb.h +1 -11
- data/lib/xrb/template.rb +2 -2
- data/lib/xrb/version.rb +1 -1
- data/readme.md +37 -1
- data.tar.gz.sig +0 -0
- metadata +2 -12
- metadata.gz.sig +0 -0
- data/ext/Makefile +0 -270
- data/ext/XRB_Extension.bundle +0 -0
- data/ext/escape.o +0 -0
- data/ext/extconf.h +0 -5
- data/ext/markup.o +0 -0
- data/ext/mkmf.log +0 -122
- data/ext/query.o +0 -0
- data/ext/tag.o +0 -0
- data/ext/template.o +0 -0
- data/ext/xrb.o +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f64c9b5e726af2122bf7031ea5c0acfd6e25619b7d73faff0ad4c9191efb823
|
4
|
+
data.tar.gz: c6088d6f0c819d894a96b3129005a7c9c8fda372e149a5323cc01e200f195b09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 489dd6c69569b06cc6fb4be56ab98877b90866f1c140b0e0b502255ec505182de7e0b14a44feac14108bdfa5c2b66c350ab3f271b0cf541970b5583a4d9721d3
|
7
|
+
data.tar.gz: bb85136e9ed1ebb887165451d45c851cd7aa39d05eefff8b26ad930035e8c92d62f128c8a21d23090a53e4923dfe217f299e3f47cc4293a467f2782680809f39
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/ext/extconf.rb
CHANGED
data/ext/xrb/escape.c
CHANGED
@@ -135,7 +135,7 @@ VALUE XRB_Markup_escape_string(VALUE self, VALUE string) {
|
|
135
135
|
return XRB_Markup_append_buffer(XRB_buffer_for(string), s, p, end);
|
136
136
|
}
|
137
137
|
|
138
|
-
void
|
138
|
+
void Init_XRB_escape(void) {
|
139
139
|
rb_XRB_MarkupString = rb_define_class_under(rb_XRB, "MarkupString", rb_cString);
|
140
140
|
rb_gc_register_mark_object(rb_XRB_MarkupString);
|
141
141
|
|
data/ext/xrb/escape.h
CHANGED
data/ext/xrb/tag.c
CHANGED
@@ -138,7 +138,7 @@ VALUE XRB_Tag_format_tag(VALUE self, VALUE name, VALUE attributes, VALUE content
|
|
138
138
|
rb_encoding *encoding = rb_enc_get(name);
|
139
139
|
|
140
140
|
VALUE buffer = rb_enc_str_new(0, 0, encoding);
|
141
|
-
|
141
|
+
rb_str_modify_expand(buffer, 256);
|
142
142
|
|
143
143
|
XRB_Tag_append_tag(self, buffer, name, attributes, content);
|
144
144
|
|
@@ -152,7 +152,7 @@ VALUE XRB_Tag_write_opening_tag(VALUE self, VALUE buffer) {
|
|
152
152
|
|
153
153
|
StringValue(name);
|
154
154
|
|
155
|
-
|
155
|
+
rb_str_modify_expand(buffer, RSTRING_LEN(name) + 256);
|
156
156
|
|
157
157
|
rb_str_cat_cstr(buffer, "<");
|
158
158
|
rb_str_buf_append(buffer, name);
|
@@ -173,7 +173,7 @@ VALUE XRB_Tag_write_closing_tag(VALUE self, VALUE buffer) {
|
|
173
173
|
|
174
174
|
StringValue(name);
|
175
175
|
|
176
|
-
|
176
|
+
rb_str_modify_expand(buffer, RSTRING_LEN(name) + 3);
|
177
177
|
|
178
178
|
rb_str_cat_cstr(buffer, "</");
|
179
179
|
rb_str_buf_append(buffer, name);
|
@@ -182,7 +182,7 @@ VALUE XRB_Tag_write_closing_tag(VALUE self, VALUE buffer) {
|
|
182
182
|
return Qnil;
|
183
183
|
}
|
184
184
|
|
185
|
-
void
|
185
|
+
void Init_XRB_Tag(void) {
|
186
186
|
rb_undef_method(rb_class_of(rb_XRB_Tag), "append_attributes");
|
187
187
|
rb_define_singleton_method(rb_XRB_Tag, "append_attributes", XRB_Tag_append_attributes, 3);
|
188
188
|
|
data/ext/xrb/tag.h
CHANGED
data/ext/xrb/xrb.c
CHANGED
@@ -16,7 +16,7 @@ void XRB_raise_error(const char * message, VALUE buffer, size_t offset) {
|
|
16
16
|
rb_exc_raise(exception);
|
17
17
|
}
|
18
18
|
|
19
|
-
void Init_XRB_Extension() {
|
19
|
+
void Init_XRB_Extension(void) {
|
20
20
|
id_open_tag_begin = rb_intern("open_tag_begin");
|
21
21
|
id_open_tag_end = rb_intern("open_tag_end");
|
22
22
|
id_close_tag = rb_intern("close_tag");
|
@@ -56,7 +56,7 @@ void Init_XRB_Extension() {
|
|
56
56
|
rb_XRB_Native = rb_define_module_under(rb_XRB, "Native");
|
57
57
|
rb_gc_register_mark_object(rb_XRB_Native);
|
58
58
|
|
59
|
-
|
59
|
+
Init_XRB_escape();
|
60
60
|
|
61
61
|
rb_XRB_ParseError = rb_const_get_at(rb_XRB, rb_intern("ParseError"));
|
62
62
|
rb_gc_register_mark_object(rb_XRB_ParseError);
|
@@ -68,5 +68,5 @@ void Init_XRB_Extension() {
|
|
68
68
|
rb_XRB_Tag = rb_const_get_at(rb_XRB, rb_intern("Tag"));
|
69
69
|
rb_gc_register_mark_object(rb_XRB_Tag);
|
70
70
|
|
71
|
-
|
71
|
+
Init_XRB_Tag();
|
72
72
|
}
|
data/ext/xrb/xrb.h
CHANGED
@@ -19,16 +19,6 @@
|
|
19
19
|
#define RB_IMMEDIATE_P IMMEDIATE_P
|
20
20
|
#endif
|
21
21
|
|
22
|
-
// A helper to reserve a specific capacity of data for a buffer.
|
23
|
-
#ifndef HAVE_RB_STR_RESERVE
|
24
|
-
inline VALUE rb_str_reserve(VALUE string, long extra) {
|
25
|
-
long actual = RSTRING_LEN(string);
|
26
|
-
rb_str_resize(string, actual + extra);
|
27
|
-
rb_str_set_len(string, actual);
|
28
|
-
return string;
|
29
|
-
}
|
30
|
-
#endif
|
31
|
-
|
32
22
|
// Modules and classes exposed by XRB.
|
33
23
|
extern VALUE
|
34
24
|
rb_XRB,
|
@@ -84,7 +74,7 @@ static inline VALUE XRB_string(const char * begin, const char * end, rb_encoding
|
|
84
74
|
static inline VALUE XRB_buffer_for(VALUE string) {
|
85
75
|
VALUE buffer = rb_enc_str_new(0, 0, rb_enc_get(string));
|
86
76
|
|
87
|
-
|
77
|
+
rb_str_modify_expand(buffer, RSTRING_LEN(string) + 128);
|
88
78
|
|
89
79
|
return buffer;
|
90
80
|
}
|
data/lib/xrb/template.rb
CHANGED
@@ -20,7 +20,7 @@ module XRB
|
|
20
20
|
end
|
21
21
|
|
22
22
|
class Template
|
23
|
-
#
|
23
|
+
# @returns [String] the output produced by calling the given block.
|
24
24
|
def self.capture(*arguments, output: nil, &block)
|
25
25
|
scope = block.binding
|
26
26
|
previous_output = scope.local_variable_get(OUT)
|
@@ -34,7 +34,7 @@ module XRB
|
|
34
34
|
scope.local_variable_set(OUT, previous_output)
|
35
35
|
end
|
36
36
|
|
37
|
-
return output
|
37
|
+
return output.to_str
|
38
38
|
end
|
39
39
|
|
40
40
|
# Returns the buffer used for capturing output.
|
data/lib/xrb/version.rb
CHANGED
data/readme.md
CHANGED
@@ -4,11 +4,47 @@ XRB is a templating system built loosely on top of XHTML markup. It uses efficie
|
|
4
4
|
|
5
5
|
[![Development Status](https://github.com/socketry/xrb/workflows/Test/badge.svg)](https://github.com/socketry/xrb/actions?workflow=Test)
|
6
6
|
|
7
|
+
``` xrb
|
8
|
+
<h1>XRB Examples</h1>
|
9
|
+
|
10
|
+
<ul>
|
11
|
+
<li>XRB uses normal string interpolation syntax: #{"Hello World"}</li>
|
12
|
+
|
13
|
+
<?r if true ?>
|
14
|
+
<li>XRB also adopts standard #{"<?r ... ?>"} script tags</li>
|
15
|
+
<?r end ?>
|
16
|
+
|
17
|
+
<!-- That's all of the syntax! -->
|
18
|
+
<ul>
|
19
|
+
```
|
20
|
+
|
21
|
+
Generates:
|
22
|
+
|
23
|
+
``` xml
|
24
|
+
<h1>XRB Examples</h1>
|
25
|
+
|
26
|
+
<ul>
|
27
|
+
<li>XRB uses normal string interpolation syntax: Hello World</li>
|
28
|
+
|
29
|
+
<li>XRB also adopts standard <?r ... ?> script tags</li>
|
30
|
+
|
31
|
+
<!-- That's all of the syntax! -->
|
32
|
+
<ul>
|
33
|
+
```
|
34
|
+
|
35
|
+
## Is it fast?
|
36
|
+
|
37
|
+
Yes. XRB is designed to be fast. It uses a combination of efficient native parsers and Ruby code generation to ensure that templates are compiled into efficient Ruby code. This means that XRB is suitable for use in high performance applications. In comparison to `ERB`, it is generally about 10x faster.
|
38
|
+
|
7
39
|
## Usage
|
8
40
|
|
9
41
|
Please see the [project documentation](https://socketry.github.io/xrb/) for more details.
|
10
42
|
|
11
|
-
- [
|
43
|
+
- [Getting Started](https://socketry.github.io/xrb/guides/getting-started/index) - This guide gives a brief overview of the XRB templating system and how to use it.
|
44
|
+
|
45
|
+
- [Capturing Output](https://socketry.github.io/xrb/guides/capturing-output/index) - This guide explains how to capture intermediate output during template rendering.
|
46
|
+
|
47
|
+
- [Markup Parser](https://socketry.github.io/xrb/guides/markup-parser/index) - This guide explains how to parse and manipulate Markup using the XRB templating system.
|
12
48
|
|
13
49
|
## See Also
|
14
50
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -39,7 +39,7 @@ cert_chain:
|
|
39
39
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
40
40
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
41
41
|
-----END CERTIFICATE-----
|
42
|
-
date: 2024-04-
|
42
|
+
date: 2024-04-28 00:00:00.000000000 Z
|
43
43
|
dependencies: []
|
44
44
|
description:
|
45
45
|
email:
|
@@ -50,17 +50,7 @@ extra_rdoc_files: []
|
|
50
50
|
files:
|
51
51
|
- bake/xrb/entities.rb
|
52
52
|
- bake/xrb/parsers.rb
|
53
|
-
- ext/Makefile
|
54
|
-
- ext/XRB_Extension.bundle
|
55
|
-
- ext/escape.o
|
56
|
-
- ext/extconf.h
|
57
53
|
- ext/extconf.rb
|
58
|
-
- ext/markup.o
|
59
|
-
- ext/mkmf.log
|
60
|
-
- ext/query.o
|
61
|
-
- ext/tag.o
|
62
|
-
- ext/template.o
|
63
|
-
- ext/xrb.o
|
64
54
|
- ext/xrb/escape.c
|
65
55
|
- ext/xrb/escape.h
|
66
56
|
- ext/xrb/markup.c
|
metadata.gz.sig
CHANGED
Binary file
|
data/ext/Makefile
DELETED
@@ -1,270 +0,0 @@
|
|
1
|
-
|
2
|
-
SHELL = /bin/sh
|
3
|
-
|
4
|
-
# V=0 quiet, V=1 verbose. other values don't work.
|
5
|
-
V = 0
|
6
|
-
V0 = $(V:0=)
|
7
|
-
Q1 = $(V:1=)
|
8
|
-
Q = $(Q1:0=@)
|
9
|
-
ECHO1 = $(V:1=@ :)
|
10
|
-
ECHO = $(ECHO1:0=@ echo)
|
11
|
-
NULLCMD = :
|
12
|
-
|
13
|
-
#### Start of system configuration section. ####
|
14
|
-
|
15
|
-
srcdir = .
|
16
|
-
topdir = /Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0
|
17
|
-
hdrdir = $(topdir)
|
18
|
-
arch_hdrdir = /Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23
|
19
|
-
PATH_SEPARATOR = :
|
20
|
-
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir)/xrb
|
21
|
-
prefix = $(DESTDIR)/Users/samuel/.rubies/ruby-3.3.0
|
22
|
-
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
|
23
|
-
rubyarchprefix = $(rubylibprefix)/$(arch)
|
24
|
-
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
|
25
|
-
exec_prefix = $(prefix)
|
26
|
-
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
|
27
|
-
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
|
28
|
-
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
|
29
|
-
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
|
30
|
-
sitehdrdir = $(rubyhdrdir)/site_ruby
|
31
|
-
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
|
32
|
-
vendorarchdir = $(vendorlibdir)/$(sitearch)
|
33
|
-
vendorlibdir = $(vendordir)/$(ruby_version)
|
34
|
-
vendordir = $(rubylibprefix)/vendor_ruby
|
35
|
-
sitearchdir = $(sitelibdir)/$(sitearch)
|
36
|
-
sitelibdir = $(sitedir)/$(ruby_version)
|
37
|
-
sitedir = $(rubylibprefix)/site_ruby
|
38
|
-
rubyarchdir = $(rubylibdir)/$(arch)
|
39
|
-
rubylibdir = $(rubylibprefix)/$(ruby_version)
|
40
|
-
sitearchincludedir = $(includedir)/$(sitearch)
|
41
|
-
archincludedir = $(includedir)/$(arch)
|
42
|
-
sitearchlibdir = $(libdir)/$(sitearch)
|
43
|
-
archlibdir = $(libdir)/$(arch)
|
44
|
-
ridir = $(datarootdir)/$(RI_BASE_NAME)
|
45
|
-
mandir = $(datarootdir)/man
|
46
|
-
localedir = $(datarootdir)/locale
|
47
|
-
libdir = $(exec_prefix)/lib
|
48
|
-
psdir = $(docdir)
|
49
|
-
pdfdir = $(docdir)
|
50
|
-
dvidir = $(docdir)
|
51
|
-
htmldir = $(docdir)
|
52
|
-
infodir = $(datarootdir)/info
|
53
|
-
docdir = $(datarootdir)/doc/$(PACKAGE)
|
54
|
-
oldincludedir = $(DESTDIR)/usr/include
|
55
|
-
includedir = $(SDKROOT)$(prefix)/include
|
56
|
-
runstatedir = $(localstatedir)/run
|
57
|
-
localstatedir = $(prefix)/var
|
58
|
-
sharedstatedir = $(prefix)/com
|
59
|
-
sysconfdir = $(prefix)/etc
|
60
|
-
datadir = $(datarootdir)
|
61
|
-
datarootdir = $(prefix)/share
|
62
|
-
libexecdir = $(exec_prefix)/libexec
|
63
|
-
sbindir = $(exec_prefix)/sbin
|
64
|
-
bindir = $(exec_prefix)/bin
|
65
|
-
archdir = $(rubyarchdir)
|
66
|
-
|
67
|
-
|
68
|
-
CC_WRAPPER =
|
69
|
-
CC = clang
|
70
|
-
CXX = clang++
|
71
|
-
LIBRUBY = $(LIBRUBY_A)
|
72
|
-
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
|
73
|
-
LIBRUBYARG_SHARED =
|
74
|
-
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework CoreFoundation $(MAINLIBS)
|
75
|
-
empty =
|
76
|
-
OUTFLAG = -o $(empty)
|
77
|
-
COUTFLAG = -o $(empty)
|
78
|
-
CSRCFLAG = $(empty)
|
79
|
-
|
80
|
-
RUBY_EXTCONF_H = extconf.h
|
81
|
-
cflags = -fdeclspec $(optflags) $(debugflags) $(warnflags)
|
82
|
-
cxxflags =
|
83
|
-
optflags = -O3 -fno-fast-math
|
84
|
-
debugflags = -ggdb3
|
85
|
-
warnflags = -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef
|
86
|
-
cppflags =
|
87
|
-
CCDLFLAGS = -fno-common
|
88
|
-
CFLAGS = $(CCDLFLAGS) $(cflags) -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 $(ARCH_FLAG)
|
89
|
-
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
|
90
|
-
DEFS =
|
91
|
-
CPPFLAGS = -DRUBY_EXTCONF_H=\"$(RUBY_EXTCONF_H)\" -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
|
92
|
-
CXXFLAGS = $(CCDLFLAGS) -fdeclspec $(ARCH_FLAG)
|
93
|
-
ldflags = -L. -fstack-protector-strong -L/opt/local/lib
|
94
|
-
dldflags = -L/opt/local/lib -Wl,-undefined,dynamic_lookup -bundle_loader '$(BUILTRUBY)'
|
95
|
-
ARCH_FLAG = -arch arm64
|
96
|
-
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
|
97
|
-
LDSHARED = $(CC) -dynamic -bundle
|
98
|
-
LDSHAREDXX = $(CXX) -dynamic -bundle
|
99
|
-
AR = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
|
100
|
-
EXEEXT =
|
101
|
-
|
102
|
-
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
|
103
|
-
RUBY_SO_NAME = ruby.3.3
|
104
|
-
RUBYW_INSTALL_NAME =
|
105
|
-
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
|
106
|
-
RUBYW_BASE_NAME = rubyw
|
107
|
-
RUBY_BASE_NAME = ruby
|
108
|
-
|
109
|
-
arch = arm64-darwin23
|
110
|
-
sitearch = $(arch)
|
111
|
-
ruby_version = 3.3.0
|
112
|
-
ruby = $(bindir)/$(RUBY_BASE_NAME)
|
113
|
-
RUBY = $(ruby)
|
114
|
-
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
|
115
|
-
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h $(RUBY_EXTCONF_H)
|
116
|
-
|
117
|
-
RM = rm -f
|
118
|
-
RM_RF = rm -fr
|
119
|
-
RMDIRS = rmdir -p
|
120
|
-
MAKEDIRS = /opt/local/bin/gmkdir -p
|
121
|
-
INSTALL = /opt/local/bin/ginstall -c
|
122
|
-
INSTALL_PROG = $(INSTALL) -m 0755
|
123
|
-
INSTALL_DATA = $(INSTALL) -m 644
|
124
|
-
COPY = cp
|
125
|
-
TOUCH = exit >
|
126
|
-
|
127
|
-
#### End of system configuration section. ####
|
128
|
-
|
129
|
-
preload =
|
130
|
-
libpath = . $(libdir) /opt/local/lib
|
131
|
-
LIBPATH = -L. -L$(libdir) -L/opt/local/lib
|
132
|
-
DEFFILE =
|
133
|
-
|
134
|
-
CLEANFILES = mkmf.log
|
135
|
-
DISTCLEANFILES =
|
136
|
-
DISTCLEANDIRS =
|
137
|
-
|
138
|
-
extout =
|
139
|
-
extout_prefix =
|
140
|
-
target_prefix =
|
141
|
-
LOCAL_LIBS =
|
142
|
-
LIBS = -lpthread
|
143
|
-
ORIG_SRCS =
|
144
|
-
SRCS = $(ORIG_SRCS) escape.c markup.c query.c tag.c template.c xrb.c
|
145
|
-
OBJS = escape.o markup.o query.o tag.o template.o xrb.o
|
146
|
-
HDRS = $(srcdir)/extconf.h
|
147
|
-
LOCAL_HDRS =
|
148
|
-
TARGET = XRB_Extension
|
149
|
-
TARGET_NAME = XRB_Extension
|
150
|
-
TARGET_ENTRY = Init_$(TARGET_NAME)
|
151
|
-
DLLIB = $(TARGET).bundle
|
152
|
-
EXTSTATIC =
|
153
|
-
STATIC_LIB =
|
154
|
-
|
155
|
-
TIMESTAMP_DIR = .
|
156
|
-
BINDIR = $(bindir)
|
157
|
-
RUBYCOMMONDIR = $(sitedir)$(target_prefix)
|
158
|
-
RUBYLIBDIR = $(sitelibdir)$(target_prefix)
|
159
|
-
RUBYARCHDIR = $(sitearchdir)$(target_prefix)
|
160
|
-
HDRDIR = $(sitehdrdir)$(target_prefix)
|
161
|
-
ARCHHDRDIR = $(sitearchhdrdir)$(target_prefix)
|
162
|
-
TARGET_SO_DIR =
|
163
|
-
TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
|
164
|
-
CLEANLIBS = $(TARGET_SO) $(TARGET_SO).dSYM
|
165
|
-
CLEANOBJS = $(OBJS) *.bak
|
166
|
-
TARGET_SO_DIR_TIMESTAMP = $(TIMESTAMP_DIR)/.sitearchdir.time
|
167
|
-
|
168
|
-
all: $(DLLIB)
|
169
|
-
static: $(STATIC_LIB)
|
170
|
-
.PHONY: all install static install-so install-rb
|
171
|
-
.PHONY: clean clean-so clean-static clean-rb
|
172
|
-
|
173
|
-
clean-static::
|
174
|
-
clean-rb-default::
|
175
|
-
clean-rb::
|
176
|
-
clean-so::
|
177
|
-
clean: clean-so clean-static clean-rb-default clean-rb
|
178
|
-
-$(Q)$(RM_RF) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
|
179
|
-
|
180
|
-
distclean-rb-default::
|
181
|
-
distclean-rb::
|
182
|
-
distclean-so::
|
183
|
-
distclean-static::
|
184
|
-
distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
|
185
|
-
-$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
|
186
|
-
-$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
|
187
|
-
-$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
|
188
|
-
|
189
|
-
realclean: distclean
|
190
|
-
install: install-so install-rb
|
191
|
-
|
192
|
-
install-so: $(DLLIB) $(TARGET_SO_DIR_TIMESTAMP)
|
193
|
-
$(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
|
194
|
-
clean-static::
|
195
|
-
-$(Q)$(RM) $(STATIC_LIB)
|
196
|
-
install-rb: pre-install-rb do-install-rb install-rb-default
|
197
|
-
install-rb-default: pre-install-rb-default do-install-rb-default
|
198
|
-
pre-install-rb: Makefile
|
199
|
-
pre-install-rb-default: Makefile
|
200
|
-
do-install-rb:
|
201
|
-
do-install-rb-default:
|
202
|
-
pre-install-rb-default:
|
203
|
-
@$(NULLCMD)
|
204
|
-
$(TARGET_SO_DIR_TIMESTAMP):
|
205
|
-
$(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
|
206
|
-
$(Q) $(TOUCH) $@
|
207
|
-
|
208
|
-
site-install: site-install-so site-install-rb
|
209
|
-
site-install-so: install-so
|
210
|
-
site-install-rb: install-rb
|
211
|
-
|
212
|
-
.SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
|
213
|
-
|
214
|
-
.cc.o:
|
215
|
-
$(ECHO) compiling $(<)
|
216
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
217
|
-
|
218
|
-
.cc.S:
|
219
|
-
$(ECHO) translating $(<)
|
220
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
221
|
-
|
222
|
-
.mm.o:
|
223
|
-
$(ECHO) compiling $(<)
|
224
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
225
|
-
|
226
|
-
.mm.S:
|
227
|
-
$(ECHO) translating $(<)
|
228
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
229
|
-
|
230
|
-
.cxx.o:
|
231
|
-
$(ECHO) compiling $(<)
|
232
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
233
|
-
|
234
|
-
.cxx.S:
|
235
|
-
$(ECHO) translating $(<)
|
236
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
237
|
-
|
238
|
-
.cpp.o:
|
239
|
-
$(ECHO) compiling $(<)
|
240
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
241
|
-
|
242
|
-
.cpp.S:
|
243
|
-
$(ECHO) translating $(<)
|
244
|
-
$(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
245
|
-
|
246
|
-
.c.o:
|
247
|
-
$(ECHO) compiling $(<)
|
248
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
249
|
-
|
250
|
-
.c.S:
|
251
|
-
$(ECHO) translating $(<)
|
252
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
253
|
-
|
254
|
-
.m.o:
|
255
|
-
$(ECHO) compiling $(<)
|
256
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
|
257
|
-
|
258
|
-
.m.S:
|
259
|
-
$(ECHO) translating $(<)
|
260
|
-
$(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
|
261
|
-
|
262
|
-
$(TARGET_SO): $(OBJS) Makefile
|
263
|
-
$(ECHO) linking shared-object $(DLLIB)
|
264
|
-
-$(Q)$(RM) $(@)
|
265
|
-
$(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
|
266
|
-
$(Q) $(POSTLINK)
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
$(OBJS): $(HDRS) $(ruby_headers)
|
data/ext/XRB_Extension.bundle
DELETED
Binary file
|
data/ext/escape.o
DELETED
Binary file
|
data/ext/extconf.h
DELETED
data/ext/markup.o
DELETED
Binary file
|
data/ext/mkmf.log
DELETED
@@ -1,122 +0,0 @@
|
|
1
|
-
have_func: checking for rb_sym2str()... -------------------- yes
|
2
|
-
|
3
|
-
DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.3.0/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23 -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.3.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -lpthread "
|
4
|
-
ld: warning: ignoring duplicate libraries: '-lpthread'
|
5
|
-
checked program was:
|
6
|
-
/* begin */
|
7
|
-
1: #include "ruby.h"
|
8
|
-
2:
|
9
|
-
3: int main(int argc, char **argv)
|
10
|
-
4: {
|
11
|
-
5: return !!argv[argc];
|
12
|
-
6: }
|
13
|
-
/* end */
|
14
|
-
|
15
|
-
DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.3.0/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23 -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.3.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -lpthread "
|
16
|
-
ld: warning: ignoring duplicate libraries: '-lpthread'
|
17
|
-
checked program was:
|
18
|
-
/* begin */
|
19
|
-
1: #include "ruby.h"
|
20
|
-
2:
|
21
|
-
3: /*top*/
|
22
|
-
4: extern int t(void);
|
23
|
-
5: int main(int argc, char **argv)
|
24
|
-
6: {
|
25
|
-
7: if (argc > 1000000) {
|
26
|
-
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
27
|
-
9: printf("%d", (*tp)());
|
28
|
-
10: }
|
29
|
-
11:
|
30
|
-
12: return !!argv[argc];
|
31
|
-
13: }
|
32
|
-
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_sym2str; return !p; }
|
33
|
-
/* end */
|
34
|
-
|
35
|
-
--------------------
|
36
|
-
|
37
|
-
have_func: checking for rb_str_cat_cstr()... -------------------- yes
|
38
|
-
|
39
|
-
DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.3.0/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23 -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.3.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -lpthread "
|
40
|
-
ld: warning: ignoring duplicate libraries: '-lpthread'
|
41
|
-
checked program was:
|
42
|
-
/* begin */
|
43
|
-
1: #include "ruby.h"
|
44
|
-
2:
|
45
|
-
3: /*top*/
|
46
|
-
4: extern int t(void);
|
47
|
-
5: int main(int argc, char **argv)
|
48
|
-
6: {
|
49
|
-
7: if (argc > 1000000) {
|
50
|
-
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
51
|
-
9: printf("%d", (*tp)());
|
52
|
-
10: }
|
53
|
-
11:
|
54
|
-
12: return !!argv[argc];
|
55
|
-
13: }
|
56
|
-
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_cat_cstr; return !p; }
|
57
|
-
/* end */
|
58
|
-
|
59
|
-
--------------------
|
60
|
-
|
61
|
-
have_func: checking for rb_str_reserve()... -------------------- no
|
62
|
-
|
63
|
-
DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.3.0/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23 -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.3.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -lpthread "
|
64
|
-
conftest.c:14:57: error: use of undeclared identifier 'rb_str_reserve'
|
65
|
-
int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
|
66
|
-
^
|
67
|
-
1 error generated.
|
68
|
-
checked program was:
|
69
|
-
/* begin */
|
70
|
-
1: #include "ruby.h"
|
71
|
-
2:
|
72
|
-
3: /*top*/
|
73
|
-
4: extern int t(void);
|
74
|
-
5: int main(int argc, char **argv)
|
75
|
-
6: {
|
76
|
-
7: if (argc > 1000000) {
|
77
|
-
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
78
|
-
9: printf("%d", (*tp)());
|
79
|
-
10: }
|
80
|
-
11:
|
81
|
-
12: return !!argv[argc];
|
82
|
-
13: }
|
83
|
-
14: int t(void) { void ((*volatile p)()); p = (void ((*)()))rb_str_reserve; return !p; }
|
84
|
-
/* end */
|
85
|
-
|
86
|
-
DYLD_LIBRARY_PATH=.:/Users/samuel/.rubies/ruby-3.3.0/lib "clang -o conftest -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/arm64-darwin23 -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0/ruby/backward -I/Users/samuel/.rubies/ruby-3.3.0/include/ruby-3.3.0 -I. -I/opt/local/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 -Wwrite-strings -Wold-style-definition -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wunused-variable -Wmisleading-indentation -Wundef -pipe -O3 -Wall -Wno-unknown-pragmas -std=c99 conftest.c -L. -L/Users/samuel/.rubies/ruby-3.3.0/lib -L/opt/local/lib -L. -fstack-protector-strong -L/opt/local/lib -arch arm64 -lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread -lpthread "
|
87
|
-
ld: warning: ignoring duplicate libraries: '-lpthread'
|
88
|
-
Undefined symbols for architecture arm64:
|
89
|
-
"_rb_str_reserve", referenced from:
|
90
|
-
_t in conftest-abc093.o
|
91
|
-
ld: symbol(s) not found for architecture arm64
|
92
|
-
clang: error: linker command failed with exit code 1 (use -v to see invocation)
|
93
|
-
checked program was:
|
94
|
-
/* begin */
|
95
|
-
1: #include "ruby.h"
|
96
|
-
2:
|
97
|
-
3: /*top*/
|
98
|
-
4: extern int t(void);
|
99
|
-
5: int main(int argc, char **argv)
|
100
|
-
6: {
|
101
|
-
7: if (argc > 1000000) {
|
102
|
-
8: int (* volatile tp)(void)=(int (*)(void))&t;
|
103
|
-
9: printf("%d", (*tp)());
|
104
|
-
10: }
|
105
|
-
11:
|
106
|
-
12: return !!argv[argc];
|
107
|
-
13: }
|
108
|
-
14: extern void rb_str_reserve();
|
109
|
-
15: int t(void) { rb_str_reserve(); return 0; }
|
110
|
-
/* end */
|
111
|
-
|
112
|
-
--------------------
|
113
|
-
|
114
|
-
extconf.h is:
|
115
|
-
/* begin */
|
116
|
-
1: #ifndef EXTCONF_H
|
117
|
-
2: #define EXTCONF_H
|
118
|
-
3: #define HAVE_RB_SYM2STR 1
|
119
|
-
4: #define HAVE_RB_STR_CAT_CSTR 1
|
120
|
-
5: #endif
|
121
|
-
/* end */
|
122
|
-
|
data/ext/query.o
DELETED
Binary file
|
data/ext/tag.o
DELETED
Binary file
|
data/ext/template.o
DELETED
Binary file
|
data/ext/xrb.o
DELETED
Binary file
|