Skip to content

Commit

Permalink
Missed a few functions from MRI intern.h
Browse files Browse the repository at this point in the history
These functions are not internal; they are functions for working
with internal types.
  • Loading branch information
headius committed Mar 6, 2024
1 parent c86d1af commit 6ff6dce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/src/main/java/org/jruby/api/MRI.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.jruby.runtime.ThreadContext;
import org.jruby.runtime.builtin.IRubyObject;
import org.jruby.util.ByteList;
import org.jruby.util.ByteListHolder;
import org.jruby.util.io.EncodingUtils;
import org.jruby.util.io.IOEncodable;
import org.jruby.util.io.OpenFile;
Expand Down Expand Up @@ -173,6 +174,18 @@ public static Encoding rb_default_external_encoding(ThreadContext context) {
return EncodingUtils.defaultExternalEncoding(context.runtime);
}

public static void rb_str_buf_cat(Ruby runtime, RubyString str, ByteList ptr) {
EncodingUtils.rbStrBufCat(runtime, str, ptr);
}

public static void rb_str_buf_cat(Ruby runtime, ByteListHolder str, byte[] ptrBytes, int ptr, int len) {
EncodingUtils.rbStrBufCat(runtime, str, ptrBytes, ptr, len);
}

public static void rb_str_buf_cat(Ruby runtime, ByteList str, byte[] ptrBytes, int ptr, int len) {
EncodingUtils.rbStrBufCat(runtime, str, ptrBytes, ptr, len);
}

public static void rb_enc_str_buf_cat(ThreadContext context, RubyString str, ByteList ptr, Encoding enc) {
EncodingUtils.encStrBufCat(context.runtime, str, ptr, enc);
}
Expand Down

0 comments on commit 6ff6dce

Please sign in to comment.