mruby Advent Calendar 2013 - Qiitaã®19æ¥ç®ã®è¨äºã§ãã mrubyã§ã«ã¹ã¿ã ã¢ãã±ã¼ã¿ã使ã mrubyã使ãã¨ãã¯ãã¾ãmrb_open()ãå¼ã¶ããã§ãããmrb_open_allocf()ã¨ããç¬èªã®ã¢ãã±ã¼ã¿ãæå®ã§ããäºç¨®ãããã¾ãã mrb_state* mrb_open_allocf(mrb_allocf, void *ud); mrb_allocfã¯æ¬¡ã®ããã«typedefããã¦ãã¾ã typedef void* (*mrb_allocf) (struct mrb_state *mrb, void*, size_t, void *ud); mrb_allocf()ã®å¼æ°ã§ããã2çªç®ã®void *ã¯reallocããå ´åã®å ã®é åã¸ã®ãã¤ã³ã¿(æ°ããé åãªãNULL), size_tã«ã¯ç¢ºä¿ããããµã¤ãº(ãã¤ãæ°ã0ã®å ´åã¯è§£æ¾ããã¨ãã
{{#tags}}- {{label}}
{{/tags}}