From 0838644ff35e8ba4cae0c4c0e6ef4af12b56364c Mon Sep 17 00:00:00 2001 From: Steve Keay Date: Fri, 4 Jul 2025 11:30:11 +0100 Subject: [PATCH 1/2] Fix compilation error in the C extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit lexer.new is called without arguments, and is defined with a stated arity of zero in the C code. On this basis, the function signature was incorrect. Removing the superfluous parameter fixes the following build error on debian trixie: In file included from /builder/.asdf/installs/ruby/3.4.4/include/ruby-3.4.0/ruby/ruby.h:27: /builder/.asdf/installs/ruby/3.4.4/include/ruby-3.4.0/ruby/internal/anyargs.h:291:135: error: passing argument 3 of ‘rb_define_method_00’ from incompatible pointer type [-Wincompatible-pointer-types] 291 | #define rb_define_method(klass, mid, func, arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity)) | ^~~~~~ | | | VALUE (*)(VALUE, VALUE) {aka long unsigned int (*)(long unsigned int, long unsigned int)} ../../../../ext/ios_parser/c_lexer/lexer.c:610:5: note: in expansion of macro ‘rb_define_method’ 610 | rb_define_method(rb_cCLexer, "initialize", initialize, 0); | ^~~~~~~~~~~~~~~~ /builder/.asdf/installs/ruby/3.4.4/include/ruby-3.4.0/ruby/internal/anyargs.h:280:21: note: expected ‘VALUE (*)(VALUE)’ {aka ‘long unsigned int (*)(long unsigned int)’} but argument is of type ‘VALUE (*)(VALUE, VALUE)’ {aka ‘long unsigned int (*)(long unsigned int, long unsigned int)’} 280 | RBIMPL_ANYARGS_DECL(rb_define_method, VALUE, const char *) | ^~~~~~~~~~~~~~~~ /builder/.asdf/installs/ruby/3.4.4/include/ruby-3.4.0/ruby/internal/anyargs.h:258:41: note: in definition of macro ‘RBIMPL_ANYARGS_DECL’ 258 | RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); \ | ^~~ At top level: cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics gmake: *** [Makefile:251: lexer.o] Error 1 rake aborted! --- ext/ios_parser/c_lexer/lexer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ios_parser/c_lexer/lexer.c b/ext/ios_parser/c_lexer/lexer.c index 3c056c7..df65401 100644 --- a/ext/ios_parser/c_lexer/lexer.c +++ b/ext/ios_parser/c_lexer/lexer.c @@ -201,7 +201,7 @@ static VALUE allocate(VALUE klass) { return Data_Wrap_Struct(klass, mark, deallocate, lex); } -static VALUE initialize(VALUE self, VALUE input_text) { +static VALUE initialize(VALUE self) { LexInfo *lex; Data_Get_Struct(self, LexInfo, lex); From e5cce18119e5ca75395bec103ab8d39db850fb4b Mon Sep 17 00:00:00 2001 From: Steve Keay Date: Fri, 4 Jul 2025 13:05:17 +0100 Subject: [PATCH 2/2] v0.10.0 --- lib/ios_parser/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ios_parser/version.rb b/lib/ios_parser/version.rb index 658d7ad..691ff90 100644 --- a/lib/ios_parser/version.rb +++ b/lib/ios_parser/version.rb @@ -1,7 +1,7 @@ module IOSParser class << self def version - '0.9.0' + '0.10.0' end end end