mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 13:34:17 +02:00
Remove version templating in YARP
This commit is contained in:
parent
aea7e91828
commit
ca9a44795b
Notes:
git
2023-08-25 22:21:12 +00:00
12 changed files with 18 additions and 146 deletions
|
@ -545,12 +545,12 @@ RUBY_FUNC_EXPORTED void
|
|||
Init_yarp(void) {
|
||||
// Make sure that the YARP library version matches the expected version.
|
||||
// Otherwise something was compiled incorrectly.
|
||||
if (strcmp(yp_version(), YP_VERSION) != 0) {
|
||||
if (strcmp(yp_version(), EXPECTED_YARP_VERSION) != 0) {
|
||||
rb_raise(
|
||||
rb_eRuntimeError,
|
||||
"The YARP library version (%s) does not match the expected version (%s)",
|
||||
yp_version(),
|
||||
YP_VERSION
|
||||
EXPECTED_YARP_VERSION
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -566,6 +566,9 @@ Init_yarp(void) {
|
|||
rb_cYARPParseWarning = rb_define_class_under(rb_cYARP, "ParseWarning", rb_cObject);
|
||||
rb_cYARPParseResult = rb_define_class_under(rb_cYARP, "ParseResult", rb_cObject);
|
||||
|
||||
// Define the version string here so that we can use the constants defined
|
||||
// in yarp.h.
|
||||
rb_define_const(rb_cYARP, "VERSION", rb_str_new2(EXPECTED_YARP_VERSION));
|
||||
rb_define_const(rb_cYARP, "BACKEND", ID2SYM(rb_intern("CExtension")));
|
||||
|
||||
// First, the functions that have to do with lexing and parsing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue