mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
failed to add...
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "mruby.h"
|
||||
|
||||
mrb_value
|
||||
mrb_sockettest_tmppath(mrb_state *mrb, mrb_value klass)
|
||||
{
|
||||
return mrb_str_new_cstr(mrb, tempnam(NULL, "mruby-socket"));
|
||||
}
|
||||
|
||||
void
|
||||
mrb_mruby_socket_gem_test(mrb_state* mrb)
|
||||
{
|
||||
struct RClass *c = mrb_define_module(mrb, "SocketTest");
|
||||
mrb_define_class_method(mrb, c, "tmppath", mrb_sockettest_tmppath, MRB_ARGS_NONE());
|
||||
}
|
||||
Reference in New Issue
Block a user